cockroachdb / cockroachdb/cockroach

sql/tests: COPY does not round-trip after format/re-parse

Open
#165,400 2 comments 0 reactions 1 assignee Claimed by @DrewKimball View on GitHub
branch-master C-test-failure O-robot T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

sql/tests.TestRandomSyntaxGeneration [failed](https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_Nightlies_RandomSyntaxTestsBazel/21229932?buildTab=log) with [artifacts](https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_Nightlies_RandomSyntaxTestsBazel/21229932?buildTab=artifacts#/) on master @ [327bfa5a9d46937117f45aa48762f9fb2b364598](https://github.com/cockroachdb/cockroach/commits/327bfa5a9d46937117f45aa48762f9fb2b364598):

```
rsg_test.go:125: Last executed (4): COMMENT ON CONSTRAINT SMALLINT ON STATEMENTS IS NULL
rsg_test.go:125: Last executed (5): ANALYZE MINVALUE . CURRENT_SCHEMA . STABLE
rsg_test.go:125: Last executed (6): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (7): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (8): FETCH RELATIVE 116 BETWEEN
rsg_test.go:125: Last executed (9): COPY COALESCE . FAMILY ( ident ) TO error
rsg_test.go:125: Last executed (10): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (11): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (12): REFRESH MATERIALIZED VIEW CONCURRENTLY ident . INNER . ABSOLUTE
rsg_test.go:125: Last executed (13): COMMENT ON CONSTRAINT INOUT ON NOTHING_AFTER_RETURNING . FAMILY . ident IS NULL
rsg_test.go:125: Last executed (14): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (15): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (16): COPY FAMILY . NOTNULL ( ANNOTATE_TYPE ) FROM error
rsg_test.go:125: Last executed (17): UNLISTEN NOTHING_AFTER_RETURNING . UPDATE
rsg_test.go:125: Last executed (18): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (19): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (20): TRUNCATE ONLY INDEX_BEFORE_PAREN . ident . THROTTLING CASCADE
rsg_test.go:125: Last executed (21): DROP OWNED BY CURRENT_USER , ident , BEFORE
rsg_test.go:125: Last executed (22): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (23): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (24): COMMENT ON SCHEMA INTEGER . DOUBLE IS 'string'
rsg_test.go:125: Last executed (25): COMMENT ON CONSTRAINT TREAT ON NOTHING_AFTER_RETURNING . FORCE_NULL . UNION IS NULL
rsg_test.go:125: Last executed (26): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (27): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (28): COMMENT ON TYPE SIMPLE IS NULL
rsg_test.go:125: Last executed (29): COPY FAMILY FROM STDIN WITH ( FORMAT CSV , HEADER TRUE , FORCE_QUOTE error )
rsg_test.go:125: Last executed (30): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (31): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (32): COPY FAMILY ( ident ) TO STDOUT WITH ( DELIMITER 'string' )
rsg_test.go:125: Last executed (33): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (34): RESTORE FAMILY . ident FROM 'string' IN ( 'string' , PLACEHOLDER ) WITH SKIP_MISSING_UDFS , SKIP_MISSING_UDFS , SKIP_MISSING_VIEWS
rsg_test.go:125: Last executed (35): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (36): COPY ( UPDATE error ) TO STDOUT WITH ( ESCAPE 'string' , FORCE_QUOTE error , DESTINATION 'string' )
rsg_test.go:125: Last executed (37): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (38): FETCH -308 ident
rsg_test.go:125: Last executed (39): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (40): DROP OWNED BY PARTITIONS , SESSION_USER , GEOMETRYCOLLECTIONZM , CURRENT_USER
rsg_test.go:125: Last executed (41): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (42): COMMENT ON TABLE INDEX_AFTER_ORDER_BY_BEFORE_AT . GROUPING . FAMILY IS NULL
rsg_test.go:125: Last executed (43): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (44): COMMENT ON INDEX ident . POLYGON . REGIONAL @ NOT IS NULL
rsg_test.go:125: Last executed (45): FETCH BACKWARD + 44 DECIMAL
rsg_test.go:125: Last executed (46): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (47): CREATE DATABASE IF NOT EXISTS ident
rsg_test.go:125: Last executed (48): MOVE FORWARD - 302 ident
rsg_test.go:125: Last executed (49): COPY FAMILY . CURRENT_SCHEMA ( EXCLUDING , NOWAIT ) FROM error
rsg_test.go:128: Currently active statements: map[]
rsg_test.go:377: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/d437d2c847dfedbc4972f231c3331c8e/logTestRandomSyntaxGeneration145270290
--- FAIL: TestRandomSyntaxGeneration (301.77s)
```
Help

See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)

Same failure on other branches

- #132558 sql/tests: TestRandomSyntaxGeneration failed [CREATE TENANT statement is not valid after parsing then formatting] [C-test-failure O-robot P-3 T-db-server branch-release-24.1.6-rc]

/cc @cockroachdb/sql-foundations

[This test on roachdash](https://roachdash.crdb.dev/?filter=status:open%20t:.*TestRandomSyntaxGeneration.*&sort=title+created&display=lastcommented+project) | [Improve this report!](https://github.com/cockroachdb/cockroach/tree/master/pkg/cmd/bazci/githubpost/issues)

Jira issue: CRDB-61366

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.