stevenzwu commented on a change in pull request #3817:
URL: https://github.com/apache/iceberg/pull/3817#discussion_r780850848



##########
File path: 
flink/v1.14/flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkScanSql.java
##########
@@ -178,6 +179,38 @@ public void testInferedParallelism() throws IOException {
     Assert.assertEquals("Should produce the expected parallelism.", 1, 
parallelism);
   }
 
+  @Test
+  public void testExposeLocality() throws Exception {
+    Table table =
+        catalog.createTable(TableIdentifier.of("default", "t"), 
TestFixtures.SCHEMA, TestFixtures.SPEC);
+
+    TableLoader tableLoader = TableLoader.fromHadoopTable(table.location());
+    List<Record> expectedRecords = 
RandomGenericData.generate(TestFixtures.SCHEMA, 10, 0L);
+    expectedRecords.forEach(expectedRecord -> expectedRecord.set(2, 
"2020-03-20"));
+
+    GenericAppenderHelper helper = new GenericAppenderHelper(table, 
fileFormat, TEMPORARY_FOLDER);
+    DataFile dataFile = helper.writeFile(TestHelpers.Row.of("2020-03-20", 0), 
expectedRecords);
+    helper.appendToTable(dataFile);
+
+    // test sql api
+    Configuration tableConf = getTableEnv().getConfig().getConfiguration();
+    
tableConf.setBoolean(FlinkConfigOptions.TABLE_EXEC_ICEBERG_EXPOSE_SPLIT_LOCALITY_INFO.key(),
 false);
+
+    List<Row> results = sql("select * from t");
+    org.apache.iceberg.flink.TestHelpers.assertRecords(results, 
expectedRecords, TestFixtures.SCHEMA);

Review comment:
       nit: import




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to