Nope, Same query works fine on sqlline and in v1.1.0 release too. The issue is V1.1.0 doesn't support prepared statement so I thought if current build is supporting it, I will use it. But I'm encountering whole new issues here.

On Monday 05 October 2015 09:17 PM, Abdel Hakim Deneche wrote:
Hey Nikunj,

Do you get an error if you run the same query in sqlline ?

Thanks

On Mon, Oct 5, 2015 at 7:26 AM, Boris Chmiel <[email protected]
wrote:
Hi NikunjNo idea about the meaning this error. I has encountered it many
times I found a workaround to get rid of it by changing my request (usually
split it into 2 sub-queries)Good luck



      Le Lundi 5 octobre 2015 12h57, Nikunj Thakkar <
[email protected]> a écrit :


  Hi,


I'm executing simple statement in current master branch of drill. Getting
following exceptions:

java.sql.SQLException: Unexpected RuntimeException:
java.lang.IndexOutOfBoundsException: Index: 0
     at

org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:261)
     at

org.apache.drill.jdbc.impl.DrillCursor.loadInitialSchema(DrillCursor.java:290)
     at

org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:1359)
     at

org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:74)
     at

net.hydromatic.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:404)
     at

net.hydromatic.avatica.AvaticaStatement.executeQueryInternal(AvaticaStatement.java:351)
     at

net.hydromatic.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:78)
     at

org.apache.drill.jdbc.impl.DrillStatementImpl.executeQuery(DrillStatementImpl.java:97)
     at org.apache.drill.jdbc.SampleTest.setup(SampleTest.java:21)
     at org.apache.drill.jdbc.SampleTest.testSample(SampleTest.java:29)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at

com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
     at

com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
     at
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0
     at java.util.Collections$EmptyList.get(Collections.java:4454)
     at

org.apache.drill.exec.proto.UserBitShared$SerializedField.getChild(UserBitShared.java:8390)
     at
org.apache.drill.exec.vector.VarCharVector.load(VarCharVector.java:184)
     at

org.apache.drill.exec.vector.complex.BaseRepeatedValueVector.load(BaseRepeatedValueVector.java:161)
     at

org.apache.drill.exec.record.RecordBatchLoader.load(RecordBatchLoader.java:102)
     at

org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:223)
     ... 19 more

Code:

Class.forName("org.apache.drill.jdbc.Driver");
Connection connection =

DriverManager.getConnection("jdbc:drill:zk=<my_zookepper_url>:2181/drill/drillbits1");
Statement st = connection.createStatement();
ResultSet rs = st.executeQuery("select * from hdfs.`/test/example.csv`
limit 10");
while (rs.next()) {
     System.out.println(rs.getString(1));
}

Any help would be appreciated.

Thanks,
Nikunj







<http://www.quotesdaddy.com/quote/242378/dave-checkett/success-builds-character-failure-reveals-it>

Reply via email to