verdict-project / verdict

Interactive-Speed Analytics: 200x Faster, 200x Fewer Cluster Resources, Approximate Query Processing
http://verdictdb.org
Apache License 2.0
249 stars 66 forks source link

NullPointerException when issue statement not supported/used by VerdictDB #194

Closed dongyoungy closed 6 years ago

dongyoungy commented 6 years ago

For instance, if a user wants to drop a table with a Verdict connection, it will generate a NullPointerException because it cannot find a query type for "drop table":

Exception in thread "main" java.lang.NullPointerException
    at org.verdictdb.coordinator.ExecutionContext.streamsql(ExecutionContext.java:93)
    at org.verdictdb.coordinator.ExecutionContext.sql(ExecutionContext.java:78)
    at org.verdictdb.jdbc41.VerdictStatement.execute(VerdictStatement.java:48)
    at VerdictTutorialMain.createScrambleTable(VerdictTutorialMain.java:52)
    at VerdictTutorialMain.main(VerdictTutorialMain.java:36)
pyongjoo commented 6 years ago

Let's just throw this exception: https://github.com/mozafari/verdictdb/blob/master/src/main/java/org/verdictdb/exception/VerdictDBTypeException.java

dongyoungy commented 6 years ago

Hmm... I guess we need to bypass such statements that VerdictDB does not support to the original JDBC connection and return the results as-is in the long run.