Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2883

SELECT udf(null); hangs forever in optimization

    XMLWordPrintableJSON

Details

    Description

      Running an external UDF with a constant null argument seems to get stuck forever in optimization.

      Stack from optimizer:

      "QueryTranslator:b5adbd21-1d31-429e-a42d-c8fa80d67902@8514" prio=10 tid=0x8a nid=NA runnable
        java.lang.Thread.State: RUNNABLE
      	  at org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression.cloneArguments(AbstractFunctionCallExpression.java:91)
      	  at org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression.cloneExpression(ScalarFunctionCallExpression.java:46)
      	  at org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression.cloneExpression(ScalarFunctionCallExpression.java:29)
      	  at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule.removeCommonExpressions(ExtractCommonExpressionsRule.java:191)
      	  at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule.removeCommonExpressions(ExtractCommonExpressionsRule.java:165)
      	  at org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonExpressionsRule.rewritePre(ExtractCommonExpressionsRule.java:113)
      	  at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:78)
      	  at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:91)
      	  at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:52)
      	  at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:91)
      	  at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runLogicalOptimizationSets(HeuristicOptimizer.java:82)
      	  at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:63)
      	  at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:94)
      	  at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:266)
      	  at org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:2917)
      	  at org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$3(QueryTranslator.java:3422)
      	  at org.apache.asterix.app.translator.QueryTranslator$$Lambda$585.9901947.compile(Unknown Source:-1)
      	  at org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(QueryTranslator.java:3555)
      	  at org.apache.asterix.app.translator.QueryTranslator.deliverResult(QueryTranslator.java:3459)
      	  at org.apache.asterix.app.translator.QueryTranslator.handleQuery(QueryTranslator.java:3438)
      	  at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:444)
      

      Attachments

        Activity

          People

            dlychagin-cb Dmitry Lychagin
            lukeren Luke Ren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: