Skip to content

[VL] Offload Kafka micro-batch scans - #13237

Open
ReemaAlzaid wants to merge 9 commits into
apache:mainfrom
ReemaAlzaid:kafka-microbatch-offload
Open

ReemaAlzaid wants to merge 9 commits into
apache:mainfrom
ReemaAlzaid:kafka-microbatch-offload

Conversation

@ReemaAlzaid

@ReemaAlzaid ReemaAlzaid commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Enable native Kafka micro batch scans, with Spark fallback for
unsupported columns such as headers. Split from #13130.

How was this patch tested?

Added schema validation and streaming tests for native reads
and headers fallback.

Tested on Linux aarch64 with Spark 3.5.5, Scala 2.12.18, and Java 17,
with Kafka and Iceberg profiles enabled.

  • VeloxKafkaScanValidationSuite: 2 tests passed, covering supported
    schemas and rejection of unsupported columns/types.
  • VeloxGlutenKafkaScanSuite: 2 tests passed, verifying native
    micro batch reads and headers fallback, each returning all
    1,000 expected records.

Both ScalaTest suites completed without failures or aborted suites.
Both Maven invocations reported BUILD SUCCESS.

Also passed a separate spark-submit smoke test. The native
query contained one MicroBatchScanExecTransformer; the headers query
used Spark fallback with no native Kafka scan.

Split from the Kafka draft in apache#13130.

Co-authored-by: Reema Alzaid <reema-alzaid@outlook.com>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions github-actions Bot added CORE works for Gluten Core VELOX labels Oct 9, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions github-actions Bot added the INFRA label Oct 23, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unsupported Java authentication settings can reach the native Kafka reader and cause valid authenticated streams to fail instead of falling back to Spark.

1 open issue
What changed in this PR

This PR connects the existing Kafka micro-batch scan transformer to the Velox backend, adding schema validation and Spark fallback for unsupported columns such as headers.

Changes:

  • Register Kafka offloading through an optional Velox component and Maven profile.
  • Validate native Kafka column names and types.
  • Add schema and streaming tests, and enable them in Kafka CI.
File Description
gluten-ut/​spark35/​src/​test/​backends-velox/​org/​apache/​gluten/​execution/​VeloxKafkaScanValidationSuite.scala Tests supported and unsupported Kafka schemas.
backends-velox/​src/​main/​scala/​org/​apache/​gluten/​backendsapi/​velox/​VeloxBackend.scala Adds Kafka column validation.
backends-velox/​src-kafka/​test/​scala/​org/​apache/​gluten/​execution/​kafka/​VeloxGlutenKafkaScanSuite.scala Tests native reads and headers fallback.
backends-velox/​src-kafka/​main/​scala/​org/​apache/​gluten/​component/​VeloxKafkaComponent.scala Registers offloading when Spark Kafka classes are available.
backends-velox/​src-kafka/​main/​resources/​META-INF/​gluten-components/​org.apache.gluten.component.VeloxKafkaComponent Enables component discovery.
backends-velox/​pom.xml Adds optional Kafka dependencies.
.github/​workflows/​velox_kafka.yml Enables schema and streaming test steps.

Review effort: Balanced

}

override def injectRules(injector: Injector): Unit = {
OffloadKafkaScan.inject(injector)
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@zhouyuan zhouyuan left a comment

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.

Thanks.

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

This branch has not been deployed

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

Labels

CORE works for Gluten Core INFRA VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants