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

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

                Author: ASF GitHub Bot
            Created on: 21/Jul/20 20:26
            Start Date: 21/Jul/20 20:26
    Worklog Time Spent: 10m 
      Work Description: ZijieSong946 commented on pull request #12292:
URL: https://github.com/apache/beam/pull/12292#issuecomment-662088537


   I dug into this problem and figured out that we should avoid hitting into 
the operation simplification branch here 
(https://github.com/apache/calcite/blob/3530daaa8cad43aad6845b6c79e4bc1ca0e72f5f/core/src/main/java/org/apache/calcite/rex/RexSimplify.java#L325).
   For the current Calcite version we use (1.20), there is no check for 
`isDeterministic()`, it is added on Mar.6. 
(https://github.com/apache/calcite/pull/1818)
   So, we have to make `equals()` to be false. As for `RexLiteral.equals()`, it 
checks if the type and the value equals. 
(https://github.com/apache/calcite/blob/3530daaa8cad43aad6845b6c79e4bc1ca0e72f5f/core/src/main/java/org/apache/calcite/rex/RexLiteral.java#L1084-L1088)
   I decided to add a random parameter to the `Nan` wrapper function for make 
two `Nan` different in value to avoid operation simplification in Calcite.
   @robinyqiu  @apilloud 


----------------------------------------------------------------
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: 461749)
    Time Spent: 5h 10m  (was: 5h)

> Support NAN, INF, and -INF
> --------------------------
>
>                 Key: BEAM-8057
>                 URL: https://issues.apache.org/jira/browse/BEAM-8057
>             Project: Beam
>          Issue Type: Improvement
>          Components: dsl-sql-zetasql
>            Reporter: Rui Wang
>            Priority: P3
>          Time Spent: 5h 10m
>  Remaining Estimate: 0h
>




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

Reply via email to