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 changes and all
q-tests besides one were passing without adding serialized table to conf. So
these changes actually do not increase memory usage anywhere, but just
decrease, because 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]