flyrain commented on code in PR #5248:
URL: https://github.com/apache/iceberg/pull/5248#discussion_r925914985
##########
core/src/main/java/org/apache/iceberg/util/PartitionUtil.java:
##########
@@ -39,12 +40,34 @@ private PartitionUtil() {
return constantsMap(task, null, (type, constant) -> constant);
}
+ public static Map<Integer, ?> constantsMap(ContentScanTask task,
BiFunction<Type, Object, Object> convertConstant) {
+ return constantsMapInternal(task, null, convertConstant);
+ }
+
+ /**
+ * @deprecated Replaced by {@link
PartitionUtil#constantsMap(ContentScanTask, BiFunction)}
+ */
+ @Deprecated
public static Map<Integer, ?> constantsMap(FileScanTask task,
BiFunction<Type, Object, Object> convertConstant) {
- return constantsMap(task, null, convertConstant);
+ return constantsMapInternal(task, null, convertConstant);
}
+ /**
+ * @deprecated Replaced by {@link
PartitionUtil#constantsMap(ContentScanTask, Types.StructType, BiFunction)}
+ */
+ @Deprecated
public static Map<Integer, ?> constantsMap(FileScanTask task,
Types.StructType partitionType,
BiFunction<Type, Object, Object>
convertConstant) {
+ return constantsMapInternal(task, partitionType, convertConstant);
+ }
+
+ public static Map<Integer, ?> constantsMap(ContentScanTask task,
Types.StructType partitionType,
+ BiFunction<Type, Object, Object>
convertConstant) {
+ return constantsMapInternal(task, partitionType, convertConstant);
+ }
+
+ private static Map<Integer, ?> constantsMapInternal(ContentScanTask task,
Types.StructType partitionType,
Review Comment:
@aokolnychyi and @szehon-ho are right. We only need to change the type. Will
make the change.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]