[ 
https://issues.apache.org/jira/browse/VXQUERY-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14949155#comment-14949155
 ] 

Preston Carman commented on VXQUERY-107:
----------------------------------------

Has this been resolved?

> Node is not treated as a string after step (example)
> ----------------------------------------------------
>
>                 Key: VXQUERY-107
>                 URL: https://issues.apache.org/jira/browse/VXQUERY-107
>             Project: VXQuery
>          Issue Type: Bug
>            Reporter: Preston Carman
>            Assignee: Preston Carman
>
> Saxon does process the query with out the fn:data. Currently, VXQuery throws 
> an error. The issue is "xs:decimal($r/value)" in the following query causes 
> the error below. If a data function is added, the query executes normally 
> "xs:decimal(fn:data($r/value))".
>  let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
>  for $r in collection($collection)/dataCollection/data
> where $r/dataType eq "AWND" and xs:decimal($r/value) gt 491.744
> Exception in thread "main"
> edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException:
> org.apache.vxquery.exceptions.SystemException: XPTY0004: It is a type error 
> if,
> during the static analysis phase, an expression is found to have a static type
> that is not appropriate for the context in which the expression occurs, or
> during the dynamic evaluation phase, the dynamic type of a value does not 
> match
> a required type as specified by the matching rules in 2.5.4 SequenceType
> Matching.
>       at
> edu.uci.ics.hyracks.client.dataset.HyracksDatasetReader.read(HyracksDatasetReader.java:148)
>       at org.apache.vxquery.cli.VXQuery.runJob(VXQuery.java:324)
>       at org.apache.vxquery.cli.VXQuery.runQueries(VXQuery.java:273)
>       at org.apache.vxquery.cli.VXQuery.execute(VXQuery.java:149)
>       at org.apache.vxquery.cli.VXQuery.main(VXQuery.java:118)
> Caused by: edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException:
> org.apache.vxquery.exceptions.SystemException: XPTY0004: It is a type error 
> if,
> during the static analysis phase, an expression is found to have a static type
> that is not appropriate for the context in which the expression occurs, or
> during the dynamic evaluation phase, the dynamic type of a value does not 
> match
> a required type as specified by the matching rules in 2.5.4 SequenceType
> Matching.
>       at
> edu.uci.ics.hyracks.control.cc.dataset.DatasetDirectoryService.updatedRecords(DatasetDirectoryService.java:222)
>       at
> edu.uci.ics.hyracks.control.cc.dataset.DatasetDirectoryService.getResultPartitionLocations(DatasetDirectoryService.java:167)
>       at
> edu.uci.ics.hyracks.control.cc.work.GetResultPartitionLocationsWork$1.run(GetResultPartitionLocationsWork.java:53)
>       at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:744)
> Caused by: edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException:
> org.apache.vxquery.exceptions.SystemException: XPTY0004: It is a type error 
> if,
> during the static analysis phase, an expression is found to have a static type
> that is not appropriate for the context in which the expression occurs, or
> during the dynamic evaluation phase, the dynamic type of a value does not 
> match
> a required type as specified by the matching rules in 2.5.4 SequenceType
> Matching.
>       at
> edu.uci.ics.hyracks.control.common.utils.ExceptionUtils.setNodeIds(ExceptionUtils.java:41)
>       at edu.uci.ics.hyracks.control.nc.Task.run(Task.java:291)
>       ... 3 more
> Caused by: edu.uci.ics.hyracks.api.exceptions.HyracksDataException:
> edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException:
> org.apache.vxquery.exceptions.SystemException: XPTY0004: It is a type error 
> if,
> during the static analysis phase, an expression is found to have a static type
> that is not appropriate for the context in which the expression occurs, or
> during the dynamic evaluation phase, the dynamic type of a value does not 
> match
> a required type as specified by the matching rules in 2.5.4 SequenceType
> Matching.
>       at
> edu.uci.ics.hyracks.algebricks.runtime.operators.std.StreamSelectRuntimeFactory$1.nextFrame(StreamSelectRuntimeFactory.java:85)
>       at
> edu.uci.ics.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperatorDescriptor$2.nextFrame(AlgebricksMetaOperatorDescriptor.java:136)
>       at
> edu.uci.ics.hyracks.dataflow.common.comm.util.FrameUtils.flushFrame(FrameUtils.java:38)
>       at
> org.apache.vxquery.metadata.VXQueryCollectionOperatorDescriptor$1.addNodeToTuple(VXQueryCollectionOperatorDescriptor.java:176)
>       at
> org.apache.vxquery.metadata.VXQueryCollectionOperatorDescriptor$1.processChildStep(VXQueryCollectionOperatorDescriptor.java:156)
>       at
> org.apache.vxquery.metadata.VXQueryCollectionOperatorDescriptor$1.addNextXmlNode(VXQueryCollectionOperatorDescriptor.java:141)
>       at
> org.apache.vxquery.metadata.VXQueryCollectionOperatorDescriptor$1.nextFrame(VXQueryCollectionOperatorDescriptor.java:108)
>       at
> edu.uci.ics.hyracks.dataflow.common.comm.util.FrameUtils.flushFrame(FrameUtils.java:38)
>       at
> edu.uci.ics.hyracks.algebricks.runtime.operators.std.EmptyTupleSourceRuntimeFactory$1.open(EmptyTupleSourceRuntimeFactory.java:55)
>       at
> edu.uci.ics.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperatorDescriptor$1.initialize(AlgebricksMetaOperatorDescriptor.java:104)
>       at
> edu.uci.ics.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.initialize(SuperActivityOperatorNodePushable.java:81)
>       at edu.uci.ics.hyracks.control.nc.Task.run(Task.java:234)
>       ... 3 more
> Caused by: 
> edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException:
> org.apache.vxquery.exceptions.SystemException: XPTY0004: It is a type error 
> if,
> during the static analysis phase, an expression is found to have a static type
> that is not appropriate for the context in which the expression occurs, or
> during the dynamic evaluation phase, the dynamic type of a value does not 
> match
> a required type as specified by the matching rules in 2.5.4 SequenceType
> Matching.
>       at
> org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentScalarEvaluator.evaluate(AbstractTaggedValueArgumentScalarEvaluator.java:52)
>       at
> org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentScalarEvaluator.evaluate(AbstractTaggedValueArgumentScalarEvaluator.java:47)
>       at
> org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentScalarEvaluator.evaluate(AbstractTaggedValueArgumentScalarEvaluator.java:47)
>       at
> org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentScalarEvaluator.evaluate(AbstractTaggedValueArgumentScalarEvaluator.java:47)
>       at
> org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentScalarEvaluator.evaluate(AbstractTaggedValueArgumentScalarEvaluator.java:47)
>       at
> edu.uci.ics.hyracks.algebricks.runtime.operators.std.StreamSelectRuntimeFactory$1.nextFrame(StreamSelectRuntimeFactory.java:83)
>       ... 14 more
> Caused by: org.apache.vxquery.exceptions.SystemException: XPTY0004: It is a 
> type
> error if, during the static analysis phase, an expression is found to have a
> static type that is not appropriate for the context in which the expression
> occurs, or during the dynamic evaluation phase, the dynamic type of a value 
> does
> not match a required type as specified by the matching rules in 2.5.4
> SequenceType Matching.
>       at
> org.apache.vxquery.runtime.functions.cast.CastScalarEvaluatorFactory$1.evaluate(CastScalarEvaluatorFactory.java:337)
>       at
> org.apache.vxquery.runtime.functions.type.AbstractTypeScalarEvaluatorFactory$AbstractTypeScalarEvaluator.evaluate(AbstractTypeScalarEvaluatorFactory.java:70)
>       at
> org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentScalarEvaluator.evaluate(AbstractTaggedValueArgumentScalarEvaluator.java:50)
>       ... 19 more



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

Reply via email to