You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2016/03/04 20:27:07 UTC

vxquery git commit: VXQUERY-184: fixed the order by translator

Repository: vxquery
Updated Branches:
  refs/heads/master 43852a547 -> bb39a04fc


VXQUERY-184: fixed the order by translator


Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/bb39a04f
Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/bb39a04f
Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/bb39a04f

Branch: refs/heads/master
Commit: bb39a04fc6051c49036e4875d8cec72e2c87a270
Parents: 43852a5
Author: Christina Pavlopoulou <cp...@ucr.edu>
Authored: Thu Mar 3 12:13:50 2016 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Fri Mar 4 11:24:38 2016 -0800

----------------------------------------------------------------------
 .../apache/vxquery/xmlquery/translator/XMLQueryTranslator.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/vxquery/blob/bb39a04f/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java b/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java
index d2ff3da..19ba276 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/translator/XMLQueryTranslator.java
@@ -1076,7 +1076,8 @@ public class XMLQueryTranslator {
                     List<org.apache.hyracks.algebricks.common.utils.Pair<OrderOperator.IOrder, Mutable<ILogicalExpression>>> oExprs = new ArrayList<org.apache.hyracks.algebricks.common.utils.Pair<OrderOperator.IOrder, Mutable<ILogicalExpression>>>();
                     List<String> collations = new ArrayList<String>();
                     for (OrderSpecNode osNode : ocNode.getOrderSpec()) {
-                        ILogicalExpression oExpr = vre(translateExpression(osNode.getExpression(), tCtx));
+                        ILogicalExpression aExpr = data(vre(translateExpression(osNode.getExpression(), tCtx)));
+                        ILogicalExpression oExpr = vre(createAssignment(aExpr, tCtx));
                         OrderOperator.IOrder o = OrderOperator.ASC_ORDER;
                         XQueryConstants.OrderDirection oDir = osNode.getDirection();
                         if (oDir != null) {