[
https://issues.apache.org/jira/browse/ASTERIXDB-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15900784#comment-15900784
]
ASF subversion and git services commented on ASTERIXDB-1362:
------------------------------------------------------------
Commit 31d8102aa05259d01012f648e503b849ff913f34 in asterixdb's branch
refs/heads/master from [~sjaco002]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=31d8102 ]
ASTERIXDB-1327, ASTERIXDB-1362 Fixed circle-point intersect function
Change-Id: I2512c73c9dcd593dc7e6690435da67f8086ff0db
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1558
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
BAD: Jenkins <[email protected]>
Reviewed-by: Jianfeng Jia <[email protected]>
> Exception in Spatial-intersect between point and circle
> --------------------------------------------------------
>
> Key: ASTERIXDB-1362
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1362
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: Operators
> Reporter: Jianfeng Jia
> Assignee: Steven Jacobs
>
> It works when a point intersects with a circle but doesn't work reversely.
> The following query will produce the exception.
> {code}
> spatial-intersect(circle("3107.06794511,1079.71664882
> 1000.0"),point("3513.27543563,978.772476107"))
> {code}
> {code}
> java.lang.ArrayIndexOutOfBoundsException: 17
> at
> org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer.getLong(AInt64SerializerDeserializer.java:58)
> at
> org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer.getLongBits(ADoubleSerializerDeserializer.java:61)
> at
> org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer.getDouble(ADoubleSerializerDeserializer.java:57)
> at
> org.apache.asterix.runtime.evaluators.functions.SpatialIntersectDescriptor$2$1.pointInCircle(SpatialIntersectDescriptor.java:186)
> at
> org.apache.asterix.runtime.evaluators.functions.SpatialIntersectDescriptor$2$1.evaluate(SpatialIntersectDescriptor.java:1008)
>
> at
> org.apache.asterix.optimizer.rules.ConstantFoldingRule$ConstantFoldingVisitor.visitScalarFunctionCallExpression(ConstantFoldingRule.java:221)
> at
> org.apache.asterix.optimizer.rules.ConstantFoldingRule$ConstantFoldingVisitor.visitScalarFunctionCallExpression(ConstantFoldingRule.java:153)
> at
> org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> at
> org.apache.asterix.optimizer.rules.ConstantFoldingRule$ConstantFoldingVisitor.transform(ConstantFoldingRule.java:163)
> at
> org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractAssignOperator.acceptExpressionTransform(AbstractAssignOperator.java:67)
> at
> org.apache.asterix.optimizer.rules.ConstantFoldingRule.rewritePost(ConstantFoldingRule.java:150)
> 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:87)
> at
> org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:289)
> {code}
> On the other hand, it returned a valid result if I changed the order of two
> variables as following:
> {code}
>
> spatial-intersect(point("3513.27543563,978.772476107"),circle("3107.06794511,1079.71664882
> 1000.0"))
> {code}
> {code}
> true
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)