[ 
https://issues.apache.org/jira/browse/CALCITE-2741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722308#comment-16722308
 ] 

Julian Hyde commented on CALCITE-2741:
--------------------------------------

Your use case - implementing Hive SQL on top of an engine that is not Hive - 
makes a lot of sense.

Your initial description, "native enumerable implementation", was a bit 
confusing but I know what you mean. I'd change the description to "Add operator 
table with Hive-specific built-in functions", I think it would be clearer. Once 
you have parsed the SQL, and validated the functions, it goes without saying 
that you'd be able to execute using Calcite's "built-in engine", enumerable.

We already have an OracleSqlOperatorTable, so it makes sense to add 
HiveSqlOperatorTable. People could add "fun=hive" to the JDBC connect string to 
activate the table; see "fun=oracle".

As part of the implementation, can you please add the functions to 
https://calcite.apache.org/docs/reference.html clearly indicating that they are 
Hive-specific? (We should have done that for Oracle-specific functions like 
DECODE, LTRIM, NVL but didn't.) Also add tests that the operators are only 
available in Hive mode (see what we did for Oracle functions.)

The operator table can live in "core". If you need to change the syntax, let's 
discuss, but probably "babel" is the right place.

> extend the native  enumerable implemention of calcite to support Hive SQL 
> --------------------------------------------------------------------------
>
>                 Key: CALCITE-2741
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2741
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core
>            Reporter: Lai Zhou
>            Assignee: Julian Hyde
>            Priority: Minor
>
> [~julianhyde],
> I extended the native enummerable implemention of calcite to support Hive sql 
> ,include UDF、UDAF and all the SqlSpecialOperator,which inspired by apache 
> Drills.
> I modified the parser,type systems,and bridge the hive operator .
> How do you think of supporting a direct implemention of hive sql like this?
> I think it will be valueable when someone want to migrate his hive etl jobs 
> to real-time scene.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to