zhli1142015 opened a new pull request, #5376:
URL: https://github.com/apache/incubator-gluten/pull/5376

   ## What changes were proposed in this pull request?
   
   Timestamps data would loss prescision when doing broadcast serialization.
   
   ```
   import org.apache.spark.sql.functions.expr
   import org.apache.spark.sql.catalyst.expressions._
   spark.range(0, 5).toDF("id").createOrReplaceTempView("target")
   spark.range(0, 10)
           .toDF("id")
           .withColumn("timestampOne", expr("timestamp_micros(id)"))
           .withColumn("timestampTwo", expr("timestamp_micros(id)"))
           .createOrReplaceTempView("source")
   
   spark.sql("SELECT unix_micros(source.timestampOne) FROM source RIGHT OUTER 
JOIN target ON target.id = source.id").show(false)
   ```
   Wrong result:
   ```
   +-------------------------+
   |unix_micros(timestampOne)|
   +-------------------------+
   |0                        |
   |0                        |
   |0                        |
   |0                        |
   |0                        |
   +-------------------------+
   ```
   Expected result:
   ```
   +-------------------------+
   |unix_micros(timestampOne)|
   +-------------------------+
   |0                        |
   |1                        |
   |2                        |
   |3                        |
   |4                        |
   +-------------------------+
   ```
   
   ## How was this patch tested?
   Test
   
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to