Skip to content

Spark3.4: Enable Native execution if ParquetReaderType is Comet#12709

Closed
huaxingao wants to merge 1 commit intoapache:mainfrom
huaxingao:enableNativeExecution
Closed

Spark3.4: Enable Native execution if ParquetReaderType is Comet#12709
huaxingao wants to merge 1 commit intoapache:mainfrom
huaxingao:enableNativeExecution

Conversation

@huaxingao
Copy link
Copy Markdown
Contributor

This PR has the following changes:

  • Make SparkScan implement org.apache.comet.parquet.SupportsComet , so on Comet side, it can check SupportsComet.isCometEnabled() and turn on native execution.
  • change useDecimal128 to true in a few places, to be consistent with the useDecimal128 value in Comet
  • un-shade parquet for now so I can pass Parquet object from Iceberg to Comet. I will find a better way to get around this in the future.
  • update Comet version to 0.7.0
  • disable Comet if there are deletes, because Comet native execution doesn't support delete logic yet.

@huaxingao huaxingao force-pushed the enableNativeExecution branch from 5204c46 to e29d5cc Compare April 3, 2025 01:56
Comment thread spark/v3.4/build.gradle
relocate 'org.apache.avro', 'org.apache.iceberg.shaded.org.apache.avro'
relocate 'avro.shaded', 'org.apache.iceberg.shaded.org.apache.avro.shaded'
relocate 'com.thoughtworks.paranamer', 'org.apache.iceberg.shaded.com.thoughtworks.paranamer'
relocate 'org.apache.parquet', 'org.apache.iceberg.shaded.org.apache.parquet'
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.

Is there a side effect for downstream projects?

// TODO Update doc example so that it can actually be run, modifications were required for this
// test suite to run
@Test
@Ignore
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.

Why ignoring this test?

TypeUtil.convertToParquet(
new StructField("_deleted", DataTypes.BooleanType, false, Metadata.empty())),
false /* useDecimal128 = false */,
true /* useDecimal128 = true */,
Copy link
Copy Markdown
Member

@manuzhang manuzhang Apr 11, 2025

Choose a reason for hiding this comment

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

Is there a UT to catch this change?


for (ScanTask task : taskIterable) {
if (task instanceof FileScanTask) {
if (!((FileScanTask) task).deletes().isEmpty()) {
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 already have TableScanUtil.hasDeletes

}

this.tasks = plannedTasks;
if (hasDeletes) {
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.

Can you please add a UT?

@github-actions
Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label May 12, 2025
@github-actions
Copy link
Copy Markdown

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions Bot closed this May 19, 2025
@jiayuasu
Copy link
Copy Markdown
Member

@huaxingao Is this PR still active? We are actually really looking forward to having this for comet!

@huaxingao
Copy link
Copy Markdown
Contributor Author

@jiayuasu Yes, I will be working on this. One issue I'm currently facing is the shading issue with Iceberg. Since Iceberg shades Parquet, I can't pass Parquet objects and types from Iceberg to Comet. However, I don't think I can simply unshading Parquet. I likely need to introduce a higher level of abstraction to work around this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants