ShreyeshArangath opened a new issue, #1646:
URL: https://github.com/apache/auron/issues/1646

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   isnan currently uses math::isnan which propagates nulls and can mismatch 
Spark semantics. In Spark, isnan(null) must return false, not null. 
Additionally, computed NaN values like log(-3) may not be handled consistently 
during Parquet round-trip.
   
   
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   1. Go to '...'
   2. Click on '....'
   3. Scroll down to '....'
   4. See error
   -->
   Failing UTs as reported in #1595 
   
   ```sql
   create table test_is_nan using parquet as
   select
     cast('NaN' as double) as c1,
     cast('NaN' as float)  as c2,
     log(-3)               as c3,
     cast(null as double)  as c4,
     5.5f                  as c5,
     cast(null as float)   as c6;
   ```
   
   ```sql
   select isnan(c1), isnan(c2), isnan(c3), isnan(c4), isnan(c5), isnan(c6) from 
test_is_nan;
   ```
   
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   ```
   isnan(c1) = true (NaN)
   isnan(c2) = true (NaN)
   isnan(c3) = true (NaN from log(-3)) [note: verify Parquet round-trip 
behavior]
   isnan(c4) = false (null → false)
   isnan(c5) = false
   isnan(c6) = false (null → false)
   ````
   **Actual behavior**
   ```
   In native execution, nulls in isnan previously surfaced as:
   java.lang.IllegalStateException: Value at index is null from 
spark_udf_wrapper.rs during project output.
   ```
   
   **Screenshots**
   <!--
   If applicable, add screenshots to help explain your problem.
   -->
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to