deniskuzZ commented on code in PR #6789:
URL: https://github.com/apache/hive/pull/6789#discussion_r4135255082
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java:
##########
@@ -157,16 +155,18 @@ private static <T extends Scan<T, FileScanTask,
CombinedScanTask>> T applyConfig
@Override
public List<InputSplit> getSplits(JobContext context) {
Configuration conf = context.getConfiguration();
- Table table = Optional
- .ofNullable(HiveTableUtil.deserializeTable(conf,
conf.get(InputFormatConfig.TABLE_IDENTIFIER)))
- .orElseGet(() -> {
- Table tbl = Catalogs.loadTable(conf);
- conf.set(InputFormatConfig.TABLE_IDENTIFIER, tbl.name());
- // planning-local conf only (never shipped): for credential-vending
catalogs the loaded
- // table's FileIO carries secrets, which must not reach a serialized
job configuration
- conf.set(InputFormatConfig.SERIALIZED_TABLE_PREFIX + tbl.name(),
SerializationUtil.serializeToBase64(tbl));
- return tbl;
- });
+ String tableIdentifier = conf.get(InputFormatConfig.TABLE_IDENTIFIER);
+ Table table = HiveTableUtil.resolveTableForScanPlanning(conf,
tableIdentifier);
+ String executorTableId = tableIdentifier != null ? tableIdentifier :
table.name();
+ if (tableIdentifier == null) {
Review Comment:
you check tableIdentifier and set executorTableId, that is inconsistent.
maybe drop the executorTableId completely?
--
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]