Github user haohui commented on a diff in the pull request: https://github.com/apache/storm/pull/1169#discussion_r56775610 --- Diff: external/sql/storm-sql-core/src/codegen/includes/parserImpls.ftl --- @@ -83,4 +83,23 @@ SqlNode SqlCreateTable() : input_format_class_name, output_format_class_name, location, tbl_properties, select); } +} + +/** + * CREATE FUNCTION functionname AS 'classname' + */ +SqlNode SqlCreateFunction() : +{ + SqlParserPos pos; + SqlIdentifier functionName; + SqlNode className; +} +{ + <CREATE> { pos = getPos(); } + <FUNCTION> + functionName = CompoundIdentifier() + <AS> + className = StringLiteral() { --- End diff -- That way the clauses might result into a parsing error. Instead of reporting a parsing error, it might be more user friendly to throw an UnimplementedException when compiling the SQL statements. It is your call.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---