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

Chun Chang commented on DRILL-1200:
-----------------------------------

org.apache.drill.exec.exception.SchemaChangeException: Failure while attempting 
to load generated class
        
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:299)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:66)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:95)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:91)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:116)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:72)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:65)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.aggregate.HashAggBatch.innerNext(HashAggBatch.java:101)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:91)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:116)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:72)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.join.HashJoinBatch.innerNext(HashJoinBatch.java:183)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:91)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:116)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:72)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:65)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:45)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:95)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:91)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:116)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:72)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:65)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:45)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:95)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:91)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:116)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:58) 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:97)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:48) 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:100)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:242)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[na:1.7.0_45]
        
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_45]
        java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
Caused by: org.apache.drill.exec.exception.ClassTransformationException: 
Failure generating transformation classes for value: 
 
package org.apache.drill.exec.test.generated;

import org.apache.drill.exec.exception.SchemaChangeException;
import org.apache.drill.exec.expr.holders.BitHolder;
import org.apache.drill.exec.expr.holders.IntHolder;
import org.apache.drill.exec.expr.holders.NullableBitHolder;
import org.apache.drill.exec.expr.holders.NullableFloat8Holder;
import org.apache.drill.exec.expr.holders.NullableIntHolder;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.record.RecordBatch;
import org.apache.drill.exec.vector.NullableFloat8Vector;
import org.apache.drill.exec.vector.NullableIntVector;

public class ProjectorGen7 {

    NullableIntVector vv1;
    IntHolder constant6;
    NullableIntHolder constant10;
    NullableFloat8Vector vv11;
    NullableFloat8Vector vv15;

