[jira] [Commented] (DRILL-6440) Fix ignored unit tests in unnest

2018-05-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488033#comment-16488033
 ] 

ASF GitHub Bot commented on DRILL-6440:
---

sohami closed pull request #1283: DRILL-6440: Unnest unit tests and fixes for 
stats
URL: https://github.com/apache/drill/pull/1283
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/unnest/UnnestRecordBatch.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/unnest/UnnestRecordBatch.java
index 57a0adeb7c..e985c4defe 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/unnest/UnnestRecordBatch.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/unnest/UnnestRecordBatch.java
@@ -207,6 +207,9 @@ public IterOutcome innerNext() {
   } finally {
 stats.stopSetup();
   }
+  // since we never called next on an upstream operator, incoming stats are
+  // not updated. update input stats explicitly.
+  stats.batchReceived(0, incoming.getRecordCount(), true);
   return IterOutcome.OK_NEW_SCHEMA;
 } else {
   assert state != BatchState.FIRST : "First batch should be OK_NEW_SCHEMA";
@@ -223,11 +226,13 @@ public IterOutcome innerNext() {
   context.getExecutorState().fail(ex);
   return IterOutcome.STOP;
 }
+stats.batchReceived(0, incoming.getRecordCount(), true);
 return OK_NEW_SCHEMA;
   }
   if (lateral.getRecordIndex() == 0) {
 unnest.resetGroupIndex();
   }
+  stats.batchReceived(0, incoming.getRecordCount(), false);
   return doWork();
 }
 
@@ -348,8 +353,7 @@ protected IterOutcome doWork() {
 recordCount = 0;
 final List transfers = Lists.newArrayList();
 
-final FieldReference fieldReference =
-new FieldReference(popConfig.getColumn());
+final FieldReference fieldReference = new 
FieldReference(popConfig.getColumn());
 
 final TransferPair transferPair = 
getUnnestFieldTransferPair(fieldReference);
 
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/unnest/TestUnnestCorrectness.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/unnest/TestUnnestCorrectness.java
index 137966ba33..c04bff7753 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/unnest/TestUnnestCorrectness.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/unnest/TestUnnestCorrectness.java
@@ -615,7 +615,8 @@ public void testUnnestNonArrayColumn() {
*]
*  }
*
-   * @see TestResultSetLoaderMapArray TestResultSetLoaderMapArray for similar 
schema and data
+   * @see 
org.apache.drill.exec.physical.rowSet.impl.TestResultSetLoaderMapArray 
TestResultSetLoaderMapArray for
+   * similar schema and data
* @return TupleMetadata corresponding to the schema
*/
   private TupleMetadata getRepeatedMapSchema() {
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/unnest/TestUnnestWithLateralCorrectness.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/unnest/TestUnnestWithLateralCorrectness.java
index 9318c516b9..f281964fb4 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/unnest/TestUnnestWithLateralCorrectness.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/unnest/TestUnnestWithLateralCorrectness.java
@@ -48,7 +48,6 @@
 import org.apache.drill.test.rowSet.schema.SchemaBuilder;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -147,7 +146,6 @@ public void testUnnestVarWidthColumn() {
 
   }
 
-  @Ignore("RecordBatchSizer throws Exception in RecordBatchSizer.expandMap")
   @Test
   public void testUnnestMapColumn() {
 
@@ -297,15 +295,21 @@ public void testUnnestSchemaChange() {
 
   }
 
-  @Ignore ("Batch limits need to be sync'd with tthe record batch sizer. Fix 
once the calulations are stabilized")
   @Test
   public void testUnnestLimitBatchSize() {
 
-final int limitedOutputBatchSize = 1024;
-final int inputBatchSize = 1024+1;
-final int limitedOutputBatchSizeBytes = 1024*(4 + 4 + 4 * inputBatchSize); 
// num rows * (size of int + size of
-   
// int + size of int * num entries in
-   
// array)
+final int limitedOutputBatchSize = 127;
+final int inputBatchSize = limitedOutputBatchSize + 1;
+

[jira] [Commented] (DRILL-6440) Fix ignored unit tests in unnest

2018-05-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487774#comment-16487774
 ] 

ASF GitHub Bot commented on DRILL-6440:
---

sohami commented on issue #1283: DRILL-6440: Unnest unit tests and fixes for 
stats
URL: https://github.com/apache/drill/pull/1283#issuecomment-391444730
 
 
   +1 LGTM


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Fix ignored unit tests in unnest
> 
>
> Key: DRILL-6440
> URL: https://issues.apache.org/jira/browse/DRILL-6440
> Project: Apache Drill
>  Issue Type: Improvement
>Reporter: Parth Chandra
>Assignee: Parth Chandra
>Priority: Major
>  Labels: ready-to-commit
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)