[BUG][Spark] delta-spark allows reading column mapping when missing from table features #3890
Open
2 of 8 tasks
Labels
bug
Something isn't working
Bug
Which Delta project/connector is this regarding?
Describe the problem
TLDR you can relatively easily create a table which (according to the protocol) shouldn't allow column mapping, but is read with column mapping in delta-spark.
I think there are two pieces to this issue:
upgradeTableProtocol
will upgrade from reader version 2 to reader version 3 without adding any table features. This is a problem since it effectively silently turns of column mapping. (since it is enabled/supported in reader version 2 but requires that the table feature be present when reader version is 3)Steps to reproduce
See example below for code implementing these steps:
"writerFeatures":["columnMapping","icebergCompatV1"]
anddelta.columnMapping.mode = name
upgradeTableProtocol(3, 7)
gives reader version 3 with no reader features. this effectively turns off column mapping.columnMapping = name
Observed results
Read with column mapping
Expected results
Should not be read with column mapping
Further details
Environment information
3.2.1
Willingness to contribute
The Delta Lake Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the Delta Lake code base?
The text was updated successfully, but these errors were encountered: