cockroachdb / cockroachdb/cockroach

sql: support window functions with RANGE mode with OFFSET and NULLS LAST option in ORDER BY

Open
#94,032 11 comments 0 reactions 1 assignee Claimed by @DrewKimball View on GitHub
branch-release-22.2 C-test-failure O-roachtest O-robot O-rsg P-3 T-sql-queries X-nostale
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

roachtest.sqlsmith/setup=rand-tables/setting=no-mutations [failed](https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_Nightlies_RoachtestNightlyGceBazel/8046119?buildTab=log) with [artifacts](https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_Nightlies_RoachtestNightlyGceBazel/8046119?buildTab=artifacts#/sqlsmith/setup=rand-tables/setting=no-mutations) on release-22.2 @ [773649a2b08605ba2031dce9b3c8858b15803ca2](https://github.com/cockroachdb/cockroach/commits/773649a2b08605ba2031dce9b3c8858b15803ca2):

```
test artifacts and logs in: /artifacts/sqlsmith/setup=rand-tables/setting=no-mutations/run_1
sqlsmith.go:261,sqlsmith.go:322,test_runner.go:930: error: pq: internal error: expected exactly one ordering column for RANGE mode with offset
stmt:
SELECT
sum_int(tab_16818.col1_7::INT8) OVER (PARTITION BY tab_16818.col1_2 ORDER BY tab_16818.col1_3 ASC NULLS LAST RANGE 2069976897001066630:::INT8 PRECEDING)::INT8
AS col_40715,
tab_16818.col1_3 AS col_40716,
2453699062:::OID AS col_40717
FROM
defaultdb.public.table1@[0] AS tab_16818
WHERE
true
GROUP BY
tab_16818.col1_7, tab_16818.col1_2, tab_16818.col1_5, tab_16818.col1_3
HAVING
every(true::BOOL)::BOOL;
```

Parameters: ROACHTEST_cloud=gce
, ROACHTEST_cpu=4
, ROACHTEST_encrypted=false
, ROACHTEST_ssd=0


Help

See: [roachtest README](https://github.com/cockroachdb/cockroach/blob/master/pkg/cmd/roachtest/README.md)

See: [How To Investigate \(internal\)](https://cockroachlabs.atlassian.net/l/c/SSSBr8c7)

/cc @cockroachdb/sql-queries

[This test on roachdash](https://roachdash.crdb.dev/?filter=status:open%20t:.*sqlsmith/setup=rand-tables/setting=no-mutations.*&sort=title+created&display=lastcommented+project) | [Improve this report!](https://github.com/cockroachdb/cockroach/tree/master/pkg/cmd/internal/issues)

Jira issue: CRDB-22650

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.