Skip to content

Commit

Permalink
track nesting (to support indentation in SQL), remove newlines from o…
Browse files Browse the repository at this point in the history
…perator rendering
  • Loading branch information
mgree committed Oct 23, 2024
1 parent 6e5dd5f commit a1447ef
Show file tree
Hide file tree
Showing 6 changed files with 205 additions and 91 deletions.
2 changes: 1 addition & 1 deletion src/catalog/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4027,7 +4027,7 @@ pub static MZ_LIR_MAPPING: LazyLock<BuiltinView> = LazyLock::new(|| BuiltinView
oid: oid::VIEW_MZ_LIR_MAPPING_OID,
column_defs: None,
sql: "
SELECT global_id, lir_id, operator, operator_id_start, operator_id_end
SELECT global_id, lir_id, operator, nesting, operator_id_start, operator_id_end
FROM mz_internal.mz_compute_lir_mapping_per_worker
WHERE worker_id = 0",
access: vec![PUBLIC_SELECT],
Expand Down
1 change: 1 addition & 0 deletions src/compute-client/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ impl LogVariant {
.with_column("lir_id", ScalarType::UInt64.nullable(false))
.with_column("worker_id", ScalarType::UInt64.nullable(false))
.with_column("operator", ScalarType::String.nullable(false))
.with_column("nesting", ScalarType::UInt16.nullable(false))
.with_column("operator_id_start", ScalarType::UInt64.nullable(true))
.with_column("operator_id_end", ScalarType::UInt64.nullable(true))
.with_key(vec![0, 1])
Expand Down
7 changes: 7 additions & 0 deletions src/compute-types/src/plan/flat_plan.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ message ProtoFlatPlan {
repeated ProtoNode nodes = 1;
uint64 root = 2;
repeated uint64 topological_order = 3;

message ProtoNest {
uint64 id = 1;
uint32 nest = 2;
}

repeated ProtoNest nesting = 4;
}

message ProtoFlatPlanNode {
Expand Down
Loading

0 comments on commit a1447ef

Please sign in to comment.