nielspardon opened a new pull request, #12642:
URL: https://github.com/apache/gluten/pull/12642

   ## What changes are proposed in this pull request?
   
   Third increment of the Substrait 0.98 proto rebase (#12597), following 
#12598 (dead-proto/`Expression.Enum` removal) and #12604 (URI→URN referencing, 
now merged). This PR is rebased directly on `main`, so its diff is exactly this 
increment.
   
   Adopts the 0.98 shape of `AdvancedExtension.optimization`, which changed 
from a singular `google.protobuf.Any` to `repeated google.protobuf.Any` 
(substrait-io/substrait#1084). An optimization is helpful information that does 
not influence semantics, so a list is the natural model and there is no 
semantic change for Gluten.
   
   - **`extensions.proto`**: `optimization` becomes `repeated`.
   - **JVM producer** (`AdvancedExtensionNode`): `setOptimization(...)` → 
`addOptimization(...)`. Gluten sets at most one optimization message today, so 
this appends a single element.
   - **ClickHouse producer** (`CHFormatWriterInjects`): `setOptimization(...)` 
→ `addOptimization(...)`.
   - **Native consumers** (Velox `SubstraitParser` / `SubstraitToVeloxPlan` / 
`VeloxToSubstraitPlan`; ClickHouse `local_engine_jni` and the `RelParsers` for 
Aggregate/Cross/GroupLimit/Join/Read/Write): read/write sites migrate from the 
singular accessor to the indexed form — `has_optimization()` → 
`optimization_size() > 0`, `.optimization()` → `.optimization(0)`, and producer 
`PackFrom` moves to `add_optimization()`.
   
   Reading `optimization(0)` at the consumer sites is safe: Gluten's producer 
and both native consumers are regenerated from this single vendored proto and 
ship together (no wire-compatibility window), and the producer only ever emits 
a single optimization element. If a future increment emits multiple, these 
sites are the ones to revisit.
   
   ## How was this patch tested?
   
   No behavioral change — this migrates the field's cardinality, and Gluten 
uses a single element. Verified locally: the vendored proto compiles 
(`protoc`); the `gluten-substrait` JVM build succeeds against the regenerated 
classes; and the Velox native library builds (`libgluten` / `libvelox`, 
recompiling `SubstraitParser` / `SubstraitToVeloxPlan` / 
`VeloxToSubstraitPlan`). The ClickHouse changes (Scala `CHFormatWriterInjects` 
and the native `RelParsers` / `local_engine_jni`) are mechanical 
singular→indexed accessor migrations, verified by inspection and covered by CI, 
which builds the CH backend. Existing conversion tests exercise these paths.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.8)
   
   🤖 Generated with AI
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to