Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/sql/opt/exec/execbuilder/tests/local/local_test: TestExecBuild_collated_strings failed #117951

Closed
cockroach-teamcity opened this issue Jan 18, 2024 · 6 comments · Fixed by #117952
Assignees
Labels
branch-master Failures on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Jan 18, 2024

pkg/sql/opt/exec/execbuilder/tests/local/local_test.TestExecBuild_collated_strings failed with artifacts on master @ c74eac56a10e82798d8486d7aca3204a117bc8cf:

             ├── key: (1)
             ├── fd: ()-->(2)
             ├── distribution: test
             ├── prune: (1)
             ├── scan t98400
             │    ├── columns: k:1 s:2
             │    ├── stats: [rows=13, distinct(1)=13, null(1)=0, distinct(2)=3, null(2)=0]
             │    │   histogram(1)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1
             │    │                <--- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13
             │    │   histogram(2)=  0                 1                 10                  2
             │    │                <--- 'foo' COLLATE en_US_u_ks_level2 ---- 'world' COLLATE en_US_u_ks_level2
             │    ├── cost: 42.86
             │    ├── key: (1)
             │    ├── fd: (1)-->(2)
             │    ├── distribution: test
             │    └── prune: (1,2)
             └── filters
                  └── s:2 = 'hello' COLLATE en_US_u_ks_level2 [outer=(2), constraints=(/2: [/'hello' COLLATE en_US_u_ks_level2 - /'hello' COLLATE en_US_u_ks_level2]; tight), fd=()-->(2)]
        but found (query options: "") :
            select
             ├── columns: k:1 s:2
             ├── stats: [rows=10, distinct(2)=1, null(2)=0]
             │   histogram(2)=  0                 10
             │                <--- 'hello' COLLATE en_US_u_ks_level2
             ├── cost: 64.41
             ├── key: (1)
             ├── fd: ()-->(2)
             ├── distribution: test
             ├── prune: (1)
             ├── scan t98400
             │    ├── columns: k:1 s:2
             │    ├── stats: [rows=13, distinct(1)=13, null(1)=0, distinct(2)=3, null(2)=0]
             │    │   histogram(1)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1
             │    │                <--- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13
             │    │   histogram(2)=  0                 1                 10                  2
             │    │                <--- 'foo' COLLATE en_US_u_ks_level2 ---- 'world' COLLATE en_US_u_ks_level2
             │    ├── cost: 64.25
             │    ├── key: (1)
             │    ├── fd: (1)-->(2)
             │    ├── distribution: test
             │    └── prune: (1,2)
             └── filters
                  └── s:2 = 'hello' COLLATE en_US_u_ks_level2 [outer=(2), constraints=(/2: [/'hello' COLLATE en_US_u_ks_level2 - /'hello' COLLATE en_US_u_ks_level2]; tight), fd=()-->(2)]
            
[22:52:06] --- done: /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/13652/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/opt/exec/execbuilder/tests/local/local_test_/local_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/opt/exec/execbuilder/testdata/collated_strings with config local: 3 tests, 1 failures
[22:52:07] --- total progress: 3 statements
--- total: 3 tests, 1 failures
    logic.go:4191: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/7c0b99e5fac8a43429506c705d588ce2/logTestExecBuild_collated_strings353617780
--- FAIL: TestExecBuild_collated_strings (2.15s)
Help

See also: How To Investigate a Go Test Failure (internal)

/cc @cockroachdb/sql-queries

This test on roachdash | Improve this report!

Jira issue: CRDB-35428

@cockroach-teamcity cockroach-teamcity added branch-master Failures on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-queries SQL Queries Team labels Jan 18, 2024
@cockroach-teamcity cockroach-teamcity added this to the 24.1 milestone Jan 18, 2024
@mgartner
Copy link
Collaborator

The diff:

-              │    ├── cost: 42.86
+              │    ├── cost: 64.25

@cockroach-teamcity
Copy link
Member Author

