[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:
@@ -91,7 +91,6 @@ public class HoodieHFileRealtimeInputFormat extends HoodieHFileInputFormat {
|
|||||||
// For e:g _hoodie_record_key would be missing and merge step would throw exceptions.
|
// 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
|
// TO fix this, hoodie columns are appended late at the time record-reader gets built instead of construction
|
||||||
// time.
|
// time.
|
||||||
HoodieRealtimeInputFormatUtils.cleanProjectionColumnIds(jobConf);
|
|
||||||
HoodieRealtimeInputFormatUtils.addRequiredProjectionFields(jobConf, Option.empty());
|
HoodieRealtimeInputFormatUtils.addRequiredProjectionFields(jobConf, Option.empty());
|
||||||
|
|
||||||
this.conf = jobConf;
|
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)
|
LOG.info("Creating record reader with readCols :" + jobConf.get(ColumnProjectionUtils.READ_COLUMN_NAMES_CONF_STR)
|
||||||
+ ", Ids :" + jobConf.get(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR));
|
+ ", Ids :" + jobConf.get(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR));
|
||||||
|
|||||||
@@ -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.
|
// 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
|
// TO fix this, hoodie columns are appended late at the time record-reader gets built instead of construction
|
||||||
// time.
|
// time.
|
||||||
HoodieRealtimeInputFormatUtils.cleanProjectionColumnIds(jobConf);
|
|
||||||
if (!realtimeSplit.getDeltaLogPaths().isEmpty()) {
|
if (!realtimeSplit.getDeltaLogPaths().isEmpty()) {
|
||||||
HoodieRealtimeInputFormatUtils.addRequiredProjectionFields(jobConf, realtimeSplit.getHoodieVirtualKeyInfo());
|
HoodieRealtimeInputFormatUtils.addRequiredProjectionFields(jobConf, realtimeSplit.getHoodieVirtualKeyInfo());
|
||||||
}
|
}
|
||||||
@@ -107,6 +106,7 @@ public class HoodieParquetRealtimeInputFormat extends HoodieParquetInputFormat i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
HoodieRealtimeInputFormatUtils.cleanProjectionColumnIds(jobConf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user