Description
Currently SqlHandlers such as CreateTable or ViewHandler send the error messages as bad command records. Instead we should throw a UserException.
0: jdbc:drill:zk=local> create table t1 as select * from cp.`region.json`; +------------+------------+ | ok | summary | +------------+------------+ | false | Unable to create table. Schema [dfs.default] is immutable. | +------------+------------+ 1 row selected (0.103 seconds)
Instead it should be like:
0: jdbc:drill:zk=10.10.30.143:5181> create table t1 as select * from cp.`region.json`;
Error: PARSE ERROR: Unable to create or drop tables/views. Schema [dfs.default] is immutable.
[Error Id: 3a92d026-3df7-4e8b-8988-2300463fa00b on centos64-30146.qa.lab:31010] (state=,code=0)