asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yingyi Bu (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (ASTERIXDB-1485) NPE when translate one AQL query
Date Fri, 12 Aug 2016 00:17:20 GMT

     [ https://issues.apache.org/jira/browse/ASTERIXDB-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yingyi Bu closed ASTERIXDB-1485.
--------------------------------
    Resolution: Fixed

Added a regression test.

> NPE when translate one AQL query
> --------------------------------
>
>                 Key: ASTERIXDB-1485
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1485
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Optimizer
>         Environment: Master: 
> commit fd1d460da73397de9f44d7b098543f7897844794
> Date:   Wed Jun 15 11:29:36 2016 -0400
>            Reporter: Jianfeng Jia
>            Assignee: Yingyi Bu
>
> AQL is as following
> {code}
> use dataverse twitter
> let $common := (
> for $t in dataset twitter.ds_tweet
> where similarity-jaccard(word-tokens($t."text"), word-tokens("happy")) > 0.0
> and contains($t."text", "hate")
> let $set := [ 72,37,51,24,11,10,34,42,9,44,15,48,35,4,40,6,20,32,8,49,12,22,28,1,13,45,5,47,21,29,54,17,18,39,19,55,26,27,31,56,41,46,16,30,53,38,25,36,50,33,23,2
]
> for $sid in $set
> where $t.geo_tag.stateID = $sid
> where
> ($t."create_at">= datetime("2016-06-15T18:53:42.894Z")
> and $t."create_at" <= datetime("2016-06-15T19:25:11.000Z"))
> return $t
> )
> let $hashtag := (
> for $t in $common
> where not(is-null($t.hashtags))
> for $h in $t.hashtags
> group by $tag := $h with $h
> let $c := count($h)
> order by $c desc
> limit 50
> return { "key": $tag, "count" : $c}
> )
> return $hashtag
> {code}
> ddl can be found [here| https://github.com/ISG-ICS/cloudberry/blob/master/noah/src/main/resources/twitter/aql/ddl.aql]
> The exception is following:
> {code}
> SEVERE: null 
> java.lang.NullPointerException
>     at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:174)
>     at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:153)
>     at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.resolveResultType(TypeComputeUtils.java:84)
>     at org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer.computeType(AbstractResultTypeComputer.java:39)
>     at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getTypeForFunction(AqlExpressionTypeComputer.java:75)
>     at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getType(AqlExpressionTypeComputer.java:53)
>     at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.computeOutputTypeEnvironment(AssignOperator.java:92)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AlgebricksOptimizationContext.computeAndSetTypeEnvironmentForOperator(AlgebricksOptimizationContext.java:295)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:256)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.rewriter.rules.PushSelectDownRule.rewritePre(PushSelectDownRule.java:66)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:90)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:53)
>     at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:95)
>     at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:82)
>     at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:88)
>     at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:263)
>     at org.apache.asterix.aql.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1959)
>     at org.apache.asterix.aql.translator.QueryTranslator.handleQuery(QueryTranslator.java:2521)
>     at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:389)
>     at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:253)
                           
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message