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] [Assigned] (ASTERIXDB-1270) Apply function on an open type throws "Unsupported type UNION(NULL, [ null: open { id: [ ANY ] } ])"
Date Fri, 11 Mar 2016 19:23:39 GMT

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

Yingyi Bu reassigned ASTERIXDB-1270:
------------------------------------

    Assignee: Yingyi Bu

> Apply function on an open type throws "Unsupported type UNION(NULL, [ null: open {  
id: [ ANY ] }  ])"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1270
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1270
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Functions - AQL, Hyracks
>            Reporter: Wail Alkowaileet
>            Assignee: Yingyi Bu
>
> To reproduce:
> DDL:
> {noformat}
> create dataverse wosDataverse
> use dataverse wosDataverse
> create type wosType as open {
> 	UID: string
> }
> create dataset wos(wosType)
> primary key UID
> {noformat}
> AQL:
> {noformat}
> use dataverse wosDataverse
> let $c := (for $x in dataset wos
> let $id := $x.id
> group by $country := $x.country with $id
> return {"country":$country, "id" : $id})
> return count($c.id)
> {noformat}
> Exception:
> {noformat}
> org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unsupported type
UNION(NULL, [ null: open {
>   id: [ ANY ]
> }
>  ]) for field access expression: function-call: asterix:field-access-by-name, Args:[%0->$$4,
AString: {id}]
> 	at org.apache.asterix.om.typecomputer.impl.NonTaggedFieldAccessByNameResultType.getRecordTypeFromType(NonTaggedFieldAccessByNameResultType.java:97)
> 	at org.apache.asterix.om.typecomputer.impl.NonTaggedFieldAccessByNameResultType.computeType(NonTaggedFieldAccessByNameResultType.java:56)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getTypeForFunction(AqlExpressionTypeComputer.java:86)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getType(AqlExpressionTypeComputer.java:57)
> 	at org.apache.hyracks.algebricks.core.algebra.typing.AbstractTypeEnvironment.getType(AbstractTypeEnvironment.java:45)
> 	at org.apache.asterix.optimizer.rules.typecast.StaticTypeCastUtil.rewriteListExpr(StaticTypeCastUtil.java:103)
> 	at org.apache.asterix.optimizer.rules.IntroduceEnforcedListTypeRule.rewriteExpressions(IntroduceEnforcedListTypeRule.java:91)
> 	at org.apache.asterix.optimizer.rules.IntroduceEnforcedListTypeRule.rewritePost(IntroduceEnforcedListTypeRule.java:80)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:125)
> 	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:100)
> 	at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:291)
> 	at org.apache.asterix.aql.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1900)
> 	at org.apache.asterix.aql.translator.QueryTranslator.handleQuery(QueryTranslator.java:2474)
> 	at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:388)
> 	at org.apache.asterix.api.http.servlet.APIServlet.doPost(APIServlet.java:168)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:228)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:956)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:891)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:353)
> 	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:598)
> 	at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1076)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
> 	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:427)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
> 	at java.lang.Thread.run(Thread.java:745)
> Jan 20, 2016 3:41:45 PM org.apache.asterix.api.http.servlet.APIServlet doPost
> SEVERE: Unsupported type UNION(NULL, [ null: open {
>   id: [ ANY ]
> }
>  ]) for field access expression: function-call: asterix:field-access-by-name, Args:[%0->$$4,
AString: {id}]
> org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unsupported type
UNION(NULL, [ null: open {
>   id: [ ANY ]
> }
>  ]) for field access expression: function-call: asterix:field-access-by-name, Args:[%0->$$4,
AString: {id}]
> 	at org.apache.asterix.om.typecomputer.impl.NonTaggedFieldAccessByNameResultType.getRecordTypeFromType(NonTaggedFieldAccessByNameResultType.java:97)
> 	at org.apache.asterix.om.typecomputer.impl.NonTaggedFieldAccessByNameResultType.computeType(NonTaggedFieldAccessByNameResultType.java:56)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getTypeForFunction(AqlExpressionTypeComputer.java:86)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getType(AqlExpressionTypeComputer.java:57)
> 	at org.apache.hyracks.algebricks.core.algebra.typing.AbstractTypeEnvironment.getType(AbstractTypeEnvironment.java:45)
> 	at org.apache.asterix.optimizer.rules.typecast.StaticTypeCastUtil.rewriteListExpr(StaticTypeCastUtil.java:103)
> 	at org.apache.asterix.optimizer.rules.IntroduceEnforcedListTypeRule.rewriteExpressions(IntroduceEnforcedListTypeRule.java:91)
> 	at org.apache.asterix.optimizer.rules.IntroduceEnforcedListTypeRule.rewritePost(IntroduceEnforcedListTypeRule.java:80)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:125)
> 	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:100)
> 	at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:291)
> 	at org.apache.asterix.aql.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1900)
> 	at org.apache.asterix.aql.translator.QueryTranslator.handleQuery(QueryTranslator.java:2474)
> 	at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:388)
> 	at org.apache.asterix.api.http.servlet.APIServlet.doPost(APIServlet.java:168)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:228)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:956)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:891)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:353)
> 	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:598)
> 	at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1076)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
> 	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:427)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}



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

Mime
View raw message