difin commented on code in PR #4645:
URL: https://github.com/apache/hive/pull/4645#discussion_r1315016433


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java:
##########
@@ -201,6 +200,15 @@ public List<InputSplit> getSplits(JobContext context) {
         .ofNullable(HiveIcebergStorageHandler.table(conf, 
conf.get(InputFormatConfig.TABLE_IDENTIFIER)))
         .orElseGet(() -> Catalogs.loadTable(conf));
 
+    if (conf.get(InputFormatConfig.TABLE_IDENTIFIER) == null) {
+      conf.set(InputFormatConfig.TABLE_IDENTIFIER, table.name());
+    }
+
+    if (conf.get(InputFormatConfig.SERIALIZED_TABLE_PREFIX + 
conf.get(InputFormatConfig.TABLE_IDENTIFIER)) == null) {
+      conf.set(InputFormatConfig.SERIALIZED_TABLE_PREFIX + 
conf.get(InputFormatConfig.TABLE_IDENTIFIER),

Review Comment:
   - Conf contained serialized Iceberg table even before these change. All 
q-tests besides one were passing after removing the serialized table from 
splits and without adding serialized table to conf because it was already 
there. So these changes actually do not increase memory usage anywhere, but 
strictly decrease, because serialized table is removed from the splits.
   
   - One q-test that was failing was show_partitions_test.q. It was failing 
because it is doing select from _table.**partitions**._ 
   
   - There were 2 unit test classes (not q-tests) that were failing because 
serialized table wasn't in conf, but it is something that was present only in 
unit tests.
   
   For these 2 edge cases, I added serialized table into conf in 
`IcebergInputFormat.getSplits()`.
   



-- 
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