You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "slim bouguerra (JIRA)" <ji...@apache.org> on 2018/03/20 04:08:00 UTC
[jira] [Created] (HIVE-18996) SubString Druid convertor assuming
that index is always constant literal value
slim bouguerra created HIVE-18996:
-------------------------------------
Summary: SubString Druid convertor assuming that index is always constant literal value
Key: HIVE-18996
URL: https://issues.apache.org/jira/browse/HIVE-18996
Project: Hive
Issue Type: Bug
Reporter: slim bouguerra
Query like the following
{code}
SELECT substring(namespace, CAST(deleted AS INT), 4)
FROM druid_table_1;
{code}
will fail with
{code}
java.lang.AssertionError: not a literal: $13
at org.apache.calcite.rex.RexLiteral.findValue(RexLiteral.java:963)
at org.apache.calcite.rex.RexLiteral.findValue(RexLiteral.java:955)
at org.apache.calcite.rex.RexLiteral.intValue(RexLiteral.java:938)
at org.apache.calcite.adapter.druid.SubstringOperatorConversion.toDruidExpression(SubstringOperatorConversion.java:46)
at org.apache.calcite.adapter.druid.DruidExpressions.toDruidExpression(DruidExpressions.java:120)
at org.apache.calcite.adapter.druid.DruidQuery.computeProjectAsScan(DruidQuery.java:746)
at org.apache.calcite.adapter.druid.DruidRules$DruidProjectRule.onMatch(DruidRules.java:308)
at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:317)
{code}
because is assuming that index is always a constant literal.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)