cryptoe commented on a change in pull request #12078:
URL: https://github.com/apache/druid/pull/12078#discussion_r781753286



##########
File path: sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java
##########
@@ -128,27 +128,10 @@ public static String escapeStringLiteral(final String s)
   }
 
   /**
-   * Convert {@link RelDataType} to the most appropriate {@link ValueType}, 
coercing all ARRAY types to STRING (until
-   * the time is right and we are more comfortable handling Druid ARRAY types 
in all parts of the engine).
-   *
-   * Callers who are not scared of ARRAY types should isntead call {@link 
#getValueTypeForRelDataTypeFull(RelDataType)},
-   * which returns the most accurate conversion of {@link RelDataType} to 
{@link ValueType}.
+   * Convert {@link RelDataType} to the most appropriate {@link ValueType}}.
    */
   @Nullable
   public static ColumnType getColumnTypeForRelDataType(final RelDataType type)

Review comment:
       Adding a flag in the query Context and take a decision based on that may 
not be trivial as the code will need to be extensively refactored.
   For eg : checkout `RowSignature#fromRelDataType` 
https://github.com/apache/druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/table/RowSignatures.java
   I am not sure if adding changes to a few places where the QueryContext is 
passable and where its not passable, convert to array without honoring the 
flag, has on the query Engine. Especially in the case where the user has set 
the flag and half of the places we are honoring the flag and the other half we 
are not.
   
   Therefore adding a RuntimeProperty in `ExpressionProcessingConfig`
   
   




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