You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "xicm (via GitHub)" <gi...@apache.org> on 2023/03/07 01:33:22 UTC

[GitHub] [hudi] xicm commented on a diff in pull request #7355: [HUDI-5308] Hive query returns null when the where clause has a partition field

xicm commented on code in PR #7355:
URL: https://github.com/apache/hudi/pull/7355#discussion_r1049461270


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/HoodieParquetRealtimeInputFormat.java:
##########
@@ -69,6 +69,8 @@ public RecordReader<NullWritable, ArrayWritable> getRecordReader(final InputSpli
     HoodieTableMetaClient metaClient = HoodieTableMetaClient.builder().setConf(jobConf).setBasePath(realtimeSplit.getBasePath()).build();
     HoodieTableConfig tableConfig = metaClient.getTableConfig();
     addProjectionToJobConf(realtimeSplit, jobConf, metaClient.getTableConfig().getPreCombineField());
+    // add partition fields to hive job conf
+    HoodieRealtimeInputFormatUtils.addProjectionField(jobConf, metaClient.getTableConfig().getPartitionFields());

Review Comment:
   The root cause of this issue is we add partition fields to parquet file, while parquet file of hive doesn't, 
   the problem may be solved by hive via https://github.com/apache/hive/pull/3742.



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org