You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Dmitry Lychagin (Jira)" <ji...@apache.org> on 2021/11/15 21:39:00 UTC

[jira] [Created] (ASTERIXDB-2986) NullPointerException in ExtractFunctionsFromJoinConditionRule

Dmitry Lychagin created ASTERIXDB-2986:
------------------------------------------

             Summary: NullPointerException in ExtractFunctionsFromJoinConditionRule
                 Key: ASTERIXDB-2986
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2986
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: COMP - Compiler
    Affects Versions: 0.9.7
            Reporter: Dmitry Lychagin
            Assignee: Dmitry Lychagin
             Fix For: 0.9.7


The following query fails with NullPointerException
 {noformat}
drop dataverse test1 if exists;
create dataverse test1;
use test1;
create type DocumentType as open { };
create type MetaType as open { id:string };
create dataset customer(DocumentType) with meta(MetaType) primary key meta().id;
create dataset orders(DocumentType) with meta(MetaType) primary key meta().id;
create dataset lineitem(DocumentType) with meta(MetaType) primary key meta().id;
select count(*)
from orders o, lineitem l, customer c
where tobigint(l.l_orderkey) = o.o_orderkey
and o.o_custkey + l.l_orderkey = c.c_custkey + l.l_orderkey;
{noformat}

Stack trace:
{noformat}
Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.asterix.om.types.IAType.getTypeTag()" because "inputType" is null
	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:206)
	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:185)
	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.resolveResultType(TypeComputeUtils.java:90)
	at org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer.computeType(AbstractResultTypeComputer.java:44)
	at org.apache.asterix.dataflow.data.common.ExpressionTypeComputer.getTypeForFunction(ExpressionTypeComputer.java:70)
	at org.apache.asterix.dataflow.data.common.ExpressionTypeComputer.getType(ExpressionTypeComputer.java:52)
	at org.apache.hyracks.algebricks.core.algebra.typing.AbstractTypeEnvironment.getType(AbstractTypeEnvironment.java:45)
	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.resolveResultType(TypeComputeUtils.java:86)
	at org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer.computeType(AbstractResultTypeComputer.java:44)
	at org.apache.asterix.dataflow.data.common.ExpressionTypeComputer.getTypeForFunction(ExpressionTypeComputer.java:70)
	at org.apache.asterix.dataflow.data.common.ExpressionTypeComputer.getType(ExpressionTypeComputer.java:52)
	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.computeOutputTypeEnvironment(AssignOperator.java:79)
	at org.apache.hyracks.algebricks.core.rewriter.base.AlgebricksOptimizationContext.computeAndSetTypeEnvironmentForOperator(AlgebricksOptimizationContext.java:299)
	at org.apache.hyracks.algebricks.rewriter.rules.ExtractFunctionsFromJoinConditionRule.assignFunctionExpressions(ExtractFunctionsFromJoinConditionRule.java:145)
	at org.apache.hyracks.algebricks.rewriter.rules.ExtractFunctionsFromJoinConditionRule.rewritePost(ExtractFunctionsFromJoinConditionRule.java:83)
{noformat}




--
This message was sent by Atlassian Jira
(v8.20.1#820001)