    public void doSetup(FragmentContext context, RecordBatch incoming, 
RecordBatch outgoing)
        throws SchemaChangeException
    {
        {
            int[] fieldIds2 = new int[ 1 ] ;
            fieldIds2 [ 0 ] = 6;
            Object tmp3 = 
(incoming).getValueAccessorById(NullableIntVector.class, 
fieldIds2).getValueVector();
            if (tmp3 == null) {
                throw new SchemaChangeException("Failure while loading vector 
vv1 with id: org.apache.drill.exec.record.TypedFieldId@4bbc17ff.");
            }
            vv1 = ((NullableIntVector) tmp3);
            IntHolder out5 = new IntHolder();
            out5 .value = 0;
            constant6 = out5;
            /** start SETUP for function equal **/ 
            {
                IntHolder right = constant6;
                 {}
            }
            /** end SETUP for function equal **/ 
            IntHolder out8 = new IntHolder();
            out8 .value = 0;
            /** start SETUP for function convertToNullableINT **/ 
            {
                IntHolder input = out8;
                 {}
            }
            /** end SETUP for function convertToNullableINT **/ 
            //---- start of eval portion of convertToNullableINT function. 
----//
            NullableIntHolder out9 = new NullableIntHolder();
            {
                final NullableIntHolder output = new NullableIntHolder();
                IntHolder input = out8;
                 
GConvertToNullableIntHolder_eval: {
    output.isSet = 1;
    output.value = input.value;
}
 
                out9 = output;
            }
            //---- end of eval portion of convertToNullableINT function. ----//
            constant10 = out9;
            int[] fieldIds12 = new int[ 1 ] ;
            fieldIds12 [ 0 ] = 3;
            Object tmp13 = 
(incoming).getValueAccessorById(NullableFloat8Vector.class, 
fieldIds12).getValueVector();
            if (tmp13 == null) {
                throw new SchemaChangeException("Failure while loading vector 
vv11 with id: org.apache.drill.exec.record.TypedFieldId@fe443b68.");
            }
            vv11 = ((NullableFloat8Vector) tmp13);
            int[] fieldIds16 = new int[ 1 ] ;
            fieldIds16 [ 0 ] = 6;
            Object tmp17 = 
(outgoing).getValueAccessorById(NullableFloat8Vector.class, 
fieldIds16).getValueVector();
            if (tmp17 == null) {
                throw new SchemaChangeException("Failure while loading vector 
vv15 with id: org.apache.drill.exec.record.TypedFieldId@362c545.");
            }
            vv15 = ((NullableFloat8Vector) tmp17);
        }
    }

    public boolean doEval(int inIndex, int outIndex)
        throws SchemaChangeException
    {
        {
            NullableFloat8Holder out0 = new NullableFloat8Holder();
            NullableIntHolder out4 = new NullableIntHolder();
            out4 .isSet = vv1 .getAccessor().isSet((inIndex));
            if (out4 .isSet == 1) {
                {
                    out4 .value = vv1 .getAccessor().get((inIndex));
                }
            }
            //---- start of eval portion of equal function. ----//
            NullableBitHolder out7 = new NullableBitHolder();
            {
                if (out4 .isSet == 0) {
                    out7 .isSet = 0;
                } else {
                    final NullableBitHolder out = new NullableBitHolder();
                    NullableIntHolder left = out4;
                    IntHolder right = constant6;
                     
GCompareIntInt$EqualsIntInt_eval: {
    out.value = left.value == right.value ? 1 : 0;
}
 
                    out.isSet = 1;
                    out7 = out;
                    out.isSet = 1;
                }
            }
            //---- end of eval portion of equal function. ----//
            NullableFloat8Holder out14 = new NullableFloat8Holder();
            out14 .isSet = vv11 .getAccessor().isSet((inIndex));
            if (out14 .isSet == 1) {
                {
                    out14 .value = vv11 .getAccessor().get((inIndex));
                }
            }
            if ((out7 .isSet == 1)&&(out7 .value == 1)) {
                if (constant10 .isSet!= 0) {
                    out0 = constant10;
                }
            } else {
                if (out14 .isSet!= 0) {
                    out0 = out14;
                }
            }
            BitHolder out18 = new BitHolder();
            out18 .value = 1;
            if (!(out0 .isSet == 0)) {
                if (!vv15 .getMutator().setSafe((outIndex), out0 .value)) {
                    out18 .value = 0;
                }
            } else {
                if (!vv15 .getMutator().isSafe((outIndex))) {
                    out18 .value = 0;
                }
            }
            if (out18 .value == 0) {
                return false;
            }
        }
        {
            return true;
        }
    }

}

        
org.apache.drill.exec.compile.ClassTransformer.getImplementationClass(ClassTransformer.java:295)
 
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.ops.FragmentContext.getImplementationClass(FragmentContext.java:182)
 
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:296)
 
[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        ... 33 more
Caused by: org.codehaus.commons.compiler.CompileException: Line 124, Column 27: 
Assignment conversion not possible from type 
"org.apache.drill.exec.expr.holders.NullableIntHolder" to type 
"org.apache.drill.exec.expr.holders.NullableFloat8Holder"
        org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:10056) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler.assignmentConversion(UnitCompiler.java:8981) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2669) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.access$4500(UnitCompiler.java:182) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler$7.visitAssignment(UnitCompiler.java:2619) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.Java$Assignment.accept(Java.java:3409) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2654) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1634) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.access$1100(UnitCompiler.java:182) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler$4.visitExpressionStatement(UnitCompiler.java:940)
 ~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.Java$ExpressionStatement.accept(Java.java:2085) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:962) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1004) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:989) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.access$1000(UnitCompiler.java:182) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler$4.visitBlock(UnitCompiler.java:939) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.Java$Block.accept(Java.java:2005) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:962) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1744) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.access$1200(UnitCompiler.java:182) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler$4.visitIfStatement(UnitCompiler.java:941) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.Java$IfStatement.accept(Java.java:2145) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:962) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1004) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:989) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.access$1000(UnitCompiler.java:182) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler$4.visitBlock(UnitCompiler.java:939) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.Java$Block.accept(Java.java:2005) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:962) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1733) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.access$1200(UnitCompiler.java:182) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler$4.visitIfStatement(UnitCompiler.java:941) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.Java$IfStatement.accept(Java.java:2145) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:962) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1004) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:989) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.access$1000(UnitCompiler.java:182) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler$4.visitBlock(UnitCompiler.java:939) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.Java$Block.accept(Java.java:2005) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:962) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1004) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2284) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:826) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:798) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:503) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:389) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:182) 
