Skip to content

Conversation

@BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Jan 30, 2026

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Make StructType's Debug output compact in EXPLAIN/planner output (e.g. Struct(Int32, Varchar) / Struct(a:Int32, ...)) instead of the Rust debug-struct form.

Update planner test expect files accordingly.

Update e2e SQLLogicTest expected error output that referenced the old StructType debug format.

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • I have checked the Release Timeline and Supported Versions to determine which release branches I need to cherry-pick this PR into.

Documentation

  • My PR needs documentation updates.
Release note

@github-actions github-actions bot added the type/refactor Type: Refactoring. label Jan 30, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the Debug implementation of StructType to produce more concise output in EXPLAIN statements and planner test outputs. The change simplifies the format from the verbose Rust debug-struct form (e.g., StructType { fields: [("f1", Int32), ("f2", Varchar)] }) to a compact representation (e.g., Struct(Int32, Varchar) for unnamed or Struct(a:Int32, b:Varchar) for named fields).

Changes:

  • Modified StructType::Debug to use a compact single-line format for {:?} while preserving the detailed format for {:#?}
  • Unnamed structs and structs with synthetic field names (f1, f2, etc.) display without field names
  • Named structs display with name:Type format, using identifier quoting when necessary
  • Updated all planner test expected outputs to reflect the new format
  • Updated e2e test error messages that reference StructType debug output

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/common/src/types/struct_type.rs Core implementation: refactored Debug trait to provide compact format for normal debug output while preserving detailed format for alternate debug output
src/frontend/planner_test/tests/testdata/output/vector_search.yaml Updated expected planner output for vector search queries with struct types
src/frontend/planner_test/tests/testdata/output/update.yaml Updated expected planner output for update operations involving struct types
src/frontend/planner_test/tests/testdata/output/struct_query.yaml Updated expected planner output for struct query operations, including nested structs
src/frontend/planner_test/tests/testdata/output/row_filter.yaml Updated expected planner output for row filter operations with struct comparisons
src/frontend/planner_test/tests/testdata/output/expr.yaml Updated expected planner output for expressions involving struct types
src/frontend/planner_test/tests/testdata/output/array.yaml Updated expected planner output for array operations with struct element types
src/frontend/planner_test/tests/testdata/output/agg.yaml Updated expected planner output for aggregation operations with struct types
e2e_test/batch/types/map.slt.part Updated expected error message that displays struct type information

@BugenZhao BugenZhao enabled auto-merge January 30, 2026 09:54
@BugenZhao BugenZhao added this pull request to the merge queue Feb 2, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/refactor Type: Refactoring.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants