andygrove commented on code in PR #6168:
URL: https://github.com/apache/datafusion-comet/pull/6168#discussion_r4104481301
##########
docs/source/user-guide/latest/compatibility/operators.md:
##########
@@ -32,6 +32,27 @@ operator restrictions and aggregate buffer compatibility
checks still apply.
Parquet writes whose input plans contain an empty relation use Spark's writer
to preserve
readable empty output files and their schema metadata.
+## In-Memory Cache
+
+Comet can store cached relations (`df.cache()`, `CACHE TABLE`) in Arrow format
and scan them
+natively. This is experimental and disabled by default. Enable it with
+`spark.comet.exec.inMemoryCache.enabled=true` before the application starts:
the value at startup
+decides whether Comet sets `spark.sql.cache.serializer` to its Arrow cache
serializer, and
+because that is a static config the cache format is fixed for the application.
Comet does not
+replace a `spark.sql.cache.serializer` that the application has already set.
Disabling the
+setting later only sends cached scans back to Spark's execution path.
+
+Relations whose schema Comet's Arrow writer does not support are cached in
Spark's default
+format, and their scans fall back to Spark. Each cached column is stored as
its own compressed
+Arrow IPC stream, so a scan decodes only the columns it projects. Reads that
feed Spark operators
+rather than Comet operators still pay a row conversion that Spark's default
format avoids, and
+can be slower than Spark's cache.
+
+With `spark.kryo.registrationRequired=true`, also set
+`spark.kryo.registrator=org.apache.comet.CometKryoRegistrator` before creating
the
+`SparkContext`. Otherwise caching fails as soon as a block is serialized,
including the disk
+half of the default `MEMORY_AND_DISK` storage level.
Review Comment:
Moved to a new "Kryo serialization" subsection under "Additional
Configuration" in `installation.md`, limited to
`spark.serializer=org.apache.spark.serializer.KryoSerializer` with
`spark.kryo.registrationRequired=true`. It says native broadcast fails without
the registrator whether or not the cache is enabled. Main has since added
`in-memory-cache.md` (#5543), so the section in `compatibility/operators.md`
now just points to that page, and both pages link to the installation section.
d531350c6
##########
docs/source/user-guide/latest/iceberg.md:
##########
@@ -170,24 +172,31 @@ For a custom S3-compatible endpoint, configure the
catalog with the endpoint, pa
--conf spark.sql.catalog.s3_cat.s3.secret-access-key=...
```
-These `s3.*` storage properties are not specific to the Hive catalog shown
here. When `s3.access-key-id` / `s3.secret-access-key` are omitted, credentials
come from the standard AWS chain (environment variables, instance profiles, and
so on). `client.region` is auto-detected for AWS but should be set for non-AWS
endpoints. If your REST catalog vends temporary credentials, the native reader
does not consume them automatically, and wiring that requires the credential
provider bridge. See Iceberg's [S3
FileIO](https://iceberg.apache.org/docs/latest/aws/#s3-fileio) docs for the
full property list, and [S3 Credential Providers](s3-credential-providers.md)
for vended or per-request credentials.
+These `s3.*` storage properties are not specific to the Hive catalog shown
here. When `s3.access-key-id` / `s3.secret-access-key` are omitted, credentials
come from the standard AWS chain (environment variables, instance profiles, and
so on). `client.region` is not auto-detected: when neither it nor `AWS_REGION`
is set, Comet uses `us-east-1`, so set it for AWS buckets in any other region.
If your REST catalog vends temporary credentials, the native reader does not
consume them automatically, and wiring that requires the credential provider
bridge. See Iceberg's [S3
FileIO](https://iceberg.apache.org/docs/latest/aws/#s3-fileio) docs for the
full property list, and [S3 Credential Providers](s3-credential-providers.md)
for vended or per-request credentials.
Review Comment:
Applied your wording in d531350c6.
##########
docs/source/user-guide/latest/compatibility/index.md:
##########
@@ -111,12 +112,9 @@ Code that catches `SparkException` and only asserts on
message substrings is una
inspects the exception class, `getCondition()`, or the parameterised error
class will observe
divergence:
-- Byte / Short `Add`, `Subtract`, and `Multiply` overflow raises
`ARITHMETIC_OVERFLOW` where Spark
- 4.1 raises `BINARY_ARITHMETIC_OVERFLOW`, and Long overflow surfaces as
`"integer overflow"`
- rather than `"long overflow"`. `Abs` uses Rust type names (`Int8`, `Int64`,
...) in the message
- instead of Spark's SQL type names, and the scalar path of `UnaryMinus` on
Byte / Short emits a
- malformed message. The `try_` suggestion is omitted from all of these
- ([#5071](https://github.com/apache/datafusion-comet/issues/5071)).
+- Byte / Short `Add`, `Subtract`, and `Multiply` overflow raises
`ARITHMETIC_OVERFLOW` (for
+ example `byte overflow`) where Spark raises `BINARY_ARITHMETIC_OVERFLOW`,
and integral
+ `ARITHMETIC_OVERFLOW` messages omit Spark's `try_` suggestion.
Review Comment:
Filed #6217 for the two remaining items and linked it from the bullet in
d531350c6.
--
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]