Skip to content

Commit

Permalink
Fix Flight SQL -> Flight JDBC rebase mismatch #2
Browse files Browse the repository at this point in the history
  • Loading branch information
vfraga committed Mar 29, 2022
1 parent 68af8d5 commit 856b597
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -715,24 +715,4 @@ private Schemas() {
// Prevent instantiation.
}
}

/**
* Reserved options for the SQL command `GetSqlInfo` used by {@link FlightSqlProducer}.
*/
final class SqlInfo {
public static final int FLIGHT_SQL_SERVER_NAME = 0;
public static final int FLIGHT_SQL_SERVER_VERSION = 1;
public static final int FLIGHT_SQL_SERVER_ARROW_VERSION = 2;
public static final int FLIGHT_SQL_SERVER_READ_ONLY = 3;
public static final int SQL_DDL_CATALOG = 500;
public static final int SQL_DDL_SCHEMA = 501;
public static final int SQL_DDL_TABLE = 502;
public static final int SQL_IDENTIFIER_CASE = 503;
public static final int SQL_IDENTIFIER_QUOTE_CHAR = 504;
public static final int SQL_QUOTED_IDENTIFIER_CASE = 505;

private SqlInfo() {
// Prevent instantiation.
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
import org.apache.arrow.vector.ipc.ReadChannel;
import org.apache.arrow.vector.ipc.message.MessageSerializer;
import org.apache.arrow.vector.types.Types.MinorType;
import org.apache.arrow.vector.types.UnionMode;
import org.apache.arrow.vector.types.pojo.ArrowType;
import org.apache.arrow.vector.types.pojo.Field;
import org.apache.arrow.vector.types.pojo.FieldType;
import org.apache.arrow.vector.types.pojo.Schema;
Expand Down Expand Up @@ -465,35 +463,6 @@ public void testGetTableTypesResult() throws Exception {
}
}

@Test
public void testGetSqlInfoSchema() {
final FlightInfo info = sqlClient.getSqlInfo();
final Schema infoSchema = info.getSchema();
final List<Field> children = ImmutableList.of(
Field.nullable("string_value", MinorType.VARCHAR.getType()),
Field.nullable("int_value", MinorType.INT.getType()),
Field.nullable("bigint_value", MinorType.BIGINT.getType()),
Field.nullable("int32_bitmask", MinorType.INT.getType()));
List<Field> fields = ImmutableList.of(
Field.nullable("info_name", MinorType.VARCHAR.getType()),
new Field("value",
// dense_union<string_value: string, int_value: int32, bigint_value: int64, int32_bitmask: int32>
new FieldType(false, new ArrowType.Union(UnionMode.Dense, new int[0]), /*dictionary=*/null),
children));
final Schema expectedSchema = new Schema(fields);
collector.checkThat(infoSchema, is(expectedSchema));
}

@Test
@Ignore // TODO Implement this.
public void testGetSqlInfoResults() throws Exception {
try (FlightStream stream = sqlClient.getStream(sqlClient.getSqlInfo().getEndpoints().get(0).getTicket())) {
final List<List<String>> sqlInfo = getResults(stream);
// TODO Elaborate.
collector.checkThat(sqlInfo, is(notNullValue()));
}
}

@Test
public void testGetSchemasSchema() {
final FlightInfo info = sqlClient.getSchemas(null, null);
Expand Down

0 comments on commit 856b597

Please sign in to comment.