Created
June 9, 2014 19:23
-
-
Save pgrm/a589edb64317f5cb1207 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.VarCharHolder; | |
import org.apache.drill.exec.ops.FragmentContext; | |
import org.apache.drill.exec.record.RecordBatch; | |
import org.apache.drill.exec.vector.RepeatedVarCharVector; | |
import org.apache.drill.exec.vector.VarCharVector; | |
import org.apache.drill.exec.vector.complex.impl.RepeatedVarCharReaderImpl; | |
public class ProjectorGen0 { | |
RepeatedVarCharVector vv0; | |
RepeatedVarCharReaderImpl reader4; | |
VarCharVector vv5; | |
public boolean doEval(int inIndex, int outIndex) | |
throws SchemaChangeException | |
{ | |
{ | |
VarCharHolder out3 = new VarCharHolder(); | |
complex: | |
vv0 .getAccessor().getReader().setPosition((inIndex)); | |
reader4 .read(0, out3); | |
BitHolder out8 = new BitHolder(); | |
out8 .value = 1; | |
if (!vv5 .getMutator().setSafe((outIndex), out3)) { | |
out8 .value = 0; | |
} | |
if (out8 .value == 0) { | |
return false; | |
} | |
} | |
{ | |
return true; | |
} | |
} | |
public void doSetup(FragmentContext context, RecordBatch incoming, RecordBatch outgoing) | |
throws SchemaChangeException | |
{ | |
{ | |
int[] fieldIds1 = new int[ 1 ] ; | |
fieldIds1 [ 0 ] = 0; | |
Object tmp2 = (incoming).getValueAccessorById(RepeatedVarCharVector.class, fieldIds1).getValueVector(); | |
if (tmp2 == null) { | |
throw new SchemaChangeException("Failure while loading vector vv0 with id: org.apache.drill.exec.record.TypedFieldId@1cf4a5a0."); | |
} | |
vv0 = ((RepeatedVarCharVector) tmp2); | |
reader4 = ((RepeatedVarCharReaderImpl) vv0 .getAccessor().getReader()); | |
int[] fieldIds6 = new int[ 1 ] ; | |
fieldIds6 [ 0 ] = 0; | |
Object tmp7 = (outgoing).getValueAccessorById(VarCharVector.class, fieldIds6).getValueVector(); | |
if (tmp7 == null) { | |
throw new SchemaChangeException("Failure while loading vector vv5 with id: org.apache.drill.exec.record.TypedFieldId@1ce776c0."); | |
} | |
vv5 = ((VarCharVector) tmp7); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment