dwsmith1983 commented on code in PR #5365: URL: https://github.com/apache/datafusion-comet/pull/5365#discussion_r4042643424
########## docs/source/user-guide/latest/delta.md: ########## @@ -0,0 +1,62 @@ +<!--- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# Delta Lake (experimental) + +Comet can execute DSv1 Delta Lake table scans natively. Reads planned by +delta-spark run through Comet's native Parquet scan, inheriting row-group +pruning, page-index pruning, and filter pushdown, with deletion vectors +applied inside the scan. + +Support is experimental and explicitly opt-in. Two things are required: + +1. The `comet-contrib-delta-spark` contrib jar on the classpath, alongside + `delta-spark`. It is never bundled into `comet-spark`. +2. `spark.comet.scan.delta.enabled=true`. The default is `false`, so + the jar alone does nothing. + +Unsupported tables and features fall back to Spark's reader. See the +[contrib module README](https://github.com/apache/datafusion-comet/blob/main/contrib/delta-spark/README.md) +for the supported Spark/Delta version matrix and build instructions. + +Unlike the core native scan, the Delta scan resolves each data file's datetime +calendar-rebase policy from the file's own writer metadata +(`org.apache.spark.legacyDateTime` and friends), the same way Spark's reader +does, selecting the `datetimeRebaseModeInRead` spec for dates and INT64 +timestamps and the `int96RebaseModeInRead` spec for INT96 timestamps, at any +nesting depth: dates written with the legacy hybrid Julian/Gregorian calendar +are rebased exactly, timestamps are rebased exactly when the file records a +fixed UTC writer time zone, and ancient values whose calendar cannot be +applied natively (non-UTC legacy writer zones, or files that do not declare a +policy under the `EXCEPTION` read mode) raise an error rather than silently +returning shifted values. Modern values are unaffected: dates from 1582-10-15 +onward, and timestamps from 1900-01-01T00:00:00Z onward (Spark's own +rebase cutoff). Disable `spark.comet.scan.delta.enabled` for such tables to +read them through Spark. + +## Configuration + +<!--BEGIN:CONFIG_TABLE[delta]--> Review Comment: > Could the guard cover every entry in `DeltaScanConf.all` including defaults, and fail instead of cancel on a missing file? Or drop the markers so nobody reads the table as generated. Both, in d707d8d. The markers are gone and a comment says the table is hand-maintained. The guard renders every `DeltaScanConf` entry the way GenerateDocs would, key, doc and default, asserts each row verbatim, flags rows that match no entry, and fails when the page cannot be found. It fails on a changed default and passes on the current page. -- 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]
