clintropolis commented on code in PR #13958:
URL: https://github.com/apache/druid/pull/13958#discussion_r1145496668


##########
sql/src/main/codegen/config.fmpp:
##########
@@ -68,6 +69,7 @@ data: {
       "CLUSTERED"
       "OVERWRITE"
       "PARTITIONED"
+      "VARIANT"

Review Comment:
   this seems stale



##########
sql/src/main/codegen/includes/common.ftl:
##########
@@ -92,3 +92,18 @@ SqlNodeList ClusterItems() :
     return new SqlNodeList(list, s.addAll(list).pos());
   }
 }
+
+SqlTypeNameSpec VariantType() :

Review Comment:
   nit: maybe rename something like `DruidTypePassthrough`?



##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidTypeSystem.java:
##########
@@ -35,6 +35,8 @@ public class DruidTypeSystem implements RelDataTypeSystem
    */
   public static final int DEFAULT_TIMESTAMP_PRECISION = 3;
 
+  public static final String VARIANT_TYPE_NAME = "VARIANT";

Review Comment:
   nit: stale



##########
sql/src/main/java/org/apache/druid/sql/calcite/external/Externals.java:
##########
@@ -242,7 +242,11 @@ private static String convertType(String name, 
SqlDataTypeSpec dataType)
     if (typeName == null || !typeName.isSimple()) {
       throw unsupportedType(name, dataType);
     }
-    SqlTypeName type = SqlTypeName.get(typeName.getSimple());
+    String simpleName = typeName.getSimple();
+    if (StringUtils.toLowerCase(simpleName).startsWith(("complex<"))) {
+      return simpleName;
+    }
+    SqlTypeName type = SqlTypeName.get(simpleName);

Review Comment:
   nit: i know this isn't new, but these variable names are kinda confusing 
which initially had me wondering why we were looking up the type name of the 
type name 😅 but see now that `typeName` is an `SqlIdentifier` and `type` is an 
`SqlTypeName`.



-- 
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]

Reply via email to