[ https://issues.apache.org/jira/browse/IMPALA-7907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16719232#comment-16719232 ]
ASF subversion and git services commented on IMPALA-7907: --------------------------------------------------------- Commit d94a474658cb5f6114bc3cfb9a5426bdf1610e11 in impala's branch refs/heads/master from [~paul-rogers] [ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=d94a474 ] IMPALA-7907: Fix ScalarFunction.toSql() Each AST statement node has a toSql() implementation. The code for ScalarFunction and ToSqlUtils has a number of issues: * If Location or Symbol are not set, they are shown as 'null'. Better to omit these clauses if the items are not available. This is mostly an issue during testing. * The generated SQL does not follow the CREATE TABLE syntax. For example, the signature and return value are provided for Java functions, but should not be. * Unlike other statements, this one is generated with a trailing newline. * ToSql.getCreateFunctionSql() fails to separate functions with the semi-colon statement separator. These are all minor issues, but we might as well fix the code to work as intended. Testing: * Added a new unit tests to verify the behavior (no tested existed previously.) * Re-ran all FE tests. Change-Id: Id34d6df97760a11c299092dff8edbdb7033bce1c Reviewed-on: http://gerrit.cloudera.org:8080/12014 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> > Multiple toSql() bugs in ScalarFunction > --------------------------------------- > > Key: IMPALA-7907 > URL: https://issues.apache.org/jira/browse/IMPALA-7907 > Project: IMPALA > Issue Type: Bug > Components: Frontend > Affects Versions: Impala 3.0 > Reporter: Paul Rogers > Assignee: Paul Rogers > Priority: Minor > > Each AST statement node has a {{toSql()}} implementation. The code for > {{ScalarFunction}} and ToSqlUtils has a number of issues: > * If Location or Symbol are not set, they are shown as {{'null'}}. Better to > omit these clauses if the items are not available. > * The generated SQL does not follow the [Impala CREATE TABLE|] syntax. For > example, the signature and return value are provided for JAVA functions, but > should not be. > * Unlike other statements, this one is generated with a trailing newline. > * {{ToSql.getCreateFunctionSql()}} fails to separate functions with the > semi-colon statement terminator. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org