Skip to content

[GLUTEN-12597][CORE] Remove unused vendored Substrait proto files and dead proto-based type derivation - #12598

Merged
zhouyuan merged 1 commit into
apache:mainfrom
nielspardon:feat/substrait-0.98-inc0-dead-removals
Jul 23, 2026
Merged

[GLUTEN-12597][CORE] Remove unused vendored Substrait proto files and dead proto-based type derivation#12598
zhouyuan merged 1 commit into
apache:mainfrom
nielspardon:feat/substrait-0.98-inc0-dead-removals

Conversation

@nielspardon

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Preparatory cleanup for rebasing the vendored Substrait proto onto 0.98.0 (#12597). Removes dead definitions with no functional change:

How was this patch tested?

No functional change — pure dead-definition removal. Verified that the vendored proto still compiles (protoc descriptor-set generation succeeds with no dangling imports or duplicate field numbers), and confirmed via repo-wide search that no JVM code (gluten-substrait, backends) or native code (cpp/velox, cpp-ch/local-engine) references the removed files, the removed package, or Expression.Enum. Covered by the existing JVM and Velox/ClickHouse proto-codegen builds; no new unit test is applicable.

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

Generated-by: Claude Code (Claude Opus 4.8)

🤖 Generated with AI

… dead proto-based type derivation

Delete four vendored Substrait proto files that carry no live message types in Gluten and were removed upstream (substrait-io/substrait#952 and apache#940): capabilities.proto, function.proto, parameterized_types.proto, type_expressions.proto. Their generated headers were only referenced by dangling #include lines in cpp/velox/substrait/SubstraitParser.h (the substrait::Capabilities/FunctionSignature/ParameterizedType/DerivationExpression types are used nowhere in the native code), which are removed here as well.

type_expressions.proto's DerivationExpression had one JVM consumer, the org.apache.gluten.substrait.derivation package (DerivationExpressionNode, DerivationExpressionBuilder, BinaryOPNode, DerivationFP64TypeNode). That package is orphaned (no callers in the producer, native backends, or tests), so it is removed together with the proto. Upstream expresses output-type derivation via the ANTLR grammar in the extension YAMLs, not DerivationExpression protos.

Also remove the deprecated Expression.Enum message and its rex_type oneof field (10), reserving the number and name to match upstream (substrait-io/substrait#1086). Expression.Enum is not built by the producer nor parsed by the Velox/ClickHouse backends; enum function arguments use FunctionArgument.enum instead.

No functional change. Preparatory cleanup toward rebasing the vendored proto onto Substrait 0.98.0.
@nielspardon
nielspardon force-pushed the feat/substrait-0.98-inc0-dead-removals branch from 9cba618 to ff3641f Compare July 22, 2026 13:01
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions github-actions Bot added CORE works for Gluten Core VELOX labels Jul 22, 2026
@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 @nielspardon

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

Labels

CORE works for Gluten Core VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants