danny0405 commented on code in PR #7355:
URL: https://github.com/apache/hudi/pull/7355#discussion_r1183441571
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HoodieRealtimeInputFormatUtils.java:
##########
@@ -84,6 +84,18 @@ private static Configuration
addProjectionField(Configuration conf, String field
return conf;
}
+ public static void addProjectionField(Configuration conf, Option<String[]>
fieldName) {
+ if (fieldName.isPresent()) {
+ List<String> columnNameList =
Arrays.stream(conf.get(serdeConstants.LIST_COLUMNS).split(",")).collect(Collectors.toList());
+ Arrays.stream(fieldName.get()).forEach(field -> {
Review Comment:
Can you explain what this value represents
```java
conf.get(serdeConstants.LIST_COLUMNS
```
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieParquetInputFormat.java:
##########
@@ -84,6 +90,13 @@ public RecordReader<NullWritable, ArrayWritable>
getRecordReader(final InputSpli
LOG.debug("EMPLOYING DEFAULT RECORD READER - " + split);
}
+ Path inputPath = ((FileSplit)split).getPath();
+ FileSystem fs = inputPath.getFileSystem(job);
+ Option<Path> tablePath = TablePathUtils.getTablePath(fs, inputPath);
+ HoodieTableMetaClient metaClient =
HoodieTableMetaClient.builder().setConf(job).setBasePath(tablePath.get().toString()).build();
Review Comment:
Does this code work here:
```java
HoodieTableMetaClient metaClient =
HoodieTableMetaClient.builder().setConf(jobConf).setBasePath(realtimeSplit.getBasePath()).build();
```
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HoodieRealtimeRecordReaderUtils.java:
##########
@@ -257,10 +257,8 @@ public static List<String> orderFields(String
fieldNameCsv, String fieldOrderCsv
String[] fieldOrdersWithDups = fieldOrderCsv.isEmpty() ? new String[0] :
fieldOrderCsv.split(",");
Set<String> fieldOrdersSet = new
LinkedHashSet<>(Arrays.asList(fieldOrdersWithDups));
String[] fieldOrders = fieldOrdersSet.toArray(new String[0]);
- List<String> fieldNames = fieldNameCsv.isEmpty() ? new ArrayList<>() :
Arrays.stream(fieldNameCsv.split(","))
- .filter(fn ->
!partitioningFields.contains(fn)).collect(Collectors.toList());
+ List<String> fieldNames = fieldNameCsv.isEmpty() ? new ArrayList<>() :
Arrays.stream(fieldNameCsv.split(",")).collect(Collectors.toList());
Review Comment:
Does the removal of partition fiels affect the behavior of Hive 2.x?
--
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]