Skip to content

[MINOR][CORE] Make ColumnarInputAdapter inherit from GlutenPlan - #12973

Open
yikf wants to merge 1 commit into
apache:mainfrom
yikf:core-columnar-input-adapter-inherit-gluten-plan
Open

[MINOR][CORE] Make ColumnarInputAdapter inherit from GlutenPlan#12973
yikf wants to merge 1 commit into
apache:mainfrom
yikf:core-columnar-input-adapter-inherit-gluten-plan

Conversation

@yikf

@yikf yikf commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

ColumnarInputAdapter previously mixed in Convention.KnownBatchType, Convention.KnownRowType and ConventionReq.KnownChildConvention directly.

GlutenPlan already bundles those three traits and derives supportsColumnar / supportsRowBased from batchType() / rowType(). This PR makes ColumnarInputAdapter inherit from GlutenPlan and removes the now-redundant overrides.

How was this patch tested?

Exists UTs.

Was this patch authored or co-authored using generative AI tooling?

Yes.

Copilot AI lite review requested due to automatic review settings September 7, 2026 08:13
@yikf
yikf force-pushed the core-columnar-input-adapter-inherit-gluten-plan branch from aece885 to 93f0c63 Compare September 7, 2026 08:13
@github-actions github-actions Bot added the CORE works for Gluten Core label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions

github-actions Bot commented Sep 7, 2026

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.

🟢 Approval recommended

The change is a small, behavior-preserving refactor that aligns ColumnarInputAdapter with existing GlutenPlan convention/support mechanisms without introducing functional differences.

Pull request overview

This PR refactors ColumnarInputAdapter (used by ColumnarCollapseTransformStages) to inherit from GlutenPlan, relying on GlutenPlan’s bundled convention traits and its derived supportsColumnar / supportsRowBased behavior, and removing the now-redundant explicit convention plumbing.

Changes:

  • Make ColumnarInputAdapter extend GlutenPlan instead of directly mixing in Convention.* / ConventionReq.* traits.
  • Remove redundant supportsColumnar / supportsRowBased overrides and the explicit requiredChildConvention() override.
  • Simplify imports by dropping the now-unused ConventionReq import.
File summaries
File Description
gluten-substrait/src/main/scala/org/apache/spark/sql/execution/ColumnarCollapseTransformStages.scala Refactors ColumnarInputAdapter to inherit from GlutenPlan and removes redundant convention/support overrides accordingly.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 7, 2026 12:40
@yikf
yikf force-pushed the core-columnar-input-adapter-inherit-gluten-plan branch from 93f0c63 to 39b4bb9 Compare September 7, 2026 12:40
@github-actions

github-actions Bot commented Sep 7, 2026

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

The ClickHouse TPCDS metrics suite references ColumnarInputAdapter without it being in scope, causing a likely compilation failure.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

case g: GlutenPlan if !g.isInstanceOf[InputIteratorTransformer] => g
case g: GlutenPlan
if !g.isInstanceOf[InputIteratorTransformer] &&
!g.isInstanceOf[ColumnarInputAdapter] =>
@yikf
yikf force-pushed the core-columnar-input-adapter-inherit-gluten-plan branch from 39b4bb9 to fc52b77 Compare September 7, 2026 12:46
Copilot AI review requested due to automatic review settings September 7, 2026 12:46
@github-actions

github-actions Bot commented Sep 7, 2026

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.

🟢 Approval recommended

The change correctly aligns ColumnarInputAdapter with GlutenPlan’s established conventions, and the impacted unit tests are updated accordingly to reflect the new type relationship.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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

Labels

CLICKHOUSE CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants