Skip to content

Commit

Permalink
The SQLServer Glue Get Table API was not retrieving data as expected …
Browse files Browse the repository at this point in the history
…due to a case-sensitivity issue with the PARTITION_NUMBER. By converting the PARTITION_NUMBER column to lowercase, we achieved successful data retrieval through the Glue API.
  • Loading branch information
ritiktrianz committed Jan 21, 2025
1 parent ae4e095 commit a635a26
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void doGetTableLayout()
for (int i = 0; i < getTableLayoutResponse.getPartitions().getRowCount(); i++) {
actualValues.add(BlockUtils.rowToString(getTableLayoutResponse.getPartitions(), i));
}
Assert.assertEquals(Arrays.asList("[PARTITION_NUMBER : 1:::pf:::pc]","[PARTITION_NUMBER : 2:::pf:::pc]","[PARTITION_NUMBER : 3:::pf:::pc]"), actualValues);
Assert.assertEquals(Arrays.asList("[partition_number : 1:::pf:::pc]","[partition_number : 2:::pf:::pc]","[partition_number : 3:::pf:::pc]"), actualValues);

SchemaBuilder expectedSchemaBuilder = SchemaBuilder.newBuilder();
expectedSchemaBuilder.addField(FieldBuilder.newBuilder(PARTITION_NUMBER, org.apache.arrow.vector.types.Types.MinorType.VARCHAR.getType()).build());
Expand Down Expand Up @@ -197,7 +197,7 @@ public void doGetTableLayoutWithNoPartitions()
for (int i = 0; i < getTableLayoutResponse.getPartitions().getRowCount(); i++) {
actualValues.add(BlockUtils.rowToString(getTableLayoutResponse.getPartitions(), i));
}
Assert.assertEquals(Arrays.asList("[PARTITION_NUMBER : 0]"), actualValues);
Assert.assertEquals(Arrays.asList("[partition_number : 0]"), actualValues);

SchemaBuilder expectedSchemaBuilder = SchemaBuilder.newBuilder();
expectedSchemaBuilder.addField(FieldBuilder.newBuilder(PARTITION_NUMBER, org.apache.arrow.vector.types.Types.MinorType.VARCHAR.getType()).build());
Expand Down

0 comments on commit a635a26

Please sign in to comment.