jonvex commented on code in PR #10422:
URL: https://github.com/apache/hudi/pull/10422#discussion_r1471420556
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieParquetInputFormat.java:
##########
@@ -91,9 +94,42 @@ private void initAvroInputFormat() {
}
}
+ private static boolean checkIfHudiTable(final InputSplit split, final
JobConf job) {
+ try {
+ Option<Path> tablePathOpt = TablePathUtils.getTablePath(((FileSplit)
split).getPath(), job);
+ if (!tablePathOpt.isPresent()) {
+ return false;
+ }
+ return tablePathOpt.get().getFileSystem(job).exists(new
Path(tablePathOpt.get(), HoodieTableMetaClient.METAFOLDER_NAME));
+ } catch (IOException e) {
+ return false;
+ }
+ }
+
@Override
public RecordReader<NullWritable, ArrayWritable> getRecordReader(final
InputSplit split, final JobConf job,
final
Reporter reporter) throws IOException {
+
+ if (HoodieFileGroupReaderRecordReader.useFilegroupReader(job)) {
+ try {
Review Comment:
https://github.com/apache/hudi/blob/2c38ef740d3d34e9eb05b59fa147c55623b81a90/hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieFileGroupReaderRecordReader.java#L249
I remove the partition fields from the read columns if the parquet file
doesn't contain them. Does that help?
--
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]