codehaus


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (CALCITE-2739) NPE will thrown if the MEASURES statement contains IN in MATCH_RECOGNIZE


Dian Fu created CALCITE-2739:
--------------------------------

             Summary: NPE will thrown if the MEASURES statement contains IN in MATCH_RECOGNIZE
                 Key: CALCITE-2739
                 URL: https://issues.apache.org/jira/browse/CALCITE-2739
             Project: Calcite
          Issue Type: Bug
          Components: core
            Reporter: Dian Fu
            Assignee: Julian Hyde


For the following query:
{code:java}
select *
from emp
match_recognize(
  partition by job, sal
  order by job asc, sal desc, empno
  pattern (strt down+ up+)
  define
   down as down.mgr in (0, 1),
   up as up.mgr > prev(up.mgr)
) as mr";
{code}
the following exception will be thrown:
{code:java}
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4495)
at org.apache.calcite.sql2rel.StandardConvertletTable.lambda$new$9(StandardConvertletTable.java:204)
at org.apache.calcite.sql2rel.SqlNodeToRexConverterImpl.convertCall(SqlNodeToRexConverterImpl.java:63)
at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4673)
at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:3978)
at org.apache.calcite.sql.SqlCall.accept(SqlCall.java:138)
at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4542)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertMatchRecognize(SqlToRelConverter.java:2261)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:1954)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:1959)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:644)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:625)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3065)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:561)
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)