Skip to content

doc: Add Quickstart Comet doc section - #125

Merged
sunchao merged 4 commits into
apache:mainfrom
comphead:dev0
Feb 28, 2024
Merged

sunchao merged 4 commits into
apache:mainfrom
comphead:dev0

Conversation

@comphead

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #57 .

Rationale for this change

What changes are included in this PR?

Quickstart Comet doc section

How are these changes tested?

@comphead
comphead requested review from sunchao and viirya February 27, 2024 22:41
@sunchao sunchao changed the title Add Quickstart Comet doc section doc: Add Quickstart Comet doc section Feb 27, 2024
Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
```
spark-shell --jars spark/target/comet-spark-spark3.4_2.12-0.1.0-SNAPSHOT.jar \
--conf spark.sql.extensions=org.apache.comet.CometSparkSessionExtensions \
--conf spark.comet.enabled=true \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need a separate section to guide through shuffle related settings, but can be done later.

@comphead
comphead requested a review from sunchao February 28, 2024 00:17
@sunchao
sunchao merged commit 27f167b into apache:main Feb 28, 2024
@sunchao

sunchao commented Feb 28, 2024

Copy link
Copy Markdown
Member

Merged, thanks!

Comment thread README.md
- INFO message shows the native Comet library has been initialized.
- The query plan reflects Comet operators being used for this query instead of Spark ones
```scala
scala> spark.read.parquet("/tmp/test").createOrReplaceTempView("t1"); spark.sql("select * from t1 where a > 5").explain

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be nicer to read if newline is added.

scala> spark.read.parquet("/tmp/test").createOrReplaceTempView("t1")
scala> spark.sql("select * from t1 where a > 5").explain

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix it.

Comment thread README.md
== Physical Plan ==
*(1) ColumnarToRow
+- CometFilter [a#14], (isnotnull(a#14) AND (a#14 > 5))
+- CometScan parquet [a#14] Batched: true, DataFilters: [isnotnull(a#14), (a#14 > 5)], Format: CometParquet, Location: InMemoryFileIndex(1 paths)[file:/tmp/test], PartitionFilters: [], PushedFilters: [IsNotNull(a), GreaterThan(a,5)], ReadSchema: struct<a:int>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the explained plan string too. Right now it is a long string which is hard to read.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll break it into some newlines for easier reading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #128

schenksj added a commit to schenksj/datafusion-comet that referenced this pull request May 20, 2026
…test

Patch `DeltaSuite "query with predicates should skip partitions"` to
also recognise `CometDeltaNativeScanExec` in its
`executedPlan.collect { case f: FileSourceScanExec => f }`. Comet's
planner replaces the underlying `FileSourceScanExec` with the contrib's
native exec; without this hunk the collect returns an empty list and
the test fails at `assert(fileScans.size == 1)`.

The contrib's exec exposes the same `numFiles` metric (aliased to
`total_files` over the post-prunePartitions task list), so once the
test sees the exec the existing assertion on `numFiles == 1` validates
that driver-side partition pruning is actually filtering AddFiles.

Closes tasks apache#124 (partition pushdown validated) and apache#125 (data-stats
pushdown validated via `DataSkippingDeltaV1Suite "loading data from
Delta to parquet should skip data"`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add documentation on how to use Comet

3 participants