[
https://issues.apache.org/jira/browse/DRILL-4691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295840#comment-15295840
]
Jeff Stout commented on DRILL-4691:
-----------------------------------
Sorry, I had intended on submitting a fix but ran into errors while trying to
run tests.
I'm using jdbc storage.
{
"type" : "jdbc",
"driver" : "com.mysql.jdbc.Driver",
"url" : "jdbc:mysql://localhost:3306/example?useSSL=false",
"username" : "example",
"password" : "abc.123",
"enabled" : true
}
Connection is fine, i can see tables.
0: jdbc:drill:zk=local> use jdbc.example;
+-------+-------------------------------------------+
| ok | summary |
+-------+-------------------------------------------+
| true | Default schema changed to [jdbc.example] |
+-------+-------------------------------------------+
1 row selected (0.075 seconds)
0: jdbc:drill:zk=local> show tables;
+---------------+-------------+
| TABLE_SCHEMA | TABLE_NAME |
+---------------+-------------+
| jdbc.example | test_01 |
+---------------+-------------+
1 row selected (0.121 seconds)
0: jdbc:drill:zk=local> describe `test_01`;
+--------------+------------+--------------+
| COLUMN_NAME | DATA_TYPE | IS_NULLABLE |
+--------------+------------+--------------+
| id | INTEGER | NO |
+--------------+------------+--------------+
I know this is an invalid command but the method is throwing a NPE while trying
to build the real error response.
0: jdbc:drill:zk=local> update `test_01` set id = 1;
Error: SYSTEM ERROR: NullPointerException
I believe it's trying to build this response response.
Error: PARSE ERROR: Unable to create or drop tables/views. Schema
[jdbc.example] is immutable.
Ping me if you need more, thanks Zelaine.
> SqlConvert.formatSQLParsingError can throw a NPE if
> ----------------------------------------------------
>
> Key: DRILL-4691
> URL: https://issues.apache.org/jira/browse/DRILL-4691
> Project: Apache Drill
> Issue Type: Bug
> Components: SQL Parser
> Affects Versions: 1.6.0
> Reporter: Jeff Stout
> Priority: Minor
>
> Caused by: java.lang.NullPointerException: null
> at
> org.apache.drill.exec.planner.sql.SqlConverter.formatSQLParsingError(SqlConverter.java:348)
> ~[drill-java-exec-1.6.0.jar:1.6.0]
> at
> org.apache.drill.exec.planner.sql.SqlConverter.parse(SqlConverter.java:135)
> ~[drill-java-exec-1.6.0.jar:1.6.0]
> at
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:67)
> ~[drill-java-exec-1.6.0.jar:1.6.0]
> at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:927)
> [drill-java-exec-1.6.0.jar:1.6.0]
> at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:251)
> [drill-java-exec-1.6.0.jar:1.6.0]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)