Github user arunmahadevan commented on a diff in the pull request: https://github.com/apache/storm/pull/1169#discussion_r54837625 --- 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 -- The syntax closely follows the hive syntax for defining UDFs. Whats required is each UDF should map to a unique class with an `evaluate` method. Multiple such classes can be in the same jar and added to the classpath. (for storm, it could be placed under extlib directory). Will update the docs with this info. Hive has an additional syntax to specify jar file in its DDL syntax which is not supported as of now.
--- 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. ---