Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba

Proposed by Markos Zaharioudakis
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 11101
Merged at revision: 11436
Proposed branch: lp:~zorba-coders/zorba/markos-scratch
Merge into: lp:zorba
Diff against target: 76 lines (+15/-14)
3 files modified
src/compiler/expression/expr_type.cpp (+14/-6)
src/compiler/translator/translator.cpp (+1/-6)
test/fots/CMakeLists.txt (+0/-2)
To merge this branch: bzr merge lp:~zorba-coders/zorba/markos-scratch
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Review via email: mp+162562@code.launchpad.net

Commit message

small fix in deciding statically between json navigation vs dynamic function invocation

Description of the change

small fix in deciding statically between json navigation vs dynamic function invocation

To post a comment you must log in.
Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job markos-scratch-2013-05-06T05-50-54.749Z is finished.
  The final status was:

  2 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

11101. By Markos Zaharioudakis

small fix in deciding statically between json navigation vs dynamic function invocation

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job markos-scratch-2013-05-06T08-56-54.933Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/compiler/expression/expr_type.cpp'
2--- src/compiler/expression/expr_type.cpp 2013-04-24 01:35:58 +0000
3+++ src/compiler/expression/expr_type.cpp 2013-05-06 08:50:35 +0000
4@@ -194,7 +194,10 @@
5
6 if (varKind == var_expr::for_var)
7 {
8- derivedType = TypeOps::prime_type(tm, *domainType);
9+ if (domainType->type_kind() == XQType::EMPTY_KIND)
10+ derivedType = rtm.ITEM_TYPE_ONE;
11+ else
12+ derivedType = TypeOps::prime_type(tm, *domainType);
13
14 if (e->get_forlet_clause()->is_allowing_empty())
15 {
16@@ -304,11 +307,7 @@
17 {
18 newType = sourceType;
19 }
20- else if (sourceType->type_kind() != XQType::NODE_TYPE_KIND)
21- {
22- throw XQUERY_EXCEPTION(err::XPTY0020, ERROR_LOC(get_loc()));
23- }
24- else
25+ else if (sourceType->type_kind() == XQType::NODE_TYPE_KIND)
26 {
27 xqtref_t stepType = sourceType;
28
29@@ -323,6 +322,15 @@
30
31 newType = stepType.getp();
32 }
33+ else if (sourceType->type_kind() == XQType::ITEM_KIND)
34+ {
35+ // TODO: improve this
36+ newType = rtm.ANY_NODE_TYPE_STAR;
37+ }
38+ else
39+ {
40+ throw XQUERY_EXCEPTION(err::XPTY0020, ERROR_LOC(get_loc()));
41+ }
42 }
43 break;
44 }
45
46=== modified file 'src/compiler/translator/translator.cpp'
47--- src/compiler/translator/translator.cpp 2013-05-05 04:49:50 +0000
48+++ src/compiler/translator/translator.cpp 2013-05-06 08:50:35 +0000
49@@ -12200,13 +12200,8 @@
50 TypeManager* tm = sourceExpr->get_type_manager();
51 xqtref_t srcType = sourceExpr->get_return_type();
52
53- if (TypeOps::is_subtype(tm, *srcType, *theRTM.JSON_ITEM_TYPE_STAR))
54+ if (TypeOps::is_subtype(tm, *srcType, *theRTM.JSON_ITEM_TYPE_STAR) && numArgs <= 1)
55 {
56- if (numArgs > 1)
57- {
58- RAISE_ERROR_NO_PARAMS(jerr::JNTY0018, loc);
59- }
60-
61 function* func;
62 expr* accessorExpr;
63
64
65=== modified file 'test/fots/CMakeLists.txt'
66--- test/fots/CMakeLists.txt 2013-05-05 16:23:49 +0000
67+++ test/fots/CMakeLists.txt 2013-05-06 08:50:35 +0000
68@@ -310,8 +310,6 @@
69 EXPECTED_FOTS_FAILURE (prod-OrderByClause orderBy50 0)
70 EXPECTED_FOTS_FAILURE (prod-OrderByClause orderBy51 0)
71 EXPECTED_FOTS_FAILURE (prod-OrderByClause orderBy59 0)
72-EXPECTED_FOTS_FAILURE (prod-RequireProhibitFeature require-higher-order-function-5-s 1171860)
73-EXPECTED_FOTS_FAILURE (prod-RequireProhibitFeature require-higher-order-function-10-s 1171860)
74 EXPECTED_FOTS_FAILURE (prod-SchemaImport qischema031 0)
75 EXPECTED_FOTS_FAILURE (prod-SchemaImport qischema040 1175741)
76 EXPECTED_FOTS_FAILURE (prod-SchemaImport qischema040a 1175741)

Subscribers

People subscribed via source and target branches