support for the xs:dateTimeStamp type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Released
|
High
|
Cezar Andrei |
Bug Description
I bumped into the following issue while trying to run the following XQuery 3.0 test:
exists(
Zorba returned:
static error [err:XPST0017]: "xs:dateTimeStamp": function with arity 1 not declared
Looking into the latest F&O Spec for XQuery 3.0 I see that a new type, xs:dateTimeStamp was added for the implementations that "support XSD 1.1".
I have a few questions:
1) should Zorba support the new type, xs:dateTimeStamp?
If so, some function signatures need to be changed, for instance:
Now, in Zorba,
fn:current-
instead of a xs:dateTimeStamp as stated in the http://
2) Should Zorba support constructor functions for xsd types ? Meaning should we add functions like:
fn:unsignedInt($arg as xs:anyAtomicType?) as xs:unsignedInt?
3) There are 2 tests in Zorba( xquery_1_0 and xquery_1_1) that check if all the functions from the fn: namespace of the F&O spec 1.0 and 3.0 are implemented in Zorba.
The problem with these tests is that they only check the function names and their corresponding arities; they do not check if the types of the parameters are correct.
This is the reason why the change in the signature of the fn:current-
IMO we should update these 2 tests to also check the parameter types: one problem I see here is that the introspection module only provides function to get the function name and arity, not the types of the parameters.
Thanks for the help,
Sorin
Related branches
- Markos Zaharioudakis: Approve
- Cezar Andrei: Approve
- Matthias Brantner: Needs Information
-
Diff: 1575 lines (+466/-213)34 files modifiedChangeLog (+8/-7)
include/zorba/store_consts.h (+8/-7)
modules/com/zorba-xquery/www/modules/datetime.xq (+1/-1)
src/api/store_consts.cpp (+2/-1)
src/context/dynamic_context.cpp (+39/-39)
src/context/dynamic_context.h (+5/-5)
src/functions/pregenerated/func_context.cpp (+1/-1)
src/functions/pregenerated/func_datetime.cpp (+1/-1)
src/runtime/datetime/datetime_impl.cpp (+1/-1)
src/runtime/spec/codegen-cpp.xq (+3/-1)
src/runtime/spec/context/context.xml (+1/-1)
src/runtime/spec/datetime/datetime.xml (+1/-1)
src/runtime/spec/mappings.xml (+1/-0)
src/runtime/xqdoc/xqdoc_impl.cpp (+8/-8)
src/store/api/item_factory.h (+48/-4)
src/store/naive/simple_item_factory.cpp (+108/-0)
src/store/naive/simple_item_factory.h (+10/-0)
src/store/naive/store.cpp (+1/-0)
src/types/casting.cpp (+70/-32)
src/types/casting.h (+2/-2)
src/types/root_typemanager.cpp (+98/-93)
src/types/root_typemanager.h (+1/-0)
src/types/schema/schema.cpp (+12/-1)
src/types/typeimpl.cpp (+2/-1)
src/types/typeops.cpp (+1/-0)
src/zorbatypes/datetime.h (+2/-0)
src/zorbatypes/datetime/datetimetype.cpp (+6/-0)
src/zorbatypes/floatimpl.cpp (+3/-0)
src/zorbatypes/schema_types.h (+4/-3)
test/fots/CMakeLists.txt (+11/-0)
test/fots_driver/FOTSZorbaManifest.xml (+2/-2)
test/fots_driver/fots-driver.xq (+1/-1)
test/rbkt/Queries/w3c_known_failures.txt (+2/-0)
test/rbkt/Queries/w3c_known_failures_XQueryX.txt (+2/-0)
Changed in zorba: | |
assignee: | Sorin Marian Nasoi (sorin.marian.nasoi) → Cezar Andrei (cezar-andrei) |
importance: | Undecided → Low |
Changed in zorba: | |
importance: | Medium → High |
Changed in zorba: | |
assignee: | Nicolae Brinza (nbrinza) → Cezar Andrei (cezar-andrei) |
milestone: | 2.8 → 3.0 |
Changed in zorba: | |
milestone: | 3.0 → 2.9 |
tags: | added: hotlist |
Changed in zorba: | |
status: | New → In Progress |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
Sorin, I cannot answer these questions. You should report them in zorba-dev. It's probably Dana who should ultimately answer them. Furthermore, regarding potential implementation of xs:dateTimeStamp, it should be done by the same person who implemented datetime (in src/zorbatypes). This was either you or Nicolae, I don't remember.