1
0

[HUDI-313] bugfix: NPE when select count start from a realtime table with Tez(#3630)

Co-authored-by: dylonyu <dylonyu@tencent.com>
This commit is contained in:
Genmao Yu
2021-11-07 00:16:13 +08:00
committed by GitHub
parent 9a8963d05e
commit f41539a9cb
2 changed files with 2 additions and 2 deletions

View File

@@ -91,7 +91,6 @@ public class HoodieHFileRealtimeInputFormat extends HoodieHFileInputFormat {
// For e:g _hoodie_record_key would be missing and merge step would throw exceptions.
// TO fix this, hoodie columns are appended late at the time record-reader gets built instead of construction
// time.
HoodieRealtimeInputFormatUtils.cleanProjectionColumnIds(jobConf);
HoodieRealtimeInputFormatUtils.addRequiredProjectionFields(jobConf, Option.empty());
this.conf = jobConf;
@@ -99,6 +98,7 @@ public class HoodieHFileRealtimeInputFormat extends HoodieHFileInputFormat {
}
}
}
HoodieRealtimeInputFormatUtils.cleanProjectionColumnIds(jobConf);
LOG.info("Creating record reader with readCols :" + jobConf.get(ColumnProjectionUtils.READ_COLUMN_NAMES_CONF_STR)
+ ", Ids :" + jobConf.get(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR));

View File

@@ -98,7 +98,6 @@ public class HoodieParquetRealtimeInputFormat extends HoodieParquetInputFormat i
// For e:g _hoodie_record_key would be missing and merge step would throw exceptions.
// TO fix this, hoodie columns are appended late at the time record-reader gets built instead of construction
// time.
HoodieRealtimeInputFormatUtils.cleanProjectionColumnIds(jobConf);
if (!realtimeSplit.getDeltaLogPaths().isEmpty()) {
HoodieRealtimeInputFormatUtils.addRequiredProjectionFields(jobConf, realtimeSplit.getHoodieVirtualKeyInfo());
}
@@ -107,6 +106,7 @@ public class HoodieParquetRealtimeInputFormat extends HoodieParquetInputFormat i
}
}
}
HoodieRealtimeInputFormatUtils.cleanProjectionColumnIds(jobConf);
}
@Override