-
Notifications
You must be signed in to change notification settings - Fork 209
[AURON #2030] Add Native Scan Support for Apache Hudi Copy-On-Write Tables. #2031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| # | ||
| # 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. | ||
| # | ||
|
|
||
| name: Hudi | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - master | ||
| - branch-* | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| - branch-* | ||
|
|
||
| concurrency: | ||
| group: hudi-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test-hudi: | ||
| name: Test Hudi (${{ matrix.sparkver }} / JDK${{ matrix.javaver }} / Scala${{ matrix.scalaver }}) | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - sparkver: "3.0" | ||
| scalaver: "2.12" | ||
| javaver: "8" | ||
| - sparkver: "3.1" | ||
| scalaver: "2.12" | ||
| javaver: "8" | ||
| - sparkver: "3.2" | ||
| scalaver: "2.12" | ||
| javaver: "8" | ||
| - sparkver: "3.3" | ||
| scalaver: "2.12" | ||
| javaver: "8" | ||
| - sparkver: "3.4" | ||
| scalaver: "2.12" | ||
| javaver: "17" | ||
| - sparkver: "3.5" | ||
| scalaver: "2.12" | ||
| javaver: "17" | ||
| - sparkver: "3.5" | ||
| scalaver: "2.12" | ||
| javaver: "21" | ||
|
|
||
| steps: | ||
| - name: Checkout Auron | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Java and Maven cache | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'adopt-hotspot' | ||
| java-version: ${{ matrix.javaver }} | ||
| cache: 'maven' | ||
|
|
||
| - name: Build dependencies (skip tests) | ||
| run: > | ||
| ./build/mvn -B install | ||
| -pl thirdparty/auron-hudi | ||
| -am | ||
| -Pscala-${{ matrix.scalaver }} | ||
| -Pspark-${{ matrix.sparkver }} | ||
| -Phudi-0.15 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If in the future we will be supporting multiple versions of hudi? Can we model this to be similar to how we have it for our other third party plugins? (check comment above for more info) |
||
| -Prelease | ||
| -DhudiEnabled=true | ||
| -DskipTests | ||
|
|
||
| - name: Test Hudi Module | ||
| run: > | ||
| ./build/mvn -B test | ||
| -pl thirdparty/auron-hudi | ||
| -Pscala-${{ matrix.scalaver }} | ||
| -Pspark-${{ matrix.sparkver }} | ||
| -Phudi-0.15 | ||
| -Prelease | ||
| -DhudiEnabled=true | ||
|
|
||
| - name: Upload reports | ||
| if: failure() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: auron-hudi-${{ matrix.sparkver }}-jdk${{ matrix.javaver }}-test-report | ||
| path: thirdparty/auron-hudi/target/surefire-reports | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -52,7 +52,7 @@ fi | |||||
| sparkver=spark-3.5 | ||||||
| for celebornver in celeborn-0.5 celeborn-0.6 | ||||||
| do | ||||||
| run_maven -P"${sparkver}" -Pceleborn,"${celebornver}" -Puniffle,uniffle-0.10 -Ppaimon,paimon-1.2 -Pflink,flink-1.18 -Piceberg,iceberg-1.9 | ||||||
| run_maven -P"${sparkver}" -Pceleborn,"${celebornver}" -Puniffle,uniffle-0.10 -Ppaimon,paimon-1.2 -Phudi,hudi-0.15 -Pflink,flink-1.18 -Piceberg,iceberg-1.9 | ||||||
|
||||||
| run_maven -P"${sparkver}" -Pceleborn,"${celebornver}" -Puniffle,uniffle-0.10 -Ppaimon,paimon-1.2 -Phudi,hudi-0.15 -Pflink,flink-1.18 -Piceberg,iceberg-1.9 | |
| run_maven -P"${sparkver}" -Pceleborn,"${celebornver}" -Puniffle,uniffle-0.10 -Ppaimon,paimon-1.2 -Phudi-0.15 -Pflink,flink-1.18 -Piceberg,iceberg-1.9 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -346,6 +346,12 @@ public class SparkAuronConfiguration extends AuronConfiguration { | |
| .withDescription("Enable PaimonScanExec operation conversion to native Auron implementations.") | ||
| .withDefaultValue(true); | ||
|
|
||
| public static final ConfigOption<Boolean> ENABLE_HUDI_SCAN = new SQLConfOption<>(Boolean.class) | ||
| .withKey("auron.enable.hudi.scan") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be a granularity for COW tables? |
||
| .withCategory("Operator Supports") | ||
| .withDescription("Enable Hudi scan operation conversion to native Auron implementations.") | ||
| .withDefaultValue(true); | ||
|
|
||
| public static final ConfigOption<Boolean> ENABLE_PROJECT = new SQLConfOption<>(Boolean.class) | ||
| .withKey("auron.enable.project") | ||
| .withCategory("Operator Supports") | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,121 @@ | ||||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||||
| <!-- | ||||||
| ~ 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. | ||||||
| --> | ||||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||||||
| <modelVersion>4.0.0</modelVersion> | ||||||
|
|
||||||
| <parent> | ||||||
| <groupId>org.apache.auron</groupId> | ||||||
| <artifactId>auron-parent_${scalaVersion}</artifactId> | ||||||
| <version>${project.version}</version> | ||||||
| <relativePath>../../pom.xml</relativePath> | ||||||
| </parent> | ||||||
|
|
||||||
| <artifactId>auron-hudi_${scalaVersion}</artifactId> | ||||||
| <packaging>jar</packaging> | ||||||
| <name>Apache Auron Hudi ${hudiVersion} ${scalaVersion}</name> | ||||||
|
|
||||||
| <dependencies> | ||||||
| <dependency> | ||||||
| <groupId>org.apache.auron</groupId> | ||||||
| <artifactId>spark-extension_${scalaVersion}</artifactId> | ||||||
| <version>${project.version}</version> | ||||||
| </dependency> | ||||||
| <dependency> | ||||||
| <groupId>org.apache.hudi</groupId> | ||||||
| <artifactId>hudi-spark${shortSparkVersion}-bundle_${scalaVersion}</artifactId> | ||||||
| <version>${hudiVersion}</version> | ||||||
| <scope>provided</scope> | ||||||
| </dependency> | ||||||
| <dependency> | ||||||
| <groupId>org.apache.spark</groupId> | ||||||
| <artifactId>spark-sql_${scalaVersion}</artifactId> | ||||||
| <scope>provided</scope> | ||||||
| </dependency> | ||||||
| <dependency> | ||||||
| <groupId>org.scalatest</groupId> | ||||||
| <artifactId>scalatest_${scalaVersion}</artifactId> | ||||||
| <scope>test</scope> | ||||||
| </dependency> | ||||||
| <dependency> | ||||||
| <groupId>org.apache.spark</groupId> | ||||||
| <artifactId>spark-core_${scalaVersion}</artifactId> | ||||||
| <type>test-jar</type> | ||||||
| <scope>test</scope> | ||||||
| </dependency> | ||||||
| <dependency> | ||||||
| <groupId>org.apache.spark</groupId> | ||||||
| <artifactId>spark-sql_${scalaVersion}</artifactId> | ||||||
| <type>test-jar</type> | ||||||
| <scope>test</scope> | ||||||
| </dependency> | ||||||
| <dependency> | ||||||
| <groupId>org.apache.spark</groupId> | ||||||
| <artifactId>spark-catalyst_${scalaVersion}</artifactId> | ||||||
| <type>test-jar</type> | ||||||
| <scope>test</scope> | ||||||
| </dependency> | ||||||
| <dependency> | ||||||
| <groupId>org.apache.spark</groupId> | ||||||
| <artifactId>spark-hive_${scalaVersion}</artifactId> | ||||||
| <scope>test</scope> | ||||||
| </dependency> | ||||||
| <dependency> | ||||||
| <groupId>org.apache.auron</groupId> | ||||||
| <artifactId>spark-extension-shims-spark_${scalaVersion}</artifactId> | ||||||
| <version>${project.version}</version> | ||||||
| <scope>test</scope> | ||||||
| </dependency> | ||||||
| </dependencies> | ||||||
|
|
||||||
| <build> | ||||||
| <plugins> | ||||||
| <plugin> | ||||||
| <groupId>org.apache.maven.plugins</groupId> | ||||||
| <artifactId>maven-enforcer-plugin</artifactId> | ||||||
| <version>${maven-enforcer-plugin.version}</version> | ||||||
| <executions> | ||||||
| <execution> | ||||||
| <id>hudi-spark-version-compat</id> | ||||||
| <goals> | ||||||
| <goal>enforce</goal> | ||||||
| </goals> | ||||||
| <configuration> | ||||||
| <rules> | ||||||
| <requireProperty> | ||||||
| <property>hudiEnabled</property> | ||||||
| <regex>true</regex> | ||||||
|
||||||
| <regex>true</regex> | |
| <regex>^true$</regex> |
Copilot
AI
Feb 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shortSparkVersion regex is not anchored, so unsupported values like 3.10 would match the 3\.1 alternative and incorrectly pass. Anchor the regex to the full string (e.g., ^(3\.0|3\.1|3\.2|3\.3|3\.4|3\.5)$).
| <regex>3\.0|3\.1|3\.2|3\.3|3\.4|3\.5</regex> | |
| <regex>^(3\.0|3\.1|3\.2|3\.3|3\.4|3\.5)$</regex> |
Copilot
AI
Feb 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hudiVersion regex is not anchored, so a version like 0.15.0-SNAPSHOT could still match 0\.15\.0 and pass. If the intent is to pin strictly to 0.15.0, anchor the regex (e.g., ^0\.15\.0$).
| <regex>0\.15\.0</regex> | |
| <regex>^0\.15\.0$</regex> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # | ||
| # 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. | ||
| # | ||
|
|
||
| org.apache.spark.sql.auron.hudi.HudiConvertProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we simplify this like so, similar to the structure we have in flink/paimon related yml files?