danielcweeks commented on code in PR #12139:
URL: https://github.com/apache/iceberg/pull/12139#discussion_r1941486767


##########
api/src/main/java/org/apache/iceberg/types/GetProjectedIds.java:
##########
@@ -47,7 +47,9 @@ public Set<Integer> struct(Types.StructType struct, 
List<Set<Integer>> fieldResu
 
   @Override
   public Set<Integer> field(Types.NestedField field, Set<Integer> fieldResult) 
{
-    if ((includeStructIds && field.type().isStructType()) || 
field.type().isPrimitiveType()) {
+    if ((includeStructIds && field.type().isStructType())
+        || field.type().isPrimitiveType()
+        || field.type() instanceof Types.VariantType) {

Review Comment:
   Variant is really a new class of type (it's not primitive, really).  I feel 
like we should move this to `Type::isVariantType()` and perform the check 
there.  I'm just concerned that this type of checks will proliferate and be 
less readable.



-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to