shivadarshan-devadiga commented on PR #13827: URL: https://github.com/apache/gluten/pull/13827#issuecomment-7256905031
@yaooqinn Thanks, both good points. Addressed in 7beb4d2: 1. `velox-backend-limitations.md` now says that the native scan can't skip corrupt files, so when Spark would skip them, file source and Hive table scans fall back: when `spark.sql.files.ignoreCorruptFiles` or the `ignoreCorruptFiles` read option is true, or, for Hive tables before Spark 4.0, `spark.files.ignoreCorruptFiles`. It also says that this applies to every such scan, also when no file is corrupt, so a session-wide `true` moves them to Spark. And yes, a switch helps there: `spark.gluten.sql.scan.fallbackOnIgnoreCorruptFiles.enabled` (default `true`), modeled on `fallbackOnExistenceDefaults`, keeps these scans native when set to `false`, where a corrupt file then fails the query as before this PR. `Configuration.md` is regenerated, and `VeloxScanSuite` checks that with the switch off the scan stays native and the query fails on the corrupt file. 2. You're right, thanks for catching it. The check now skips `MergeTreeReadFormat` scans, using the same `fileFormat` check as the `isMergeTree` flag, so a MergeTree scan stays native with `ignoreCorruptFiles` set. I added `GLUTEN-13826: a mergetree scan stays native when ignoreCorruptFiles is set` to `GlutenClickHouseMergeTreeWriteSuite`: it reads a MergeTree table with `spark.sql.files.ignoreCorruptFiles=true` and checks the rows and that the scan is the native MergeTree one. I can't run the ClickHouse backend locally, so that test relies on the ClickHouse CI; the module compiles with Spark 3.5 and Scala 2.13. Other ClickHouse file scans, such as Parquet, still fall back, since its native scan can't skip corrupt files either (#3915 was closed with no linked change). Can you please take a look again whenever you get a moment? Thanks! -- 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]