pkg/sql/opt/exec/execbuilder/tests/local/local_test.TestExecBuild_collated_strings failed with artifacts on master @ c74eac56a10e82798d8486d7aca3204a117bc8cf:

             ├── key: (1)
             ├── fd: ()-->(2)
             ├── distribution: test
             ├── prune: (1)
             ├── scan t98400
             │    ├── columns: k:1 s:2
             │    ├── stats: [rows=13, distinct(1)=13, null(1)=0, distinct(2)=3, null(2)=0]
             │    │   histogram(1)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1
             │    │                <--- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13
             │    │   histogram(2)=  0                 1                 10                  2
             │    │                <--- 'foo' COLLATE en_US_u_ks_level2 ---- 'world' COLLATE en_US_u_ks_level2
             │    ├── cost: 42.86
             │    ├── key: (1)
             │    ├── fd: (1)-->(2)
             │    ├── distribution: test
             │    └── prune: (1,2)
             └── filters
                  └── s:2 = 'hello' COLLATE en_US_u_ks_level2 [outer=(2), constraints=(/2: [/'hello' COLLATE en_US_u_ks_level2 - /'hello' COLLATE en_US_u_ks_level2]; tight), fd=()-->(2)]
        but found (query options: "") :
            select
             ├── columns: k:1 s:2
             ├── stats: [rows=10, distinct(2)=1, null(2)=0]
             │   histogram(2)=  0                 10
             │                <--- 'hello' COLLATE en_US_u_ks_level2
             ├── cost: 64.41
             ├── key: (1)
             ├── fd: ()-->(2)
             ├── distribution: test
             ├── prune: (1)
             ├── scan t98400
             │    ├── columns: k:1 s:2
             │    ├── stats: [rows=13, distinct(1)=13, null(1)=0, distinct(2)=3, null(2)=0]
             │    │   histogram(1)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1
             │    │                <--- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13
             │    │   histogram(2)=  0                 1                 10                  2
             │    │                <--- 'foo' COLLATE en_US_u_ks_level2 ---- 'world' COLLATE en_US_u_ks_level2
             │    ├── cost: 64.25
             │    ├── key: (1)
             │    ├── fd: (1)-->(2)
             │    ├── distribution: test
             │    └── prune: (1,2)
             └── filters
                  └── s:2 = 'hello' COLLATE en_US_u_ks_level2 [outer=(2), constraints=(/2: [/'hello' COLLATE en_US_u_ks_level2 - /'hello' COLLATE en_US_u_ks_level2]; tight), fd=()-->(2)]
            
[23:38:44] --- done: /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/9508/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/opt/exec/execbuilder/tests/local/local_test_/local_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/opt/exec/execbuilder/testdata/collated_strings with config local: 3 tests, 1 failures
[23:38:45] --- total progress: 3 statements
--- total: 3 tests, 1 failures
    logic.go:4191: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/7c0b99e5fac8a43429506c705d588ce2/logTestExecBuild_collated_strings822237745
--- FAIL: TestExecBuild_collated_strings (2.25s)
Help

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

@DrewKimball
Copy link
Collaborator

DrewKimball commented Jan 19, 2024

Probably fallout from #117714 - most likely, the test just needs to be regenerated.

Actually never mind that, it looks like the histogram is sane in both cases...

@yuzefovich yuzefovich self-assigned this Jan 19, 2024
@yuzefovich yuzefovich removed the release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. label Jan 19, 2024
@cockroach-teamcity
Copy link
Member Author

