drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansi...@apache.org
Subject [1/2] drill git commit: DRILL-3654: FIRST_VALUE(<char-column>/<varchar-column>) returns IOB Exception
Date Mon, 24 Aug 2015 22:43:28 GMT
Repository: drill
Updated Branches:
  refs/heads/master c5f1bbbb1 -> 18ce02166


DRILL-3654: FIRST_VALUE(<char-column>/<varchar-column>) returns IOB Exception


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

Branch: refs/heads/master
Commit: a29129cd26f034bd22ddbcfd9445eeb493e7e78a
Parents: c5f1bbb
Author: adeneche <adeneche@gmail.com>
Authored: Mon Aug 17 14:23:55 2015 -0700
Committer: Aman Sinha <asinha@maprtech.com>
Committed: Mon Aug 24 13:52:44 2015 -0700

----------------------------------------------------------------------
 .../drill/exec/physical/impl/window/DefaultFrameTemplate.java   | 4 ++--
 .../apache/drill/exec/physical/impl/window/TestWindowFrame.java | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/a29129cd/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/window/DefaultFrameTemplate.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/window/DefaultFrameTemplate.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/window/DefaultFrameTemplate.java
index 83e3754..b56e421 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/window/DefaultFrameTemplate.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/window/DefaultFrameTemplate.java
@@ -95,6 +95,8 @@ public abstract class DefaultFrameTemplate implements WindowFramer {
 
     final WindowDataBatch current = batches.get(0);
 
+    setupCopyFirstValue(current, internal);
+
     // we need to store the record count explicitly, because we release current batch at
the end of this call
     outputCount = current.getRecordCount();
 
@@ -136,14 +138,12 @@ public abstract class DefaultFrameTemplate implements WindowFramer {
     final long length = computePartitionSize(currentRow);
     partition = new Partition(length);
     setupPartition(current, container);
-    setupCopyFirstValue(current, internal);
     copyFirstValueToInternal(currentRow);
   }
 
   private void cleanPartition() {
     partition = null;
     resetValues();
-    internal.zeroVectors();
     lagCopiedToInternal = false;
   }
 

http://git-wip-us.apache.org/repos/asf/drill/blob/a29129cd/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/window/TestWindowFrame.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/window/TestWindowFrame.java
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/window/TestWindowFrame.java
index d76420f..1fd39b9 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/window/TestWindowFrame.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/window/TestWindowFrame.java
@@ -277,6 +277,11 @@ public class TestWindowFrame extends BaseTestQuery {
   }
 
   @Test
+  public void test3654Fix() throws Exception {
+    test("SELECT FIRST_VALUE(col8) OVER(PARTITION BY col7 ORDER BY col8) FROM dfs_test.`%s/window/3648.parquet`",
TEST_RES_PATH);
+  }
+
+  @Test
   public void testPartitionNtile() {
     Partition partition = new Partition(12);
 


Mime
View raw message