jinchengchenghh opened a new issue, #11135:
URL: https://github.com/apache/incubator-gluten/issues/11135
### Description
```
[ERROR]
TestGlutenDataFrameWriterV2>TestDataFrameWriterV2.testMergeSchemaIgnoreCastingDoubleToFloat:290->SparkTestHelperBase.assertEquals:67->SparkTestHelperBase.assertEquals:87
[Should include new rows with unchanged double column type: row 1 col 1
contents should match]
expected: 1.0
but was: 5.325712093E-315
```
If user ever set TableProperties.SPARK_WRITE_ACCEPT_ANY_SCHEMA and merge
schema to true to write the data, source column is double, but the Spark
dataframe type is float, iceberg will write the float in parquet file.
```
scala> val df =
spark.read.parquet("/Users/chengchengjin/code/test/table/data/00001-6-45ee1a66-11a1-49f4-ad79-5c66c8f67d6d-0-00001.parquet")
df: org.apache.spark.sql.DataFrame = [id: float, data: string]
scala> df.printSchema()
root
|-- id: float (nullable = true)
|-- data: string (nullable = true)
```
This PR https://github.com/apache/iceberg/pull/11419 supports the feature.
Now fallback for table property SPARK_WRITE_ACCEPT_ANY_SCHEMA to true
### Gluten version
None
--
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]