The main purpose of toSql() is for creating views and the "show create
table" statement.

Note that when creating a view it is not correct to just dump the query
text as is into the Hive Metastore because table names need to be resolved
and fully qualified when storing the view definition.

On Wed, Sep 21, 2016 at 12:03 PM, Zoltan Ivanfi <z...@cloudera.com> wrote:

> Dear Impala Developers,
>
> I looked into IMPALA-784, which is about properly quoting the result of a
> "show create table" command. I noticed the ToSqlTest which checks that
> ParseNode.toSql() applies proper quoting. However, I found that the handler
> of the "show create table" statement does not use ParseNode.toSql() at all
> (presumably because the ParseNode object for the "create table" statement
> ceases to exist once the statement is executed). This however leaves me
> wondering: What is ParseNode.toSql() actually used for beside being tested?
>
> Thanks,
>
> Zoltan
>

Reply via email to