zhangminglei commented on a change in pull request #3186:
URL: https://github.com/apache/iceberg/pull/3186#discussion_r745332886
##########
File path:
spark/v2.4/spark/src/main/java/org/apache/iceberg/spark/source/BaseDataReader.java
##########
@@ -196,4 +198,40 @@ protected static Object convertConstant(Type type, Object
value) {
}
return value;
}
+
+ protected void findMoreCompoundConstants(Schema tableSchema, Map<Integer, ?>
idToConstant) {
+ List<Types.NestedField> columns = tableSchema.columns();
+
+ for (Types.NestedField nestedField : columns) {
+ visitCompoundTypesByDFS(nestedField, (Map<Integer, Object>)
idToConstant);
+ }
+ }
+
+ protected void visitCompoundTypesByDFS(
+ Types.NestedField nestedField,
+ Map<Integer, Object> idToConstant) {
+ switch (nestedField.type().typeId()) {
+ case STRUCT:
Review comment:
This is a good idea for refactoring, thanks.
--
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]