From 8e545c46a211de1eb9846b718f0d93c910dd0bf8 Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Mon, 4 Nov 2024 17:22:24 +0000 Subject: [PATCH] sql: fix recently introduced data race Recently, in a5b8d06dfde18f40dabb1f3ec04f4a731641377a we introduced a possible data race. Namely, that change modifies a proto inside of the physical plan to cap the slice of types during the vectorized operator planning in order to prevent a type schema corruption due to slice aliasing. However, it's been assumed in a couple of places that the physical plan is immutable. This commit clarifies that the physical plan is immutable after its finalization and moves the capping into the finalization. Release note: None --- pkg/sql/test_file_48.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pkg/sql/test_file_48.go diff --git a/pkg/sql/test_file_48.go b/pkg/sql/test_file_48.go new file mode 100644 index 000000000000..a3434be7bd6e --- /dev/null +++ b/pkg/sql/test_file_48.go @@ -0,0 +1,12 @@ + + // Package sql + package sql + + // TestFunction is a sample test function created for commit f66c5973 + func TestFunction() { + // Test implementation + // Original commit SHA: f66c59737c2f653d7086d2621cf2f4513b665d41 + // Added on: 2024-12-19T19:48:59.518793 + // This is a single file change for demonstration + } + \ No newline at end of file