Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ public RecordReader<NullWritable, ArrayWritable> getRecordReader(final InputSpli
// 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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move cleanProjectionColumnIds out of this if as hive.io.file.readcolumn.ids could be reset with a wrong value, like ',2,0,1'.

HoodieRealtimeInputFormatUtils.addRequiredProjectionFields(jobConf, Option.empty());

this.conf = jobConf;
this.conf.set(HoodieInputFormatUtils.HOODIE_READ_COLUMNS_PROP, "true");
}
}
}
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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ void addProjectionToJobConf(final RealtimeSplit realtimeSplit, final JobConf job
// 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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

if (!realtimeSplit.getDeltaLogPaths().isEmpty()) {
HoodieRealtimeInputFormatUtils.addRequiredProjectionFields(jobConf, realtimeSplit.getHoodieVirtualKeyInfo());
}
Expand All @@ -107,6 +106,7 @@ void addProjectionToJobConf(final RealtimeSplit realtimeSplit, final JobConf job
}
}
}
HoodieRealtimeInputFormatUtils.cleanProjectionColumnIds(jobConf);
}

@Override
Expand Down