You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/01/03 12:39:23 UTC

[GitHub] [druid] LakshSingla commented on a change in pull request #12092: Fix SQL queries for inline datasource with null values

LakshSingla commented on a change in pull request #12092:
URL: https://github.com/apache/druid/pull/12092#discussion_r777452531



##########
File path: sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidLogicalValuesRule.java
##########
@@ -128,6 +128,11 @@ static Object getValueFromLiteral(RexLiteral literal, PlannerContext plannerCont
       case TIMESTAMP:
       case DATE:
         return Calcites.calciteDateTimeLiteralToJoda(literal, plannerContext.getTimeZone()).getMillis();
+      case NULL:

Review comment:
       It seems I mixed up `literal.getType().getSqlTypeName()` and `literal.getSqlTypeName()` when I originally wanted to ask the question. 
   
   In the current modification, instead of returning `null`, should it be `throw new UnsupportedSQLQueryException("%s type is not supported", literal.getType().getSqlTypeName());`, to preserve the original behavior. 




-- 
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: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org