xs:date(...) invokes the cast function. Since cast is not yet implemented, you are seeing this error. I will start to work on adding casting functionality.

On 7/4/12 12:36 PM, Eldon Carman wrote:
So I changed query to be the following:
(xs:date("2004-12-25Z") eq xs:date("2004-12-25+07:00"))

Still does not work. Does the system know how to read the date field?

Plan:
write [%0->$$6] -- |UNPARTITIONED|
   unnest $$6 <- function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}iterate, Args:[%0->$$5] --
|UNPARTITIONED|
     assign [$$5] <- [function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}value-eq,
Args:[function-call: vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call: vxquery:{http://www.w3.org/2005/xpath-functions}data,
Args:[%0->$$2], {http://www.w3.org/2001/XMLSchema}int QUANT_ONE(bytes[5] =
[1d00000002])], function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote, Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[%0->$$4], {
http://www.w3.org/2001/XMLSchema}int QUANT_ONE(bytes[5] = [1d00000002])]]]
-- |UNPARTITIONED|
       assign [$$4] <- [function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}cast, Args:[%0->$$3, {
http://www.w3.org/2001/XMLSchema}int QUANT_ONE(bytes[5] = [1d00000043])]]
-- |UNPARTITIONED|
         assign [$$3] <-
[{http://www.w3.org/2001/XMLSchema}stringQUANT_ONE(bytes[19] =
[040010323030342d31322d32352b30373a3030])] --
|UNPARTITIONED|
           assign [$$2] <- [function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}cast, Args:[%0->$$1, {
http://www.w3.org/2001/XMLSchema}int QUANT_ONE(bytes[5] = [1d00000043])]]
-- |UNPARTITIONED|
             assign [$$1] <-
[{http://www.w3.org/2001/XMLSchema}stringQUANT_ONE(bytes[14] =
[04000b323030342d31322d32355a])] -- |UNPARTITIONED|
               empty-tuple-source -- |UNPARTITIONED|

Error Message:
Exception in thread "main" org.apache.vxquery.exceptions.SystemException:
SYSE0001:
at
org.apache.vxquery.xmlquery.query.XMLQueryCompiler.compile(XMLQueryCompiler.java:127)
at org.apache.vxquery.cli.VXQuery.execute(VXQuery.java:147)
at org.apache.vxquery.cli.VXQuery.main(VXQuery.java:81)
Caused by:
edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException:
org.apache.vxquery.exceptions.SystemException: SYSE0001: [No
IScalarEvaluatorFactory runtime for
{urn:org.apache.vxquery.operators-ext}cast]
at
org.apache.vxquery.compiler.algebricks.VXQueryExpressionRuntimeProvider.createEvaluatorFactory(VXQueryExpressionRuntimeProvider.java:53)
at
edu.uci.ics.hyracks.algebricks.core.algebra.operators.physical.AssignPOperator.contributeRuntimeOperator(AssignPOperator.java:72)
at
edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator.contributeRuntimeOperator(AbstractLogicalOperator.java:158)
at
edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:85)
at
edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:72)
at
edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:72)
at
edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:72)
at
edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:72)
at
edu.uci.ics.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlan(PlanCompiler.java:50)
at
edu.uci.ics.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.createJob(HeuristicCompilerFactoryBuilder.java:93)
at
org.apache.vxquery.xmlquery.query.XMLQueryCompiler.compile(XMLQueryCompiler.java:125)
... 2 more
Caused by: org.apache.vxquery.exceptions.SystemException: SYSE0001: [No
IScalarEvaluatorFactory runtime for
{urn:org.apache.vxquery.operators-ext}cast]
at
org.apache.vxquery.functions.Function.createScalarEvaluatorFactory(Function.java:54)
at
org.apache.vxquery.compiler.algebricks.VXQueryExpressionRuntimeProvider.createEvaluatorFactory(VXQueryExpressionRuntimeProvider.java:51)
... 12 more


On Wed, Jul 4, 2012 at 11:58 AM, Till Westmann <[email protected]> wrote:

The operators in the "op:" namespace cannot be invoked directly. The just
provide the implementation for the comparison operators. So the query
should use an infix "eq" instead of the date-equal operator. (And I hope
that that mapping works correctly right now.)

Cheers,
Till

On Jul 4, 2012, at 11:47 AM, Eldon Carman wrote:

Below is an error I received when attempting to run a query with dates.

XQuery:
op:date-equal(xs:date("2004-12-25Z"), xs:date("2004-12-25+07:00"))

Error Message:
Exception in thread "main" org.apache.vxquery.exceptions.SystemException:
XPST0081: ../../xquery/simple/comparison/eq_date_date.xq (1:1) It is a
static error if a QName used in a query contains a namespace prefix that
cannot be expanded into a namespace URI by using the statically known
namespaces.
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.createQName(XMLQueryTranslator.java:1685)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.createQName(XMLQueryTranslator.java:1674)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.translateFunctionExprNode(XMLQueryTranslator.java:1294)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.translateExpression(XMLQueryTranslator.java:666)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.translatePathExpr(XMLQueryTranslator.java:1441)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.translateExpression(XMLQueryTranslator.java:662)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.translateExpressionList(XMLQueryTranslator.java:1954)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.translateExprNode(XMLQueryTranslator.java:1387)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.translateExpression(XMLQueryTranslator.java:643)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.translateMainModule(XMLQueryTranslator.java:626)
at

org.apache.vxquery.xmlquery.translator.XMLQueryTranslator.translateModule(XMLQueryTranslator.java:253)
at

org.apache.vxquery.xmlquery.query.XMLQueryCompiler.compile(XMLQueryCompiler.java:112)
at org.apache.vxquery.cli.VXQuery.execute(VXQuery.java:147)
at org.apache.vxquery.cli.VXQuery.main(VXQuery.java:81)





Reply via email to