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

Proposed by Markos Zaharioudakis
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 11014
Merged at revision: 11225
Proposed branch: lp:~zorba-coders/zorba/markos-scratch
Merge into: lp:zorba
Diff against target: 65 lines (+13/-13)
4 files modified
ChangeLog (+3/-13)
src/compiler/expression/expr_type.cpp (+5/-0)
test/rbkt/ExpQueryResults/zorba/gflwor/gflwor06.xml.res (+1/-0)
test/rbkt/Queries/zorba/gflwor/gflwor06.xq (+4/-0)
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+147355@code.launchpad.net

Commit message

Fixed bug in computing the static type of an allowing-empty FOR variable.

Description of the change

Fixed bug in computing the static type of an allowing-empty FOR variable.

To post a comment you must log in.
11014. By Markos Zaharioudakis

Fixed bug in computing the static type of an allowing-empty FOR variable.

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 :

Validation queue job markos-scratch-2013-02-08T12-42-35.017Z 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 'ChangeLog'
2--- ChangeLog 2013-02-03 17:44:39 +0000
3+++ ChangeLog 2013-02-08 12:29:23 +0000
4@@ -10,27 +10,17 @@
5 * Added millis-to-dateTime() function in datetime module.
6
7 Optimizations:
8- * Extended optimization rules for subsequence function (pushing $startingLoc
9- parameter into collection skip if $sourceSeq parameter is from a
10+ * Extended optimization rules for subsequence function (pushing $startingLoc
11+ parameter into collection skip if $sourceSeq parameter is from a
12 collection).
13
14 Bug Fixes/Other Changes:
15 * Fixed bug #1095889 (Improve error message for xml-parsing error).
16 * NaN items are considered equal to each other during grouping
17 * Fixed bug #855481 (Too small time types on Windows).
18-
19-
20-version 2.9
21-
22-Bug Fixes/Other Changes:
23+ * Fixed bug in computing the static type of an allowing-empty FOR variable.
24 * Fixed bug #1099648 and #1088886 (XML parsing failures on Red Hat)
25 * Fixed bug #1099535 (xml:parse endless loop)
26-
27-
28-
29-version 2.9
30-
31-Bug Fixes/Other Changes:
32 * Fixed bug #866958 (Parsing error not explicit enough)
33
34
35
36=== modified file 'src/compiler/expression/expr_type.cpp'
37--- src/compiler/expression/expr_type.cpp 2013-01-29 06:01:31 +0000
38+++ src/compiler/expression/expr_type.cpp 2013-02-08 12:29:23 +0000
39@@ -194,6 +194,11 @@
40 if (varKind == var_expr::for_var)
41 {
42 derivedType = TypeOps::prime_type(tm, *domainType);
43+
44+ if (e->get_forlet_clause()->is_allowing_empty())
45+ {
46+ derivedType = tm->create_type(*derivedType, TypeConstants::QUANT_QUESTION);
47+ }
48 }
49 else if (varKind == var_expr::wincond_in_var ||
50 varKind == var_expr::wincond_out_var)
51
52=== added file 'test/rbkt/ExpQueryResults/zorba/gflwor/gflwor06.xml.res'
53--- test/rbkt/ExpQueryResults/zorba/gflwor/gflwor06.xml.res 1970-01-01 00:00:00 +0000
54+++ test/rbkt/ExpQueryResults/zorba/gflwor/gflwor06.xml.res 2013-02-08 12:29:23 +0000
55@@ -0,0 +1,1 @@
56+0
57
58=== added file 'test/rbkt/Queries/zorba/gflwor/gflwor06.xq'
59--- test/rbkt/Queries/zorba/gflwor/gflwor06.xq 1970-01-01 00:00:00 +0000
60+++ test/rbkt/Queries/zorba/gflwor/gflwor06.xq 2013-02-08 12:29:23 +0000
61@@ -0,0 +1,4 @@
62+declare variable $doc := <a/>;
63+
64+for $x allowing empty in $doc/foo
65+return count($x)

Subscribers

People subscribed via source and target branches