[
https://issues.apache.org/jira/browse/DRILL-1110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14051825#comment-14051825
]
Chun Chang commented on DRILL-1110:
-----------------------------------
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.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:96)
[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 io.netty.buffer.ByteBuf;
import org.apache.drill.exec.exception.SchemaChangeException;
import org.apache.drill.exec.expr.holders.BigIntHolder;
import org.apache.drill.exec.expr.holders.BitHolder;
import org.apache.drill.exec.expr.holders.NullableDecimal18Holder;
import org.apache.drill.exec.expr.holders.NullableDecimal28SparseHolder;
import org.apache.drill.exec.expr.holders.NullableVarBinaryHolder;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.record.RecordBatch;
import org.apache.drill.exec.vector.NullableDecimal18Vector;
import org.apache.drill.exec.vector.NullableVarBinaryVector;
public class ProjectorGen3 {
ByteBuf work0;
int work1;
int work2;
ByteBuf work3;
NullableVarBinaryVector vv4;
BigIntHolder constant9;
BigIntHolder constant11;
BigIntHolder constant14;
BigIntHolder constant16;
ByteBuf work18;
NullableVarBinaryVector vv19;
BigIntHolder constant24;
BigIntHolder constant26;
NullableDecimal18Vector vv29;
public boolean doEval(int inIndex, int outIndex)
throws SchemaChangeException
{
{
NullableVarBinaryHolder out7 = new NullableVarBinaryHolder();
out7 .isSet = vv4 .getAccessor().isSet((inIndex));
if (out7 .isSet == 1) {
{
vv4 .getAccessor().get((inIndex), out7);
}
}
//---- start of eval portion of castDECIMAL18 function. ----//
NullableDecimal18Holder out12 = new NullableDecimal18Holder();
{
if (out7 .isSet == 0) {
out12 .isSet = 0;
} else {
final NullableDecimal18Holder out = new
NullableDecimal18Holder();
NullableVarBinaryHolder in = out7;
BigIntHolder precision = constant9;
BigIntHolder scale = constant11;
CastVarCharDecimal18_eval: {
out.scale = (int) scale.value;
out.precision = (int) precision.value;
int readIndex = in.start;
int endIndex = in.end;
if (endIndex - readIndex == 0) {
throw new
org.apache.drill.common.exceptions.DrillRuntimeException("Empty String, cannot
cast to Decimal");
}
int scaleIndex = -1;
boolean negative = false;
byte next = (in.buffer.getByte(readIndex));
if (next == '-') {
negative = true;
readIndex++;
}
int integerStartIndex = readIndex;
int integerEndIndex = endIndex;
boolean leadingDigitFound = false;
boolean round = false;
int radix = 10;
while (readIndex < endIndex) {
next = in.buffer.getByte(readIndex++);
if (next == '.') {
scaleIndex = readIndex;
integerEndIndex = scaleIndex - 1;
if ((scaleIndex + out.scale) < endIndex) {
endIndex = scaleIndex + out.scale;
round = true;
}
continue;
} else
{
next = (byte) Character.digit(next, radix);
}
if (next == -1) {
byte[] buf = new byte[in.end - in.start];
in.buffer.getBytes(in.start, buf, 0, in.end - in.start);
throw new
org.apache.drill.common.exceptions.DrillRuntimeException(new String(buf,
com.google.common.base.Charsets.UTF_8));
} else
if (leadingDigitFound == false) {
if (next == 0) {
integerStartIndex++;
} else
{
leadingDigitFound = true;
}
}
out.value *= radix;
out.value += next;
}
if (((integerEndIndex - integerStartIndex) + out.scale) > out.precision) {
byte[] buf = new byte[in.end - in.start];
in.buffer.getBytes(in.start, buf, 0, in.end - in.start);
throw new
org.apache.drill.common.exceptions.DrillRuntimeException("Precision is
insufficient for the provided input: " + new String(buf,
com.google.common.base.Charsets.UTF_8) + " Precision: " + out.precision + "
Total Digits: " + (out.scale + (integerEndIndex - integerStartIndex)));
}
if (round == true) {
next = in.buffer.getByte(endIndex);
next = (byte) Character.digit(next, radix);
if (next == -1) {
byte[] buf = new byte[in.end - in.start];
in.buffer.getBytes(in.start, buf, 0, in.end - in.start);
throw new
org.apache.drill.common.exceptions.DrillRuntimeException(new String(buf,
com.google.common.base.Charsets.UTF_8));
}
if (next > 4) {
out.value++;
}
}
int fractionalDigits = (scaleIndex == -1) ? 0 : ((endIndex - scaleIndex));
if (fractionalDigits < scale.value) {
out.value = (long)
(org.apache.drill.common.util.DecimalUtility.adjustScaleMultiply(out.value,
(int) (scale.value - fractionalDigits)));
}
if (negative == true) {
out.value *= -1;
}
}
out.isSet = 1;
out12 = out;
out.isSet = 1;
}
}
//---- end of eval portion of castDECIMAL18 function. ----//
//---- start of eval portion of castDECIMAL28SPARSE function. ----//
NullableDecimal28SparseHolder out17 = new
NullableDecimal28SparseHolder();
{
if (out12 .isSet == 0) {
out17 .isSet = 0;
} else {
final NullableDecimal28SparseHolder out = new
NullableDecimal28SparseHolder();
NullableDecimal18Holder in = out12;
BigIntHolder precision = constant14;
BigIntHolder scale = constant16;
ByteBuf buffer = work3;
CastDecimal18Decimal28Sparse_eval: {
out.buffer = buffer;
out.start = 0;
for (int i = 0; i < 5; i++) {
out.setInteger(i, 0);
}
out.scale = (int) scale.value;
out.precision = (int) precision.value;
out.buffer = buffer;
out.start = 0;
long value = (in.value < 0) ? (in.value * -1) : in.value;
int index = out.nDecimalDigits - 1;
int remainingScale = in.scale;
while (remainingScale > 0) {
int power = (remainingScale %
org.apache.drill.common.util.DecimalUtility.MAX_DIGITS);
int padding = 1;
if (power == 0) {
power = 9;
} else
{
padding = (int)
(org.apache.drill.common.util.DecimalUtility.getPowerOfTen((int)
(org.apache.drill.common.util.DecimalUtility.MAX_DIGITS - power)));
}
int mask = (int)
org.apache.drill.common.util.DecimalUtility.getPowerOfTen(power);
out.setInteger(index, (int) ((value % mask) * padding));
value = value / mask;
remainingScale -= power;
index--;
}
while (value > 0) {
out.setInteger(index, (int) (value %
org.apache.drill.common.util.DecimalUtility.DIGITS_BASE));
value = value / org.apache.drill.common.util.DecimalUtility.DIGITS_BASE;
index--;
}
if (in.scale != out.scale) {
org.apache.drill.common.util.DecimalUtility.roundDecimal(
out.buffer,
out.start,
out.nDecimalDigits,
out.scale,
in.scale
);
}
out.setSign((in.value < 0));
}
work3 = buffer;
out.isSet = 1;
out17 = out;
out.isSet = 1;
}
}
//---- end of eval portion of castDECIMAL28SPARSE function. ----//
NullableVarBinaryHolder out22 = new NullableVarBinaryHolder();
out22 .isSet = vv19 .getAccessor().isSet((inIndex));
if (out22 .isSet == 1) {
{
vv19 .getAccessor().get((inIndex), out22);
}
}
//---- start of eval portion of castDECIMAL28SPARSE function. ----//
NullableDecimal28SparseHolder out27 = new
NullableDecimal28SparseHolder();
{
if (out22 .isSet == 0) {
out27 .isSet = 0;
} else {
final NullableDecimal28SparseHolder out = new
NullableDecimal28SparseHolder();
NullableVarBinaryHolder in = out22;
BigIntHolder precision = constant24;
BigIntHolder scale = constant26;
ByteBuf buffer = work18;
CastVarCharDecimal28Sparse_eval: {
out.buffer = buffer;
out.start = 0;
out.scale = (int) scale.value;
out.precision = (int) precision.value;
boolean sign = false;
for (int i = 0; i < 5; i++) {
out.setInteger(i, 0);
}
int startIndex;
int readIndex = in.start;
int integerDigits = 0;
int fractionalDigits = 0;
int scaleIndex = -1;
int scaleEndIndex = in.end;
byte[] buf1 = new byte[in.end - in.start];
in.buffer.getBytes(in.start, buf1, 0, in.end - in.start);
Byte next = in.buffer.getByte(readIndex);
if (next == '-') {
readIndex++;
sign = true;
}
if (next == '.') {
readIndex++;
scaleIndex = readIndex;
}
if (in.end - readIndex == 0) {
throw new
org.apache.drill.common.exceptions.DrillRuntimeException("Empty String, cannot
cast to Decimal");
}
startIndex = readIndex;
int radix = 10;
boolean leadingDigitFound = false;
boolean round = false;
if (scaleIndex == -1) {
while (readIndex < in.end) {
next = in.buffer.getByte(readIndex++);
if (next == '.') {
scaleIndex = readIndex;
if ((in.end - scaleIndex) > out.scale) {
scaleEndIndex = scaleIndex + out.scale;
round = true;
}
break;
}
next = (byte) Character.digit(next, radix);
if (next == -1) {
byte[] buf = new byte[in.end - in.start];
in.buffer.getBytes(in.start, buf, 0, in.end - in.start);
throw new NumberFormatException(new String(buf,
com.google.common.base.Charsets.UTF_8));
}
if (leadingDigitFound == false && next != 0) {
leadingDigitFound = true;
}
if (leadingDigitFound == true) {
integerDigits++;
}
}
}
if (integerDigits + out.scale > out.precision) {
byte[] buf = new byte[in.end - in.start];
in.buffer.getBytes(in.start, buf, 0, in.end - in.start);
throw new
org.apache.drill.common.exceptions.DrillRuntimeException("Precision is
insufficient for the provided input: " + new String(buf,
com.google.common.base.Charsets.UTF_8) + " Precision: " + out.precision + "
Total Digits: " + (out.scale + integerDigits));
}
int scaleRoundedUp =
org.apache.drill.common.util.DecimalUtility.roundUp(out.scale);
int integerRoundedUp =
org.apache.drill.common.util.DecimalUtility.roundUp(integerDigits);
int ndigits = 0;
int decimalBufferIndex = 5 - scaleRoundedUp - 1;
int integerEndIndex = (scaleIndex == -1) ? (in.end - 1) : (scaleIndex - 2);
while (integerEndIndex >= startIndex) {
next = in.buffer.getByte(integerEndIndex--);
next = (byte) Character.digit(next, radix);
int value = (((int)
org.apache.drill.common.util.DecimalUtility.getPowerOfTen(ndigits)) * next) +
(out.getInteger(decimalBufferIndex));
out.setInteger(decimalBufferIndex, value);
ndigits++;
if (ndigits >= org.apache.drill.common.util.DecimalUtility.MAX_DIGITS) {
ndigits = 0;
decimalBufferIndex--;
}
}
decimalBufferIndex = 5 - scaleRoundedUp;
ndigits = 0;
if (scaleIndex != -1 && out.scale > 0) {
while (scaleIndex < scaleEndIndex) {
if (ndigits >=
org.apache.drill.common.util.DecimalUtility.MAX_DIGITS) {
ndigits = 0;
decimalBufferIndex++;
}
next = in.buffer.getByte(scaleIndex++);
next = (byte) Character.digit(next, radix);
if (next == -1) {
byte[] buf = new byte[in.end - in.start];
in.buffer.getBytes(in.start, buf, 0, in.end - in.start);
throw new NumberFormatException(new String(buf,
com.google.common.base.Charsets.UTF_8));
}
int value = (out.getInteger(decimalBufferIndex) * radix) + next;
out.setInteger(decimalBufferIndex, value);
ndigits++;
}
if (round == true) {
next = in.buffer.getByte(scaleEndIndex);
next = (byte) Character.digit(next, radix);
if (next == -1) {
byte[] buf = new byte[in.end - in.start];
in.buffer.getBytes(in.start, buf, 0, in.end - in.start);
throw new NumberFormatException(new String(buf,
com.google.common.base.Charsets.UTF_8));
}
if (next > 4) {
out.setInteger(decimalBufferIndex,
out.getInteger(decimalBufferIndex) + 1);
}
}
int padding = (int)
org.apache.drill.common.util.DecimalUtility.getPowerOfTen((int)
(org.apache.drill.common.util.DecimalUtility.MAX_DIGITS - ndigits));
out.setInteger(decimalBufferIndex, out.getInteger(decimalBufferIndex) *
padding);
int carry = 0;
do {
int tempValue = out.getInteger(decimalBufferIndex) + carry;
if (tempValue >=
org.apache.drill.common.util.DecimalUtility.DIGITS_BASE) {
carry = tempValue /
org.apache.drill.common.util.DecimalUtility.DIGITS_BASE;
tempValue = (tempValue %
org.apache.drill.common.util.DecimalUtility.DIGITS_BASE);
} else
{
carry = 0;
}
out.setInteger(decimalBufferIndex--, tempValue);
}while (carry > 0 && decimalBufferIndex >= 0);
}
out.setSign(sign);
}
work18 = buffer;
out.isSet = 1;
out27 = out;
out.isSet = 1;
}
}
//---- end of eval portion of castDECIMAL28SPARSE function. ----//
//---- start of eval portion of mod function. ----//
NullableDecimal28SparseHolder out28 = new
NullableDecimal28SparseHolder();
{
if ((out17 .isSet*out27 .isSet) == 0) {
out28 .isSet = 0;
} else {
final NullableDecimal28SparseHolder result = new
NullableDecimal28SparseHolder();
NullableDecimal28SparseHolder left = out17;
NullableDecimal28SparseHolder right = out27;
ByteBuf buffer = work0;
int outputScale = work1;
int outputPrecision = work2;
Decimal28SparseFunctions$Decimal28SparseModFunction_eval: {
if (outputPrecision == Integer.MIN_VALUE) {
org.apache.drill.common.util.DecimalScalePrecisionDivideFunction
resultScalePrec = new
org.apache.drill.common.util.DecimalScalePrecisionDivideFunction((int)
left.precision, (int) left.scale, (int) right.precision, (int) right.scale);
outputScale = resultScalePrec.getOutputScale();
outputPrecision = resultScalePrec.getOutputPrecision();
}
result.scale = outputScale;
result.precision = outputPrecision;
result.buffer = buffer;
result.start = 0;
java.math.BigDecimal numerator =
org.apache.drill.common.util.DecimalUtility.getBigDecimalFromByteBuf(
left.buffer,
left.start,
left.nDecimalDigits,
left.scale,
true
);
java.math.BigDecimal denominator =
org.apache.drill.common.util.DecimalUtility.getBigDecimalFromByteBuf(
right.buffer,
right.start,
right.nDecimalDigits,
right.scale,
true
);
java.math.BigDecimal output = numerator.remainder(denominator);
output.setScale(result.scale, java.math.BigDecimal.ROUND_DOWN);
for (int i = 0; i < 5; i++) {
result.setInteger(i, 0);
}
org.apache.drill.common.util.DecimalUtility.getSparseFromBigDecimal(
output,
result.buffer,
result.start,
result.scale,
result.precision,
result.nDecimalDigits
);
}
work0 = buffer;
work1 = outputScale;
work2 = outputPrecision;
result.isSet = 1;
out28 = result;
result.isSet = 1;
}
}
//---- end of eval portion of mod function. ----//
BitHolder out32 = new BitHolder();
out32 .value = 1;
if (!(out28 .isSet == 0)) {
if (!vv29 .getMutator().setSafe((outIndex), out28)) {
out32 .value = 0;
}
} else {
if (!vv29 .getMutator().isSafe((outIndex))) {
out32 .value = 0;
}
}
if (out32 .value == 0) {
return false;
}
}
{
return true;
}
}
public void doSetup(FragmentContext context, RecordBatch incoming,
RecordBatch outgoing)
throws SchemaChangeException
{
{
int[] fieldIds5 = new int[ 1 ] ;
fieldIds5 [ 0 ] = 1;
Object tmp6 =
(incoming).getValueAccessorById(NullableVarBinaryVector.class,
fieldIds5).getValueVector();
if (tmp6 == null) {
throw new SchemaChangeException("Failure while loading vector
vv4 with id: org.apache.drill.exec.record.TypedFieldId@481f6bbc.");
}
vv4 = ((NullableVarBinaryVector) tmp6);
BigIntHolder out8 = new BigIntHolder();
out8 .value = 18L;
constant9 = out8;
BigIntHolder out10 = new BigIntHolder();
out10 .value = 0L;
constant11 = out10;
/** start SETUP for function castDECIMAL18 **/
{
BigIntHolder precision = constant9;
BigIntHolder scale = constant11;
{}
}
/** end SETUP for function castDECIMAL18 **/
BigIntHolder out13 = new BigIntHolder();
out13 .value = 18L;
constant14 = out13;
BigIntHolder out15 = new BigIntHolder();
out15 .value = 0L;
constant16 = out15;
/** start SETUP for function castDECIMAL28SPARSE **/
{
BigIntHolder precision = constant14;
BigIntHolder scale = constant16;
ByteBuf buffer = work3;
CastDecimal18Decimal28Sparse_setup: {
int size = (5 * (org.apache.drill.common.util.DecimalUtility.integerSize));
buffer = io.netty.buffer.Unpooled.wrappedBuffer(new byte[size]);
buffer = new io.netty.buffer.SwappedByteBuf(buffer);
}
work3 = buffer;
}
/** end SETUP for function castDECIMAL28SPARSE **/
int[] fieldIds20 = new int[ 1 ] ;
fieldIds20 [ 0 ] = 2;
Object tmp21 =
(incoming).getValueAccessorById(NullableVarBinaryVector.class,
fieldIds20).getValueVector();
if (tmp21 == null) {
throw new SchemaChangeException("Failure while loading vector
vv19 with id: org.apache.drill.exec.record.TypedFieldId@49d4445b.");
}
vv19 = ((NullableVarBinaryVector) tmp21);
BigIntHolder out23 = new BigIntHolder();
out23 .value = 28L;
constant24 = out23;
BigIntHolder out25 = new BigIntHolder();
out25 .value = 0L;
constant26 = out25;
/** start SETUP for function castDECIMAL28SPARSE **/
{
BigIntHolder precision = constant24;
BigIntHolder scale = constant26;
ByteBuf buffer = work18;
CastVarCharDecimal28Sparse_setup: {
int size = 5 * (org.apache.drill.common.util.DecimalUtility.integerSize);
buffer = io.netty.buffer.Unpooled.wrappedBuffer(new byte[size]);
buffer = new io.netty.buffer.SwappedByteBuf(buffer);
}
work18 = buffer;
}
/** end SETUP for function castDECIMAL28SPARSE **/
/** start SETUP for function mod **/
{
ByteBuf buffer = work0;
int outputScale = work1;
int outputPrecision = work2;
Decimal28SparseFunctions$Decimal28SparseModFunction_setup: {
int size = (5 * (org.apache.drill.common.util.DecimalUtility.integerSize));
buffer = io.netty.buffer.Unpooled.wrappedBuffer(new byte[size]);
buffer = new io.netty.buffer.SwappedByteBuf(buffer);
outputPrecision = Integer.MIN_VALUE;
}
work0 = buffer;
work1 = outputScale;
work2 = outputPrecision;
}
/** end SETUP for function mod **/
int[] fieldIds30 = new int[ 1 ] ;
fieldIds30 [ 0 ] = 0;
Object tmp31 =
(outgoing).getValueAccessorById(NullableDecimal18Vector.class,
fieldIds30).getValueVector();
if (tmp31 == null) {
throw new SchemaChangeException("Failure while loading vector
vv29 with id: org.apache.drill.exec.record.TypedFieldId@5f21eb66.");
}
vv29 = ((NullableDecimal18Vector) tmp31);
}
}
}
org.apache.drill.exec.compile.ClassTransformer.getImplementationClass(ClassTransformer.java:302)
~[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:184)
~[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]
... 12 more
Caused by: org.codehaus.commons.compiler.CompileException: Line 461, Column 48:
No applicable constructor/method found for actual parameters "int,
org.apache.drill.exec.expr.holders.NullableDecimal28SparseHolder"; candidates
are: "public boolean
org.apache.drill.exec.vector.NullableDecimal18Vector$Mutator.setSafe(int,
long)", "public boolean
org.apache.drill.exec.vector.NullableDecimal18Vector$Mutator.setSafe(int,
org.apache.drill.exec.expr.holders.NullableDecimal18Holder)", "public boolean
org.apache.drill.exec.vector.NullableDecimal18Vector$Mutator.setSafe(int,
org.apache.drill.exec.expr.holders.Decimal18Holder)", "public boolean
org.apache.drill.exec.vector.NullableDecimal18Vector$Mutator.setSafe(int,
byte[], int, int)"
org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:9014)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.findMostSpecificIInvocable(UnitCompiler.java:6714)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:6589)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:6488)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:3429)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.access$6300(UnitCompiler.java:104)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler$11.visitMethodInvocation(UnitCompiler.java:2869)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.Java$MethodInvocation.accept(Java.java:2831)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:2890)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:3897)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileBoolean2(UnitCompiler.java:2504)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.access$4200(UnitCompiler.java:104)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler$9.visitMethodInvocation(UnitCompiler.java:2473)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.Java$MethodInvocation.accept(Java.java:2831)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileBoolean(UnitCompiler.java:2494)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileBoolean2(UnitCompiler.java:2520)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.access$4300(UnitCompiler.java:104)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler$9.visitUnaryOperation(UnitCompiler.java:2466)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.Java$UnaryOperation.accept(Java.java:2600)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileBoolean(UnitCompiler.java:2494)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1476)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.access$900(UnitCompiler.java:104)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler$5.visitIfStatement(UnitCompiler.java:869)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.Java$IfStatement.accept(Java.java:1504)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:888)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:914)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:900)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.access$700(UnitCompiler.java:104)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler$5.visitBlock(UnitCompiler.java:867)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.Java$Block.accept(Java.java:1395)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:888)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1466)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.access$900(UnitCompiler.java:104)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler$5.visitIfStatement(UnitCompiler.java:869)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.Java$IfStatement.accept(Java.java:1504)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:888)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:914)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:900)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.access$700(UnitCompiler.java:104)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler$5.visitBlock(UnitCompiler.java:867)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.Java$Block.accept(Java.java:1395)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:888)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:914)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1999)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:789)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:770)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:464)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:357)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java:312)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:770)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:319)
~[janino-2.6.1.jar:2.6.1]
org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:288)
~[janino-2.6.1.jar:2.6.1]
org.apache.drill.exec.compile.JaninoClassCompiler.getClassByteCode(JaninoClassCompiler.java:53)
~[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:69)
~[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:256)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
... 14 more
> mod(decimal, decimal) caused SchemaChangeException - regression
> ---------------------------------------------------------------
>
> Key: DRILL-1110
> URL: https://issues.apache.org/jira/browse/DRILL-1110
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Drill
> Reporter: Chun Chang
> Assignee: Mehant Baid
>
> #Thu Jul 03 11:10:28 PDT 2014
> git.commit.id.abbrev=790a2ad
> The following query mod(decimal, decimal) worked before, so this is a
> regression.
> 0: jdbc:drill:schema=dfs> select mod(cast(c_decimal18 as decimal(18,0)),
> cast(c_decimal28 as decimal(28,0))) from data where c_row = 11;
> Query failed: org.apache.drill.exec.rpc.RpcException: [error_id:
> "7ed2a242-6b8b-4495-a186-123c7867774a"
> endpoint {
> address: "qa-node117.qa.lab"
> user_port: 31010
> control_port: 31011
> data_port: 31012
> }
> error_type: 0
> message: "Screen received stop request sent. < SchemaChangeException:[
> Failure while attempting to load generated class ] <
> ClassTransformationException:[ Failure generating transformation classes for
> value:
> package org.apache.drill.exec.test.generated;
> import io.netty.buffer.ByteBuf;
> import org.apache.drill.exec.exception.SchemaChangeException;
> import org.apache.drill.exec.expr.holders.BigIntHolder;
> import org.apache.drill.exec.expr.holders.BitHolder;
> import org.apache.drill.exec.expr.holders.NullableDecimal18Holder;
> import org.apache.drill.exec.expr.holders.NullableDecimal28SparseHolder;
> import org.apache.drill.exec.expr.holders.NullableVarBinaryHolder;
> import org.apache.drill.exec.ops.FragmentContext;
> import org.apache.drill.exec.record.RecordBatch;
> import org.apache.drill.exec.vector.NullableDecimal18Vector;
> import org.apache.drill.exec.vector.NullableVarBinaryVector;
> public class ProjectorGen3 {
--
This message was sent by Atlassian JIRA
(v6.2#6252)