sezruby opened a new issue, #10511:
URL: https://github.com/apache/incubator-gluten/issues/10511

   ### Backend
   
   VL (Velox)
   
   ### Bug description
   
   ```
    spark.sql(s"""
                       |create table delta_cm2 (id int, name string) using delta
                       |partitioned by (id)
                       |tblproperties ("delta.columnMapping.mode"= "name")
                       |""".stripMargin)
   spark.sql(s"""
                       |insert into delta_cm2 values (1, "v1"), (2, "v2"), (3, 
"v3")
                       |""".stripMargin)
   spark.sql("select name from delta_cm2 where id > 2")
   ```
   
   [Expected behavior]
   returns ["v3"]
   
   [actual behavior]
   returns ["v1", "v2", "v3"]
   
   This is because Delta filtering expects logical column name in filters:
   
https://github.com/delta-io/delta/blob/44c619e51846f3e98aa6605d13fa4517de049281/spark/src/main/scala/org/apache/spark/sql/delta/stats/PrepareDeltaScan.scala#L356
   
   We need to add a fallback for column mapping mode, both id and name.
   
   ### Gluten version
   
   Gluten-1.3
   
   ### Spark version
   
   Spark-3.5.x
   
   ### Spark configurations
   
   Spark3.5 and Delta 3.2
   
   ### System information
   
   _No response_
   
   ### Relevant logs
   
   ```bash
   
   ```


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