pkg/sql/opt/exec/execbuilder/tests/local/local_test.TestExecBuild_collated_strings failed with artifacts on master @ eb42e39c887b9429cc46aed9db7ef66a4f6ebe82:

             ├── key: (1)
             ├── fd: ()-->(2)
             ├── distribution: test
             ├── prune: (1)
             ├── scan t98400
             │    ├── columns: k:1 s:2
             │    ├── stats: [rows=13, distinct(1)=13, null(1)=0, distinct(2)=3, null(2)=0]
             │    │   histogram(1)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1
             │    │                <--- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13
             │    │   histogram(2)=  0                 1                 10                  2
             │    │                <--- 'foo' COLLATE en_US_u_ks_level2 ---- 'world' COLLATE en_US_u_ks_level2
             │    ├── cost: 42.86
             │    ├── key: (1)
             │    ├── fd: (1)-->(2)
             │    ├── distribution: test
             │    └── prune: (1,2)
             └── filters
                  └── s:2 = 'hello' COLLATE en_US_u_ks_level2 [outer=(2), constraints=(/2: [/'hello' COLLATE en_US_u_ks_level2 - /'hello' COLLATE en_US_u_ks_level2]; tight), fd=()-->(2)]
        but found (query options: "") :
            select
             ├── columns: k:1 s:2
             ├── stats: [rows=10, distinct(2)=1, null(2)=0]
             │   histogram(2)=  0                 10
             │                <--- 'hello' COLLATE en_US_u_ks_level2
             ├── cost: 64.41
             ├── key: (1)
             ├── fd: ()-->(2)
             ├── distribution: test
             ├── prune: (1)
             ├── scan t98400
             │    ├── columns: k:1 s:2
             │    ├── stats: [rows=13, distinct(1)=13, null(1)=0, distinct(2)=3, null(2)=0]
             │    │   histogram(1)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1
             │    │                <--- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13
             │    │   histogram(2)=  0                 1                 10                  2
             │    │                <--- 'foo' COLLATE en_US_u_ks_level2 ---- 'world' COLLATE en_US_u_ks_level2
             │    ├── cost: 64.25
             │    ├── key: (1)
             │    ├── fd: (1)-->(2)
             │    ├── distribution: test
             │    └── prune: (1,2)
             └── filters
                  └── s:2 = 'hello' COLLATE en_US_u_ks_level2 [outer=(2), constraints=(/2: [/'hello' COLLATE en_US_u_ks_level2 - /'hello' COLLATE en_US_u_ks_level2]; tight), fd=()-->(2)]
            
[00:41:30] --- done: /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/7837/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/opt/exec/execbuilder/tests/local/local_test_/local_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/opt/exec/execbuilder/testdata/collated_strings with config local: 3 tests, 1 failures
[00:41:31] --- total progress: 3 statements
--- total: 3 tests, 1 failures
    logic.go:4191: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/7c0b99e5fac8a43429506c705d588ce2/logTestExecBuild_collated_strings1264121208
--- FAIL: TestExecBuild_collated_strings (2.39s)
Help

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

@yuzefovich
Copy link
Member

When running the test repeatedly (not under stress) with #117949 I did see another failure:

        but found (query options: "") :
            select
             ├── columns: k:1 s:2
             ├── stats: [rows=10, distinct(2)=1, null(2)=0]
             ├── cost: 1118.85
             ├── key: (1)
             ├── fd: ()-->(2)
             ├── distribution: test
             ├── prune: (1)
             ├── scan t98400
             │    ├── columns: k:1 s:2
             │    ├── stats: [rows=1000, distinct(1)=1000, null(1)=0, distinct(2)=100, null(2)=10]
             │    ├── cost: 1108.82
             │    ├── key: (1)
             │    ├── fd: (1)-->(2)
             │    ├── distribution: test
             │    └── prune: (1,2)
             └── filters
                  └── s:2 = 'hello' COLLATE en_US_u_ks_level2 [outer=(2), constraints=(/2: [/'hello' COLLATE en_US_u_ks_level2 - /'hello' COLLATE en_US_u_ks_level2]; tight), fd=()-->(2)]

which suggests that stats weren't available yet. Have you seen this type of problem before? Should we have a retry directive on this logictest? I think we generally inject stats, so perhaps rather than inserting data and collecting stats this test should also just inject stats? I'll send a patch to do that.

@cockroach-teamcity
Copy link
Member Author

