xiarixiaoyao commented on code in PR #3391:
URL: https://github.com/apache/hudi/pull/3391#discussion_r875529666
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieColumnProjectionUtils.java:
##########
@@ -109,4 +109,25 @@ public static List<Pair<String,String>>
getIOColumnNameAndTypes(Configuration co
.collect(Collectors.toList());
}
+ /**
+ * if schema contains timestamp columns, this method is used for
compatibility when there is no timestamp fields
+ * We expect 3 cases to use parquet-avro reader to read timestamp column:
+ * 1. read columns contain timestamp type
+ * 2. no read columns and exists original columns contain timestamp type
+ * 3. no read columns and no original columns, but avro schema contains type
+ */
+ public static boolean supportTimestamp(Configuration conf) {
+ List<String> reads = Arrays.asList(getReadColumnNames(conf));
+ if (reads.isEmpty()) {
+ return getIOColumnTypes(conf).contains("timestamp");
+ }
+ List<String> names = getIOColumns(conf);
+ if (names.isEmpty()) {
+ return true;
Review Comment:
why return true?
--
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]