[ 
https://issues.apache.org/jira/browse/BEAM-11747?focusedWorklogId=553996&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-553996
 ]

ASF GitHub Bot logged work on BEAM-11747:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Feb/21 00:42
            Start Date: 18/Feb/21 00:42
    Worklog Time Spent: 10m 
      Work Description: amaliujia commented on pull request #13898:
URL: https://github.com/apache/beam/pull/13898#issuecomment-780950443


   Calcite does more for built-in operators than UDF. Using CAST as an example: 
 
https://github.com/apache/calcite/blob/d815dc1209c3cc0728941e9fc81fce7d9e44c79b/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java#L248
 .
   
   For UDF, fortunately, Calcite does less. Basically Calcite will either 
generate the string representation of a value (i.e. Literal) or make a Row 
field access (i.e. column), and then make a reflection call on the UDF 
implementation. So for UDF, I think we only need to verify 1) whether Calcite 
does anything that make the value lose precision 2) whether Calcite generates a 
correct string representation for value or make correct field access to Row. 
The verification work will be much less compared to checking the built-in 
operators.
   
   I agree this PR could be an upper bound for the limitation of Java UDF, what 
I want to see is whether we can do better.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 553996)
    Time Spent: 7h 50m  (was: 7h 40m)

> Reject the mixed Java UDF and ZetaSQL builtin operators cases 
> --------------------------------------------------------------
>
>                 Key: BEAM-11747
>                 URL: https://issues.apache.org/jira/browse/BEAM-11747
>             Project: Beam
>          Issue Type: Sub-task
>          Components: dsl-sql-zetasql
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: P2
>          Time Spent: 7h 50m
>  Remaining Estimate: 0h
>
> Before we have Calc splitting implemented, we can reject the mixed Java UDF 
> and ZetaSQL builtin operators cases to maintain the correctness of a query.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to