asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject [07/50] [abbrv] asterixdb git commit: new annontations.
Date Mon, 17 Oct 2016 19:54:57 GMT
new annontations.


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

Branch: refs/heads/ecarm002/interval_join_merge
Commit: ff7904def80ec75e0979e25e4f901dded8e7d7f1
Parents: 22d1dbc
Author: Preston Carman <prestonc@apache.org>
Authored: Fri Jul 8 16:31:05 2016 -0700
Committer: Preston Carman <prestonc@apache.org>
Committed: Fri Jul 8 16:31:05 2016 -0700

----------------------------------------------------------------------
 .../IntervalJoinExpressionAnnotation.java       | 21 +++++++++++---------
 .../asterix-lang-aql/src/main/javacc/AQL.jj     |  2 +-
 2 files changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ff7904de/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/IntervalJoinExpressionAnnotation.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/IntervalJoinExpressionAnnotation.java
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/IntervalJoinExpressionAnnotation.java
index 7d4f02a..93f5990 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/IntervalJoinExpressionAnnotation.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/IntervalJoinExpressionAnnotation.java
@@ -54,15 +54,18 @@ public class IntervalJoinExpressionAnnotation extends AbstractExpressionAnnotati
     }
 
     private void parseHint() {
-        String[] args = ((String) object).split(" ");
-        setJoinType(args[0]);
-
-        if (joinType.equals(PARTITION_HINT_STRING) && args.length == 7) {
-            leftRecordCount = Long.valueOf(args[2]);
-            rightRecordCount = Long.valueOf(args[3]);
-            leftMaxDuration = Long.valueOf(args[4]);
-            rightMaxDuration = Long.valueOf(args[5]);
-            tuplesPerFrame = Integer.valueOf(args[6]);
+        String hint = (String) object;
+        setJoinType(hint);
+
+        hint = hint.substring(hint.indexOf(']', 0) + 2);
+        String[] args = hint.split(" ");
+
+        if (joinType.equals(PARTITION_HINT_STRING) && args.length == 5) {
+            leftRecordCount = Long.valueOf(args[0]);
+            rightRecordCount = Long.valueOf(args[1]);
+            leftMaxDuration = Long.valueOf(args[2]);
+            rightMaxDuration = Long.valueOf(args[3]);
+            tuplesPerFrame = Integer.valueOf(args[4]);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ff7904de/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
index bbba41d..9eaccf7 100644
--- a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
+++ b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
@@ -2313,7 +2313,7 @@ Clause OrderbyClause()throws ParseException :
           }
           if (hint.startsWith(RANGE_HINT)) {
             try{
-              oc.setRangeMap(RangeMapBuilder.parseHint(hint.substring(RANGE_HINT.length())));
+              oc.setRangeMap(RangeMapBuilder.parseHint(hint.substring(RANGE_HINT.length(),
hint.indexOf(']', 0) + 1)));
             } catch (AsterixException e) {
               throw new ParseException(e.getMessage());
             }


Mime
View raw message