You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jim Scott (JIRA)" <ji...@apache.org> on 2014/07/23 17:00:50 UTC
[jira] [Created] (DRILL-1173) Query CSV file works fine, add an AND
clause and it blows up
Jim Scott created DRILL-1173:
--------------------------------
Summary: Query CSV file works fine, add an AND clause and it blows up
Key: DRILL-1173
URL: https://issues.apache.org/jira/browse/DRILL-1173
Project: Apache Drill
Issue Type: Bug
Components: Client - CLI
Affects Versions: 1.0.0
Environment: Linux Mint, Java 1.7.0_51
Reporter: Jim Scott
I have a simple CSV address list file.
When I run this query it runs fine:
!sql select columns[4] as first, columns[6] as last from dfs.`/data/AddressList.csv` where columns[4] like '%B%';
When I run this query the following error occurs:
!sql select columns[4] as first, columns[6] as last from dfs.`/data/AddressList.csv` where columns[4] like '%B%' and columns[6] like '%S%';
Exception in thread "343e9a34-bf64-4e8a-817d-91f0884dd086:frag:0:0 - Producer Thread" java.lang.UnsupportedOperationException: Attemped to access a DeadBuf. This would happen if you attempted to interact with a buffer that has been moved or not yet initialized.
at org.apache.drill.exec.record.DeadBuf.getInt(DeadBuf.java:240)
at org.apache.drill.exec.vector.UInt4Vector$Accessor.get(UInt4Vector.java:293)
at org.apache.drill.exec.vector.RepeatedVarCharVector$Mutator.setValueCount(RepeatedVarCharVector.java:463)
at org.apache.drill.exec.store.text.DrillTextRecordReader.next(DrillTextRecordReader.java:160)
at org.apache.drill.exec.physical.impl.ScanBatch.next(ScanBatch.java:138)
at org.apache.drill.exec.physical.impl.producer.ProducerConsumerBatch$Producer.run(ProducerConsumerBatch.java:122)
at java.lang.Thread.run(Thread.java:744)
Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id: "348b4278-1e73-4211-a4a7-787ff6bfd582"
endpoint {
address: "blandserver"
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 java.util.regex.Pattern;
import org.apache.drill.exec.exception.SchemaChangeException;
import org.apache.drill.exec.expr.holders.NullableBitHolder;
import org.apache.drill.exec.expr.holders.NullableVarCharHolder;
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.ValueHolderHelper;
public class FiltererGen24 {
Pattern work1;
RepeatedVarCharVector vv2;
VarCharHolder string6;
VarCharHolder constant7;
Pattern work9;
RepeatedVarCharVector vv10;
VarCharHolder string14;
VarCharHolder constant15;
public boolean doEval(int inIndex, int outIndex)
throws SchemaChangeException
{
{
NullableBitHolder out0 = new NullableBitHolder();
AndOP0:
{
NullableVarCharHolder out5 = new NullableVarCharHolder();
int isNull = 0;
complex:
vv2 .getAccessor().getReader().setPosition((inIndex));
vv2 .getAccessor().getReader().read(6, out5);
//---- start of eval portion of like function. ----//
NullableBitHolder out8 = new NullableBitHolder();
{
if (out5 .isSet == 0) {
out8 .isSet = 0;
} else {
final NullableBitHolder out = new NullableBitHolder();
NullableVarCharHolder input = out5;
VarCharHolder pattern = constant7;
Pattern regPattern = work1;
StringFunctions$Like_eval: {
out.value = regPattern.matcher(input.toString()).matches() ? 1 : 0;
}
work1 = regPattern;
out.isSet = 1;
out8 = out;
out.isSet = 1;
}
}
//---- end of eval portion of like function. ----//
if ((out8 .isSet == 1)&&(out8 .value!= 1)) {
out0 .isSet = 1;
out0 .value = 0;
break AndOP0;
}
NullableVarCharHolder out13 = new NullableVarCharHolder();
int isNull = 0;
complex:
vv10 .getAccessor().getReader().setPosition((inIndex));
vv10 .getAccessor().getReader().read(4, out13);
//---- start of eval portion of like function. ----//
NullableBitHolder out16 = new NullableBitHolder();
{
if (out13 .isSet == 0) {
out16 .isSet = 0;
} else {
final NullableBitHolder out = new NullableBitHolder();
NullableVarCharHolder input = out13;
VarCharHolder pattern = constant15;
Pattern regPattern = work9;
StringFunctions$Like_eval: {
out.value = regPattern.matcher(input.toString()).matches() ? 1 : 0;
}
work9 = regPattern;
out.isSet = 1;
out16 = out;
out.isSet = 1;
}
}
//---- end of eval portion of like function. ----//
if ((out16 .isSet == 1)&&(out16 .value!= 1)) {
out0 .isSet = 1;
out0 .value = 0;
break AndOP0;
}
if ((out8 .isSet*out16 .isSet) == 0) {
out0 .isSet = 0;
} else {
out0 .isSet = 1;
out0 .value = 1;
}
}
return (out0 .value == 1);
}
}
public void doSetup(FragmentContext context, RecordBatch incoming, RecordBatch outgoing)
throws SchemaChangeException
{
{
int[] fieldIds3 = new int[ 1 ] ;
fieldIds3 [ 0 ] = 0;
Object tmp4 = (incoming).getValueAccessorById(RepeatedVarCharVector.class, fieldIds3).getValueVector();
if (tmp4 == null) {
throw new SchemaChangeException("Failure while loading vector vv2 with id: org.apache.drill.exec.record.TypedFieldId@33526f4d.");
}
vv2 = ((RepeatedVarCharVector) tmp4);
string6 = ValueHolderHelper.getVarCharHolder("%S%");
constant7 = string6;
/** start SETUP for function like **/
{
VarCharHolder pattern = constant7;
Pattern regPattern = work1;
StringFunctions$Like_setup: {
regPattern = java.util.regex.Pattern.compile(org.apache.drill.exec.expr.fn.impl.RegexpUtil.sqlToRegexLike(pattern.toString()));
}
work1 = regPattern;
}
/** end SETUP for function like **/
int[] fieldIds11 = new int[ 1 ] ;
fieldIds11 [ 0 ] = 0;
Object tmp12 = (incoming).getValueAccessorById(RepeatedVarCharVector.class, fieldIds11).getValueVector();
if (tmp12 == null) {
throw new SchemaChangeException("Failure while loading vector vv10 with id: org.apache.drill.exec.record.TypedFieldId@335267cb.");
}
vv10 = ((RepeatedVarCharVector) tmp12);
string14 = ValueHolderHelper.getVarCharHolder("%B%");
constant15 = string14;
/** start SETUP for function like **/
{
VarCharHolder pattern = constant15;
Pattern regPattern = work9;
StringFunctions$Like_setup: {
regPattern = java.util.regex.Pattern.compile(org.apache.drill.exec.expr.fn.impl.RegexpUtil.sqlToRegexLike(pattern.toString()));
}
work9 = regPattern;
}
/** end SETUP for function like **/
}
}
}
] < CompileException:[ Line 65, Column 27: Redefinition of local variable "isNull" ]"
]Error: exception while executing query (state=,code=0)
--
This message was sent by Atlassian JIRA
(v6.2#6252)