~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:343)
 ~[janino-2.7.4.jar:2.7.4]
        
org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:1136) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:350) 
~[janino-2.7.4.jar:2.7.4]
        org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:318) 
~[janino-2.7.4.jar:2.7.4]
        
org.apache.drill.exec.compile.JaninoClassCompiler.getByteCode(JaninoClassCompiler.java:48)
 
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.compile.AbstractClassCompiler.getClassByteCode(AbstractClassCompiler.java:43)
 
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.compile.QueryClassLoader$ClassCompilerSelector.getClassByteCode(QueryClassLoader.java:127)
 
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.compile.QueryClassLoader$ClassCompilerSelector.access$000(QueryClassLoader.java:100)
 
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.compile.QueryClassLoader.getClassByteCode(QueryClassLoader.java:93)
 
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        
org.apache.drill.exec.compile.ClassTransformer.getImplementationClass(ClassTransformer.java:254)
 
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        ... 35 more


> mondrian2580.q - cause schema change exception
> ----------------------------------------------
>
>                 Key: DRILL-1200
>                 URL: https://issues.apache.org/jira/browse/DRILL-1200
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>            Reporter: Chun Chang
>
> #Mon Jul 21 10:24:21 PDT 2014
> git.commit.id.abbrev=e5c2da0
> The following mondrian query (query2580.q) caused schema change exception:
> 0: jdbc:drill:schema=dfs> select time_by_day.the_year as c0, 
> sum(sales_fact_1997.unit_sales) as m0, sum(sales_fact_1997.store_cost) as m1, 
> sum(sales_fact_1997.store_sales) as m2, count(sales_fact_1997.product_id) as 
> m3, count(distinct sales_fact_1997.customer_id) as m4, sum((case when 
> sales_fact_1997.promotion_id = 0 then 0 else sales_fact_1997.store_sales 
> end)) as m5 from time_by_day as time_by_day, sales_fact_1997 as 
> sales_fact_1997 where sales_fact_1997.time_id = time_by_day.time_id and 
> time_by_day.the_year = 1997 group by time_by_day.the_year;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while 
> running query.[error_id: "b9fa1177-505a-4ae1-9d44-52b1d40f9a92"
> endpoint {
>   address: "qa-node120.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while running fragment. < IllegalStateException:[ You tried 
> to do a batch data read operation when you were in a state of STOP.  You can 
> only do this type of operation when you are in a state of OK or 
> OK_NEW_SCHEMA. ]"
> ]
> Error: exception while executing query (state=,code=0)
> physical plan:
> 14:31:16.198 [19aa0bca-d59e-4061-962d-b3fabb0f24b7:foreman] DEBUG 
> o.a.d.e.p.s.h.DefaultSqlHandler - Drill Physical :
> 00-00    Screen: rowcount = 1.0, cumulative cost = {874658.1 rows, 3052726.1 
> cpu, 0.0 io, 0.0 network}, id = 3109
> 00-01      Project(c0=[$0], m0=[$1], m1=[$2], m2=[$3], m3=[$4], m4=[$5], 
> m5=[$6]): rowcount = 1.0, cumulative cost = {874658.0 rows, 3052726.0 cpu, 
> 0.0 io, 0.0 network}, id = 3108
> 00-02        Project(c0=[$0], m0=[CASE(=($2, 0), null, $1)], m1=[CASE(=($4, 
> 0), null, $3)], m2=[CASE(=($6, 0), null, $5)], m3=[$7], m4=[$11], 
> m5=[CASE(=($9, 0), null, $8)]): rowcount = 1.0, cumulative cost = {874657.0 
> rows, 3052698.0 cpu, 0.0 io, 0.0 network}, id = 3107
> 00-03          HashJoin(condition=[IS NOT DISTINCT FROM($0, $10)], 
> joinType=[inner]): rowcount = 1.0, cumulative cost = {874656.0 rows, 
> 3052670.0 cpu, 0.0 io, 0.0 network}, id = 3106
> 00-05            HashAgg(group=[{0}], agg#0=[$SUM0($1)], agg#1=[COUNT($1)], 
> agg#2=[$SUM0($2)], agg#3=[COUNT($2)], agg#4=[$SUM0($3)], agg#5=[COUNT($3)], 
> m3=[COUNT($4)], agg#7=[$SUM0($6)], agg#8=[COUNT($6)]): rowcount = 1.0, 
> cumulative cost = {437326.0 rows, 1743481.5 cpu, 0.0 io, 0.0 network}, id = 
> 3093
> 00-07              Project(c0=[$0], unit_sales=[$3], store_cost=[$4], 
> store_sales=[$5], product_id=[$6], customer_id=[$7], 
> $f6=[CASE(=(CAST($8):INTEGER, 0), CAST(0):ANY, $5)]): rowcount = 1.0, 
> cumulative cost = {437325.0 rows, 1743365.5 cpu, 0.0 io, 0.0 network}, id = 
> 3092
> 00-09                HashJoin(condition=[=($2, $1)], joinType=[inner]): 
> rowcount = 1.0, cumulative cost = {437324.0 rows, 1743337.5 cpu, 0.0 io, 0.0 
> network}, id = 3091
> 00-12                  SelectionVectorRemover: rowcount = 109.5, cumulative 
> cost = {3029.5 rows, 5227.5 cpu, 0.0 io, 0.0 network}, id = 3087
> 00-15                    Filter(condition=[=(CAST($0):INTEGER, 1997)]): 
> rowcount = 109.5, cumulative cost = {2920.0 rows, 5118.0 cpu, 0.0 io, 0.0 
> network}, id = 3086
> 00-19                      Project(the_year=[$1], time_id=[$0]): rowcount = 
> 730.0, cumulative cost = {2190.0 rows, 2198.0 cpu, 0.0 io, 0.0 network}, id = 
> 3085
> 00-23                        ProducerConsumer: rowcount = 730.0, cumulative 
> cost = {1460.0 rows, 2190.0 cpu, 0.0 io, 0.0 network}, id = 3084
> 00-26                          Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/user/root/mondrian/time_by_day]], 
> selectionRoot=/user/root/mondrian/time_by_day, columns=[SchemaPath 
> [`the_year`], SchemaPath [`time_id`]]]]): rowcount = 730.0, cumulative cost = 
> {730.0 rows, 1460.0 cpu, 0.0 io, 0.0 network}, id = 3058
> 00-11                  Project(time_id0=[$0], unit_sales=[$1], 
> store_cost=[$2], store_sales=[$3], product_id=[$4], customer_id=[$5], 
> promotion_id=[$6]): rowcount = 86837.0, cumulative cost = {347348.0 rows, 
> 694752.0 cpu, 0.0 io, 0.0 network}, id = 3090
> 00-14                    Project(time_id=[$4], unit_sales=[$1], 
> store_cost=[$5], store_sales=[$6], product_id=[$2], customer_id=[$0], 
> promotion_id=[$3]): rowcount = 86837.0, cumulative cost = {260511.0 rows, 
> 694724.0 cpu, 0.0 io, 0.0 network}, id = 3089
> 00-18                      ProducerConsumer: rowcount = 86837.0, cumulative 
> cost = {173674.0 rows, 694696.0 cpu, 0.0 io, 0.0 network}, id = 3088
> 00-22                        Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath 
> [path=maprfs:/user/root/mondrian/sales_fact_1997]], 
> selectionRoot=/user/root/mondrian/sales_fact_1997, columns=[SchemaPath 
> [`time_id`], SchemaPath [`unit_sales`], SchemaPath [`store_cost`], SchemaPath 
> [`store_sales`], SchemaPath [`product_id`], SchemaPath [`customer_id`], 
> SchemaPath [`promotion_id`]]]]): rowcount = 86837.0, cumulative cost = 
> {86837.0 rows, 607859.0 cpu, 0.0 io, 0.0 network}, id = 3062
> 00-04            Project(c00=[$0], m4=[$1]): rowcount = 1.0, cumulative cost 
> = {437328.0 rows, 1309164.5 cpu, 0.0 io, 0.0 network}, id = 3105
> 00-06              HashAgg(group=[{0}], m4=[COUNT($1)]): rowcount = 1.0, 
> cumulative cost = {437327.0 rows, 1309156.5 cpu, 0.0 io, 0.0 network}, id = 
> 3104
> 00-08                HashAgg(group=[{0, 1}]): rowcount = 1.0, cumulative cost 
> = {437326.0 rows, 1309136.5 cpu, 0.0 io, 0.0 network}, id = 3103
> 00-10                  Project(c0=[$0], customer_id=[$3]): rowcount = 1.0, 
> cumulative cost = {437325.0 rows, 1309120.5 cpu, 0.0 io, 0.0 network}, id = 
> 3102
> 00-13                    HashJoin(condition=[=($2, $1)], joinType=[inner]): 
> rowcount = 1.0, cumulative cost = {437324.0 rows, 1309112.5 cpu, 0.0 io, 0.0 
> network}, id = 3101
> 00-17                      SelectionVectorRemover: rowcount = 109.5, 
> cumulative cost = {3029.5 rows, 5227.5 cpu, 0.0 io, 0.0 network}, id = 3097
> 00-21                        Filter(condition=[=(CAST($0):INTEGER, 1997)]): 
> rowcount = 109.5, cumulative cost = {2920.0 rows, 5118.0 cpu, 0.0 io, 0.0 
> network}, id = 3096
> 00-25                          Project(the_year=[$1], time_id=[$0]): rowcount 
> = 730.0, cumulative cost = {2190.0 rows, 2198.0 cpu, 0.0 io, 0.0 network}, id 
> = 3095
> 00-28                            ProducerConsumer: rowcount = 730.0, 
> cumulative cost = {1460.0 rows, 2190.0 cpu, 0.0 io, 0.0 network}, id = 3094
> 00-29                              Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/user/root/mondrian/time_by_day]], 
> selectionRoot=/user/root/mondrian/time_by_day, columns=[SchemaPath 
> [`the_year`], SchemaPath [`time_id`]]]]): rowcount = 730.0, cumulative cost = 
> {730.0 rows, 1460.0 cpu, 0.0 io, 0.0 network}, id = 3068
> 00-16                      Project(time_id0=[$0], customer_id=[$1]): rowcount 
> = 86837.0, cumulative cost = {347348.0 rows, 260527.0 cpu, 0.0 io, 0.0 
> network}, id = 3100
> 00-20                        Project(time_id=[$1], customer_id=[$0]): 
> rowcount = 86837.0, cumulative cost = {260511.0 rows, 260519.0 cpu, 0.0 io, 
> 0.0 network}, id = 3099
> 00-24                          ProducerConsumer: rowcount = 86837.0, 
> cumulative cost = {173674.0 rows, 260511.0 cpu, 0.0 io, 0.0 network}, id = 
> 3098
> 00-27                            Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath 
> [path=maprfs:/user/root/mondrian/sales_fact_1997]], 
> selectionRoot=/user/root/mondrian/sales_fact_1997, columns=[SchemaPath 
> [`time_id`], SchemaPath [`customer_id`]]]]): rowcount = 86837.0, cumulative 
> cost = {86837.0 rows, 173674.0 cpu, 0.0 io, 0.0 network}, id = 3072
> 14:31:16.352 [19aa0bca-d59e-4061-962d-b3fabb0f24b7:foreman] DEBUG 
> o.a.d.e.p.s.h.DefaultSqlHandler - Drill Plan :
> {
>   "head" : {
>     "version" : 1,
>     "generator" : {
>       "type" : "DefaultSqlHandler",
>       "info" : ""
>     },
>     "type" : "APACHE_DRILL_PHYSICAL",
>     "options" : [ ],
>     "queue" : 0,
>     "resultMode" : "EXEC"
>   },
>   "graph" : [ {
>     "pop" : "parquet-scan",
>     "@id" : 27,
>     "entries" : [ {
>       "path" : "maprfs:/user/root/mondrian/sales_fact_1997"
>     } ],
>     "storage" : {
>       "type" : "file",
>       "enabled" : true,
>       "connection" : "maprfs:///",
>       "workspaces" : {
>         "default" : {
>           "location" : "/user/root/mondrian/",
>           "writable" : false,
>           "storageformat" : null
>         },
>         "home" : {
>           "location" : "/",
>           "writable" : false,
>           "storageformat" : null
>         },
>         "root" : {
>           "location" : "/",
>           "writable" : false,
>           "storageformat" : null
>         },
>         "tmp" : {
>           "location" : "/tmp",
>           "writable" : true,
>           "storageformat" : "csv"
>         }
>       },
>       "formats" : {
>         "psv" : {
>           "type" : "text",
>           "extensions" : [ "tbl" ],
>           "delimiter" : "|"
>         },
>         "csv" : {
>           "type" : "text",
>           "extensions" : [ "csv" ],
>           "delimiter" : ","
>         },
>         "tsv" : {
>           "type" : "text",
>           "extensions" : [ "tsv" ],
>           "delimiter" : "\t"
>         },
>         "parquet" : {
>           "type" : "parquet"
>         },
>         "json" : {
>           "type" : "json"
>         }
>       }
>     },
>     "format" : {
>       "type" : "parquet"
>     },
>     "columns" : [ "`time_id`", "`customer_id`" ],
>     "selectionRoot" : "/user/root/mondrian/sales_fact_1997",
>     "cost" : 86837.0
>   }, {
>     "pop" : "producer-consumer",
>     "@id" : 24,
>     "child" : 27,
>     "size" : 10,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 86837.0
>   }, {
>     "pop" : "project",
>     "@id" : 20,
>     "exprs" : [ {
>       "ref" : "`time_id`",
>       "expr" : "`time_id`"
>     }, {
>       "ref" : "`customer_id`",
>       "expr" : "`customer_id`"
>     } ],
>     "child" : 24,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 86837.0
>   }, {
>     "pop" : "project",
>     "@id" : 16,
>     "exprs" : [ {
>       "ref" : "`time_id0`",
>       "expr" : "`time_id`"
>     }, {
>       "ref" : "`customer_id`",
>       "expr" : "`customer_id`"
>     } ],
>     "child" : 20,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 86837.0
>   }, {
>     "pop" : "parquet-scan",
>     "@id" : 22,
>     "entries" : [ {
>       "path" : "maprfs:/user/root/mondrian/sales_fact_1997"
>     } ],
>     "storage" : {
>       "type" : "file",
>       "enabled" : true,
>       "connection" : "maprfs:///",
>       "workspaces" : {
>         "default" : {
>           "location" : "/user/root/mondrian/",
>           "writable" : false,
>           "storageformat" : null
>         },
>         "home" : {
>           "location" : "/",
>           "writable" : false,
>           "storageformat" : null
>         },
>         "root" : {
>           "location" : "/",
>           "writable" : false,
>           "storageformat" : null
>         },
>         "tmp" : {
>           "location" : "/tmp",
>           "writable" : true,
>           "storageformat" : "csv"
>         }
>       },
>       "formats" : {
>         "psv" : {
>           "type" : "text",
>           "extensions" : [ "tbl" ],
>           "delimiter" : "|"
>         },
>         "csv" : {
>           "type" : "text",
>           "extensions" : [ "csv" ],
>           "delimiter" : ","
>         },
>         "tsv" : {
>           "type" : "text",
>           "extensions" : [ "tsv" ],
>           "delimiter" : "\t"
>         },
>         "parquet" : {
>           "type" : "parquet"
>         },
>         "json" : {
>           "type" : "json"
>         }
>       }
>     },
>     "format" : {
>       "type" : "parquet"
>     },
>     "columns" : [ "`time_id`", "`unit_sales`", "`store_cost`", 
> "`store_sales`", "`product_id`", "`customer_id`", "`promotion_id`" ],
>     "selectionRoot" : "/user/root/mondrian/sales_fact_1997",
>     "cost" : 86837.0
>   }, {
>     "pop" : "producer-consumer",
>     "@id" : 18,
>     "child" : 22,
>     "size" : 10,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 86837.0
>   }, {
>     "pop" : "project",
>     "@id" : 14,
>     "exprs" : [ {
>       "ref" : "`time_id`",
>       "expr" : "`time_id`"
>     }, {
>       "ref" : "`unit_sales`",
>       "expr" : "`unit_sales`"
>     }, {
>       "ref" : "`store_cost`",
>       "expr" : "`store_cost`"
>     }, {
>       "ref" : "`store_sales`",
>       "expr" : "`store_sales`"
>     }, {
>       "ref" : "`product_id`",
>       "expr" : "`product_id`"
>     }, {
>       "ref" : "`customer_id`",
>       "expr" : "`customer_id`"
>     }, {
>       "ref" : "`promotion_id`",
>       "expr" : "`promotion_id`"
>     } ],
>     "child" : 18,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 86837.0
>   }, {
>     "pop" : "project",
>     "@id" : 11,
>     "exprs" : [ {
>       "ref" : "`time_id0`",
>       "expr" : "`time_id`"
>     }, {
>       "ref" : "`unit_sales`",
>       "expr" : "`unit_sales`"
>     }, {
>       "ref" : "`store_cost`",
>       "expr" : "`store_cost`"
>     }, {
>       "ref" : "`store_sales`",
>       "expr" : "`store_sales`"
>     }, {
>       "ref" : "`product_id`",
>       "expr" : "`product_id`"
>     }, {
>       "ref" : "`customer_id`",
>       "expr" : "`customer_id`"
>     }, {
>       "ref" : "`promotion_id`",
>       "expr" : "`promotion_id`"
>     } ],
>     "child" : 14,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 86837.0
>   }, {
>     "pop" : "parquet-scan",
>     "@id" : 26,
>     "entries" : [ {
>       "path" : "maprfs:/user/root/mondrian/time_by_day"
>     } ],
>     "storage" : {
>       "type" : "file",
>       "enabled" : true,
>       "connection" : "maprfs:///",
>       "workspaces" : {
>         "default" : {
>           "location" : "/user/root/mondrian/",
>           "writable" : false,
>           "storageformat" : null
>         },
>         "home" : {
>           "location" : "/",
>           "writable" : false,
>           "storageformat" : null
>         },
>         "root" : {
>           "location" : "/",
>           "writable" : false,
>           "storageformat" : null
>         },
>         "tmp" : {
>           "location" : "/tmp",
>           "writable" : true,
>           "storageformat" : "csv"
>         }
>       },
>       "formats" : {
>         "psv" : {
>           "type" : "text",
>           "extensions" : [ "tbl" ],
>           "delimiter" : "|"
>         },
>         "csv" : {
>           "type" : "text",
>           "extensions" : [ "csv" ],
>           "delimiter" : ","
>         },
>         "tsv" : {
>           "type" : "text",
>           "extensions" : [ "tsv" ],
>           "delimiter" : "\t"
>         },
>         "parquet" : {
>           "type" : "parquet"
>         },
>         "json" : {
>           "type" : "json"
>         }
>       }
>     },
>     "format" : {
>       "type" : "parquet"
>     },
>     "columns" : [ "`the_year`", "`time_id`" ],
>     "selectionRoot" : "/user/root/mondrian/time_by_day",
>     "cost" : 730.0
>   }, {
>     "pop" : "producer-consumer",
>     "@id" : 23,
>     "child" : 26,
>     "size" : 10,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 730.0
>   }, {
>     "pop" : "project",
>     "@id" : 19,
>     "exprs" : [ {
>       "ref" : "`the_year`",
>       "expr" : "`the_year`"
>     }, {
>       "ref" : "`time_id`",
>       "expr" : "`time_id`"
>     } ],
>     "child" : 23,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 730.0
>   }, {
>     "pop" : "filter",
>     "@id" : 15,
>     "child" : 19,
>     "expr" : "equal(cast( (`the_year` ) as INT ), 1997) ",
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 109.5
>   }, {
>     "pop" : "selection-vector-remover",
>     "@id" : 12,
>     "child" : 15,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 109.5
>   }, {
>     "pop" : "hash-join",
>     "@id" : 9,
>     "left" : 12,
>     "right" : 11,
>     "conditions" : [ {
>       "relationship" : "==",
>       "left" : "`time_id`",
>       "right" : "`time_id0`"
>     } ],
>     "joinType" : "INNER",
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 0.0
>   }, {
>     "pop" : "project",
>     "@id" : 7,
>     "exprs" : [ {
>       "ref" : "`c0`",
>       "expr" : "`the_year`"
>     }, {
>       "ref" : "`unit_sales`",
>       "expr" : "`unit_sales`"
>     }, {
>       "ref" : "`store_cost`",
>       "expr" : "`store_cost`"
>     }, {
>       "ref" : "`store_sales`",
>       "expr" : "`store_sales`"
>     }, {
>       "ref" : "`product_id`",
>       "expr" : "`product_id`"
>     }, {
>       "ref" : "`customer_id`",
>       "expr" : "`customer_id`"
>     }, {
>       "ref" : "`$f6`",
>       "expr" : " ( if (equal(cast( (`promotion_id` ) as INT ), 0)  ) then (0 
> )  else (`store_sales` )  end  ) "
>     } ],
>     "child" : 9,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 1.0
>   }, {
>     "pop" : "hash-aggregate",
>     "@id" : 5,
>     "child" : 7,
>     "cardinality" : 1.0,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 0.5,
>     "groupByExprs" : [ {
>       "ref" : "`c0`",
>       "expr" : "`c0`"
>     } ],
>     "aggrExprs" : [ {
>       "ref" : "`$f1`",
>       "expr" : "$sum0(`unit_sales`) "
>     }, {
>       "ref" : "`$f2`",
>       "expr" : "count(`unit_sales`) "
>     }, {
>       "ref" : "`$f3`",
>       "expr" : "$sum0(`store_cost`) "
>     }, {
>       "ref" : "`$f4`",
>       "expr" : "count(`store_cost`) "
>     }, {
>       "ref" : "`$f5`",
>       "expr" : "$sum0(`store_sales`) "
>     }, {
>       "ref" : "`$f6`",
>       "expr" : "count(`store_sales`) "
>     }, {
>       "ref" : "`m3`",
>       "expr" : "count(`product_id`) "
>     }, {
>       "ref" : "`$f8`",
>       "expr" : "$sum0(`$f6`) "
>     }, {
>       "ref" : "`$f9`",
>       "expr" : "count(`$f6`) "
>     } ]
>   }, {
>     "pop" : "parquet-scan",
>     "@id" : 29,
>     "entries" : [ {
>       "path" : "maprfs:/user/root/mondrian/time_by_day"
>     } ],
>     "storage" : {
>       "type" : "file",
>       "enabled" : true,
>       "connection" : "maprfs:///",
>       "workspaces" : {
>         "default" : {
>           "location" : "/user/root/mondrian/",
>           "writable" : false,
> ....
> This is too long. Will regenerate the plan if needed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to