pkg/sql/opt/exec/execbuilder/tests/local/local_test.TestExecBuild_collated_strings failed with artifacts on master @ eb42e39c887b9429cc46aed9db7ef66a4f6ebe82:

             ├── key: (1)
             ├── fd: ()-->(2)
             ├── distribution: test
             ├── prune: (1)
             ├── scan t98400
             │    ├── columns: k:1 s:2
             │    ├── stats: [rows=13, distinct(1)=13, null(1)=0, distinct(2)=3, null(2)=0]
             │    │   histogram(1)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1
             │    │                <--- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13
             │    │   histogram(2)=  0                 1                 10                  2
             │    │                <--- 'foo' COLLATE en_US_u_ks_level2 ---- 'world' COLLATE en_US_u_ks_level2
             │    ├── cost: 42.86
             │    ├── key: (1)
             │    ├── fd: (1)-->(2)
             │    ├── distribution: test
             │    └── prune: (1,2)
             └── filters
                  └── s:2 = 'hello' COLLATE en_US_u_ks_level2 [outer=(2), constraints=(/2: [/'hello' COLLATE en_US_u_ks_level2 - /'hello' COLLATE en_US_u_ks_level2]; tight), fd=()-->(2)]
        but found (query options: "") :
            select
             ├── columns: k:1 s:2
             ├── stats: [rows=10, distinct(2)=1, null(2)=0]
             │   histogram(2)=  0                 10
             │                <--- 'hello' COLLATE en_US_u_ks_level2
             ├── cost: 64.41
             ├── key: (1)
             ├── fd: ()-->(2)
             ├── distribution: test
             ├── prune: (1)
             ├── scan t98400
             │    ├── columns: k:1 s:2
             │    ├── stats: [rows=13, distinct(1)=13, null(1)=0, distinct(2)=3, null(2)=0]
             │    │   histogram(1)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1
             │    │                <--- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13
             │    │   histogram(2)=  0                 1                 10                  2
             │    │                <--- 'foo' COLLATE en_US_u_ks_level2 ---- 'world' COLLATE en_US_u_ks_level2
             │    ├── cost: 64.25
             │    ├── key: (1)
             │    ├── fd: (1)-->(2)
             │    ├── distribution: test
             │    └── prune: (1,2)
             └── filters
                  └── s:2 = 'hello' COLLATE en_US_u_ks_level2 [outer=(2), constraints=(/2: [/'hello' COLLATE en_US_u_ks_level2 - /'hello' COLLATE en_US_u_ks_level2]; tight), fd=()-->(2)]
            
[02:05:07] --- done: /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/13794/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/opt/exec/execbuilder/tests/local/local_test_/local_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/opt/exec/execbuilder/testdata/collated_strings with config local: 3 tests, 1 failures
[02:05:07] --- total progress: 3 statements
--- total: 3 tests, 1 failures
    logic.go:4191: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/7c0b99e5fac8a43429506c705d588ce2/logTestExecBuild_collated_strings3796282124
--- FAIL: TestExecBuild_collated_strings (2.29s)
Help

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

@craig craig bot closed this as completed in ff9de6a Jan 19, 2024
craig bot pushed a commit that referenced this issue Jan 19, 2024
117432: workload/schemachange: fix CREATE FUNCTION flakes r=renatolabs,rafiss a=annrpom

### workload/schemachange: limit amount of params generated by create fn
Previously, our schemachange workload flaked due to some `CREATE
FUNCTION`s 
randomly generated with >= 100 params; however, this is not
allowed and not a particularly useful edge case to test. This patch
prevents these types of functions from being generated by adding a
restriction to the max length of fn params.

Informs: #116649

Epic: none
Release note: None

---

### workload/schemachange: handle cases of duplicate functions
This patch ensures that our schemachange workload is able
to handle cases where we could generate duplicate functions
(same name, same param types). We will now detect whether
or not a duplicate function has been generated and add the
proper error to our expected errors list.

Fixes: #117421

Epic: none
Release note: None


117911: sql: fix delimiter of _geometry and _geography types r=rharding6373 a=rharding6373

This PR fixes the delimiter for the `_geometry` and `_geography` array types, which are `:` in postgres like the other geometry and geography types.

Epic: none

Release note: None

117953: execbuilder: de-flake recently added test for good r=yuzefovich a=yuzefovich

In my local testing I saw recently added test fail because the stats weren't yet available. It seems like we always inject stats in the execbuilder tests, so this commit adjusts the recently added test to do that as well. Hopefully this should de-flake this test for good.

Informs: #117951.

Release note: None

Co-authored-by: Annie Pompa <annie@cockroachlabs.com>
Co-authored-by: rharding6373 <rharding6373@users.noreply.github.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants