-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
roachtest: costfuzz/unoptimized-query-oracle make sure randomly generated aggregate functions are deterministic #87353
Labels
branch-master
Failures and bugs on the master branch.
C-test-failure
Broken test (automatically or manually discovered).
O-roachtest
O-robot
Originated from a bot.
T-sql-queries
SQL Queries Team
Milestone
Comments
cockroach-teamcity
added
branch-master
Failures and bugs on the master branch.
C-test-failure
Broken test (automatically or manually discovered).
O-roachtest
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.
labels
Sep 3, 2022
This comment was marked as duplicate.
This comment was marked as duplicate.
Reduced reproduction:
Looks like this is not a blocker, and probably due to |
Further reduced: CREATE TABLE table2 (
col2_0 BIT(24) NULL,
col2_1 INT2 NOT NULL,
col2_2 TIMETZ NOT NULL,
col2_4 BIT(2) NOT NULL,
col2_5 FLOAT8 NOT NULL,
col2_6 STRING NOT NULL AS (lower(CAST(col2_4 AS STRING))) VIRTUAL,
col2_7 INT8 NOT NULL AS (col2_1 + 17852:::INT8) STORED,
PRIMARY KEY (col2_2, col2_1),
INDEX (col2_7 ASC, col2_2, col2_5 ASC, col2_4 ASC, col2_6) STORING (col2_0)
);
INSERT
INTO
defaultdb.public.table2 AS tab_127 (col2_0, col2_1, col2_2, col2_4, col2_5)
VALUES
(
NULL,
(-6838):::INT8,
'21:16:16.722186+08:49:00':::TIMETZ,
B'00',
1.234567890123456e+10:::FLOAT8
);
INSERT
INTO
defaultdb.public.table2 AS tab_133 (col2_1, col2_2, col2_4, col2_5)
VALUES
((-12):::INT8, '06:28:31.085579-01:02:00':::TIMETZ, B'00', 0.0:::FLOAT8);
SELECT
tab_4700.col2_0 AS col_15194,
string_agg(tab_4700.col2_6::STRING, tab_4700.col2_6::STRING ORDER BY tab_4700.col2_6::STRING ASC, tab_4700.col2_6::STRING) OVER (PARTITION BY tab_4700.col2_6, tab_4700.col2_0 ORDER BY tab_4700.col2_6, tab_4700.col2_6::STRING ASC, tab_4700.col2_6::STRING ROWS BETWEEN CURRENT ROW AND 8049193815714677612:::INT8 FOLLOWING)::STRING
AS col_15195,
tab_4700.col2_1 AS col_15196
FROM
defaultdb.public.table2@[0] AS tab_4700
GROUP BY
tab_4700.col2_1, tab_4700.col2_0, tab_4700.col2_6
ORDER BY
tab_4700.col2_6 ASC;
SET testing_optimizer_random_seed = 8664472571050980723;
SET testing_optimizer_cost_perturbation = 1.0;
SELECT
tab_4700.col2_6,
tab_4700.col2_0 AS col_15194,
string_agg(tab_4700.col2_6::STRING, tab_4700.col2_6::STRING ORDER BY tab_4700.col2_6::STRING ASC, tab_4700.col2_6::STRING) OVER (PARTITION BY tab_4700.col2_6, tab_4700.col2_0 ORDER BY tab_4700.col2_6, tab_4700.col2_6::STRING ASC, tab_4700.col2_6::STRING ROWS BETWEEN CURRENT ROW AND 8049193815714677612:::INT8 FOLLOWING)::STRING
AS col_15195,
tab_4700.col2_1 AS col_15196
FROM
defaultdb.public.table2@[0] AS tab_4700
GROUP BY
tab_4700.col2_1, tab_4700.col2_0, tab_4700.col2_6
ORDER BY
tab_4700.col2_6 ASC; |
I think this is a false positive. The query is not deterministic for all states of |
mgartner
changed the title
roachtest: costfuzz failed
roachtest: costfuzz/unoptimized-query-oracle make sure randomly generated aggregate functions are deterministic
Sep 6, 2022
mgartner
removed
the
release-blocker
Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
label
Sep 6, 2022
mgartner
added a commit
to mgartner/cockroach
that referenced
this issue
Sep 6, 2022
The false-positives of costfuzz and unoptimized-query-oracle caused by aggregate functions are overwhelming. This commit prevents aggregate functions from being generated for these tests. Informs cockroachdb#87353 Release justification: This is a test-only change. Release note: None
craig bot
pushed a commit
that referenced
this issue
Sep 6, 2022
87271: sql: change when txn is checked refresh materialized views r=rafiss a=e-mbrown Due to the transaction being checked during planning and not during execution, refresh materialized views would fail from the client. Now the transaction is checked during execution . Release justification: Bug fix for refresh materialized views Release note: None 87327: bazel: detect go standard library deprecation errors r=rickystewart a=healthy-pod Previously, `staticcheck` only raised deprecation errors from non-stdlib packages because the analysis pass used by the deprecation analyzer is created by `nogo` which doesn't analyze the standard library packages. This code change patches `staticcheck` to let it detect deprecation errors from the standard library and raise them. It also removes two uses of `tls.Config.PreferServerCipherSuites` because it's deprecated since Go 1.18 and is a legacy field that is ignored and has no effect. Closes #84877 Release justification: Non-production code change Release note: None 87426: sql: disable agg funcs in costfuzz and unoptimized query oracle r=mgartner a=mgartner The false-positives of costfuzz and unoptimized-query-oracle caused by aggregate functions are overwhelming. This commit prevents aggregate functions from being generated for these tests. Informs #87353 Release justification: This is a test-only change. Release note: None 87431: server: mark testDrainContext assertion methods as test helpers r=nvanbenschoten a=nvanbenschoten The error messages in cases like #86974 are not useful otherwise. This change allows us to see where the assertion method was called from. Release justification: testing only. Co-authored-by: e-mbrown <[email protected]> Co-authored-by: healthy-pod <[email protected]> Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: Nathan VanBenschoten <[email protected]>
DrewKimball
added a commit
to DrewKimball/cockroach
that referenced
this issue
Sep 8, 2022
This commit modifies the sqlsmith logic to add all columns to the `OVER` clause for all window functions except for the ranking functions. This is necessary because all other window/aggregate functions can produce different results for different rows within a peer group. Ordering on all columns ensures that we are ordering on a key, which restricts each peer group to one row (and therefore ensures there is only one possible order within each peer group). This commit also reverts cockroachdb#86742, since window functions should now be deterministic. Fixes cockroachdb#87353 Release note: None
DrewKimball
added a commit
to DrewKimball/cockroach
that referenced
this issue
Sep 9, 2022
This commit modifies the sqlsmith logic to add all columns to the `OVER` clause for all window functions except for the ranking functions. This is necessary because all other window/aggregate functions can produce different results for different rows within a peer group. Ordering on all columns ensures that we are ordering on a key, which restricts each peer group to one row (and therefore ensures there is only one possible order within each peer group). This commit also reverts cockroachdb#87426, since window functions should now be deterministic. Fixes cockroachdb#87353 Release note: None
craig bot
pushed a commit
that referenced
this issue
Sep 13, 2022
87591: roachtest: make window functions deterministic r=DrewKimball a=DrewKimball This commit modifies the sqlsmith logic to add all columns to the `OVER` clause for all window functions except for the ranking functions. This is necessary because all other window/aggregate functions can produce different results for different rows within a peer group. Ordering on all columns ensures that we are ordering on a key, which restricts each peer group to one row (and therefore ensures there is only one possible order within each peer group). This commit also reverts #86742, since window functions should now be deterministic. Fixes #87353 Release note: None Co-authored-by: DrewKimball <[email protected]>
michae2
pushed a commit
that referenced
this issue
Jun 28, 2023
This commit modifies the sqlsmith logic to add all columns to the `OVER` clause for all window functions except for the ranking functions. This is necessary because all other window/aggregate functions can produce different results for different rows within a peer group. Ordering on all columns ensures that we are ordering on a key, which restricts each peer group to one row (and therefore ensures there is only one possible order within each peer group). This commit also reverts #87426, since window functions should now be deterministic. Fixes #87353 Release note: None
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
branch-master
Failures and bugs on the master branch.
C-test-failure
Broken test (automatically or manually discovered).
O-roachtest
O-robot
Originated from a bot.
T-sql-queries
SQL Queries Team
roachtest.costfuzz failed with artifacts on master @ 4dcb32c0346e20a95847763f89b9b0796d9ed4dc:
Parameters:
ROACHTEST_cloud=gce
,ROACHTEST_cpu=4
,ROACHTEST_ssd=0
Help
See: roachtest README
See: How To Investigate (internal)
Same failure on other branches
This test on roachdash | Improve this report!
Jira issue: CRDB-19289
The text was updated successfully, but these errors were encountered: