Merge lp:~zorba-coders/zorba/zorba-xqxq-url-resolver into lp:zorba

Proposed by Juan Zacarias
Status: Rejected
Rejected by: Chris Hillery
Proposed branch: lp:~zorba-coders/zorba/zorba-xqxq-url-resolver
Merge into: lp:zorba
Diff against target: 34 lines (+16/-3)
1 file modified
src/runtime/core/fncall_iterator.cpp (+16/-3)
To merge this branch: bzr merge lp:~zorba-coders/zorba/zorba-xqxq-url-resolver
Reviewer Review Type Date Requested Status
Chris Hillery Disapprove
Matthias Brantner Needs Information
Sorin Marian Nasoi Approve
Review via email: mp+123602@code.launchpad.net

Commit message

Change for bug903797:
Change to make zorba give the current query's StaticContext when xqxq:prepare-main-module is called.

To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) wrote :

It's an ugly hack, for sure, but I don't see a better alternative without backwards-incompatible API changes. I'll file a new bug for a better solution in 3.0.

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 zorba-xqxq-url-resolver-2012-10-18T06-48-00.823Z is finished. The final status was:

All tests succeeded!

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

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) :
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 zorba-xqxq-url-resolver-2012-10-18T09-14-46.434Z is finished. The final status was:

All tests succeeded!

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

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 2 Approve, 1 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

I would really like to avoid this special case and the string comparison on the function call. What about using a function annotation?

review: Needs Information
Revision history for this message
Chris Hillery (ceejatec) wrote :

No longer needed with HOF-based XQXQ implementation.

review: Disapprove

Unmerged revisions

11003. By Chris Hillery

Merge from trunk.

11002. By Juan Zacarias

Change to make the StaticContext available for xqxq:prepare-main-module for bug 903797

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/runtime/core/fncall_iterator.cpp'
2--- src/runtime/core/fncall_iterator.cpp 2012-09-19 21:16:15 +0000
3+++ src/runtime/core/fncall_iterator.cpp 2012-10-18 01:12:20 +0000
4@@ -770,14 +770,27 @@
5 lNonePureFct = dynamic_cast<const ContextualExternalFunction*>(theFunction);
6 ZORBA_ASSERT(lNonePureFct);
7
8+ // Fix for feature request bug#903797
9+ // Remove conditioning when HOFs available and the implementation
10+ // of url-resolver in xqxq is changed.
11+ static_context* lContext;
12+ if (theFunction->getLocalName() == "prepare-main-module")
13+ {
14+ lContext = theSctx;
15+ }
16+ else
17+ {
18+ lContext = theModuleSctx;
19+ }
20+ // replace parameter lContext for theModuleSctx when bug#903797 condition
21+ // is removed.
22+
23 // The planState.theQuery maybe null, e.g. in the case of constant-folding
24 // of global variable expressions
25-
26- StaticContextImpl theSctxWrapper(theModuleSctx,
27+ StaticContextImpl theSctxWrapper(lContext,
28 (planState.theQuery == NULL?
29 NULL :
30 planState.theQuery->getRegisteredDiagnosticHandlerNoSync()));
31-
32 DynamicContextImpl theDctxWrapper(NULL,
33 planState.theGlobalDynCtx,
34 theModuleSctx);

Subscribers

People subscribed via source and target branches