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

compose: TestComposeCompare failed #111157

Closed
cockroach-teamcity opened this issue Sep 23, 2023 · 4 comments
Closed

compose: TestComposeCompare failed #111157

cockroach-teamcity opened this issue Sep 23, 2023 · 4 comments
Assignees
Labels
C-test-failure Broken test (automatically or manually discovered). FROZEN.branch-release-23.1.11-rc O-robot Originated from a bot. O-rsg Random Syntax Generator T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Sep 23, 2023

compose.TestComposeCompare failed with artifacts on release-23.1.11-rc @ 62ad175cbc0e9041d993ea1cc911e07d279671f5:

        test_1        |     compare_test.go:132: Checking connection to: cockroach1
        test_1        |     compare_test.go:132: Checking connection to: cockroach2
        test_1        |     --- FAIL: TestCompare/postgres (212.77s)
        test_1        |         compare_test.go:141: starting test: postgres
        test_1        |         compare_test.go:150: initializing connection: cockroach1
        test_1        |         compare_test.go:150: initializing connection: postgres
        test_1        |         compare_test.go:201: open /home/agent/work/.go/src/github.com/cockroachdb/cockroach/artifacts/_tmp/018812dfcf0ce383ac3e799915a61396/TestComposeCompare3689482607/002/postgres.log: no such file or directory
        test_1        |         compare_test.go:203: compare cockroach1 to postgres: unexpected diff:
        test_1        |               []any(Inverse(func1, []any{
        test_1        |             - 	string("010300000000000000"),
        test_1        |             + 	string("010300000001000000050000000000000000001440000000000000104000000000000014400000000000000040000000000000204000000000000000400000000000002040000000000000104000000000000014400000000000001040"),
        test_1        |               }))
        test_1        |             cockroach1:
        test_1        |             SELECT
        test_1        |             	*
        test_1        |             FROM
        test_1        |             	(
        test_1        |             		SELECT
        test_1        |             			st_makeenvelope(5.0:::FLOAT8::FLOAT8::FLOAT8, 4.0:::FLOAT8::FLOAT8::FLOAT8, 8.0:::FLOAT8::FLOAT8::FLOAT8, CASE WHEN (NULL::BOOL AND true::BOOL) THEN (4.0:::FLOAT8::FLOAT8::FLOAT8 * 4.0:::FLOAT8::FLOAT8::FLOAT8)::FLOAT8 ELSE 2.0:::FLOAT8::FLOAT8 END::FLOAT8)::GEOMETRY
        test_1        |             				AS "\\x16col272213"
        test_1        |             	)
        test_1        |             		AS "t
ab142335"
        test_1        |             ORDER BY
        test_1        |             	"\\x16col272213" NULLS LAST;
        test_1        |             
        test_1        |             postgres:
        test_1        |             SELECT
        test_1        |             	*
        test_1        |             FROM
        test_1        |             	(
        test_1        |             		SELECT
        test_1        |             			st_makeenvelope(5.0::FLOAT8::FLOAT8::FLOAT8, 4.0::FLOAT8::FLOAT8::FLOAT8, 8.0::FLOAT8::FLOAT8::FLOAT8, CASE WHEN (NULL::BOOL AND true::BOOL) THEN (4.0::FLOAT8::FLOAT8::FLOAT8 * 4.0::FLOAT8::FLOAT8::FLOAT8)::FLOAT8 ELSE 2.0::FLOAT8::FLOAT8 END::FLOAT8)::GEOMETRY
        test_1        |             				AS "\\x16col272213"
        test_1        |             	)
        test_1        |             		AS "t
ab142335"
        test_1        |             ORDER BY
        test_1        |             	"\\x16col272213" NULLS LAST;
        test_1        |             
        test_1        | FAIL
        compare_test_1 exited with code 1
        Stopping compare_cockroach2_1 ... 
        Stopping compare_cockroach1_1 ... 
        Stopping compare_postgres_1   ... 
        Stopping compare_postgres_1   ... done
        Stopping compare_cockroach2_1 ... done
        Stopping compare_cockroach1_1 ... done
        Aborting on container exit...
        
    compose_test.go:124: exit status 1
--- FAIL: TestComposeCompare (842.36s)
Help

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

Same failure on other branches

/cc @cockroachdb/sql-foundations

This test on roachdash | Improve this report!

Jira issue: CRDB-31792

@cockroach-teamcity cockroach-teamcity added branch-release-23.1.11-rc O-robot Originated from a bot. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Sep 23, 2023
@cockroach-teamcity cockroach-teamcity added this to the 23.1 milestone Sep 23, 2023
@cockroach-teamcity
Copy link
Member Author

compose.TestComposeCompare failed with artifacts on release-23.1.11-rc @ 62ad175cbc0e9041d993ea1cc911e07d279671f5:

        postgres_1    | 		CAST(col484076 AS TEXT) DESC NULLS LAST,
        postgres_1    | 		col484077 DESC NULLS LAST,
        postgres_1    | 		"""col\\U00031A8C484078" DESC NULLS FIRST,
        postgres_1    | 		col484079 DESC NULLS FIRST,
        postgres_1    | 		"%vcolͅ484080" DESC NULLS LAST,
        postgres_1    | 		col484081 NULLS FIRST,
        postgres_1    | 		CAST("%qcol 484082" AS TEXT) DESC,
        postgres_1    | 		col484083 ASC
        test_1        | --- FAIL: TestCompare (1144.04s)
        test_1        |     compare_test.go:132: Checking connection to: postgres
        test_1        |     compare_test.go:132: Checking connection to: cockroach1
        test_1        |     compare_test.go:132: Checking connection to: cockroach2
        test_1        |     --- FAIL: TestCompare/postgres (539.33s)
        test_1        |         compare_test.go:141: starting test: postgres
        test_1        |         compare_test.go:150: initializing connection: cockroach1
        test_1        |         compare_test.go:150: initializing connection: postgres
        test_1        |         compare_test.go:201: open /home/agent/work/.go/src/github.com/cockroachdb/cockroach/artifacts/_tmp/018812dfcf0ce383ac3e799915a61396/TestComposeCompare541249878/002/postgres.log: no such file or directory
        test_1        |         compare_test.go:203: compare cockroach1 to postgres: unexpected diff:
        test_1        |               []any(Inverse(func1, []any{
        test_1        |             - 	nil,
        test_1        |             + 	string("010300000001000000050000000000000000E060C000000000008046400000000000E060C0000000000080564000000000008056C0000000000080564000000000008056C000000000008046400000000000E060C00000000000804640"),
        test_1        |               }))
        test_1        |             cockroach1:
        test_1        |             SELECT
        test_1        |             	*
        test_1        |             FROM
        test_1        |             	(SELECT st_geomfromgeohash('C':::STRING::STRING::STRING, NULL::INT4::INT4)::GEOMETRY AS col484148) AS tab292732
        test_1        |             ORDER BY
        test_1        |             	col484148 NULLS FIRST;
        test_1        |             
        test_1        |             postgres:
        test_1        |             SELECT
        test_1        |             	*
        test_1        |             FROM
        test_1        |             	(SELECT st_geomfromgeohash('C'::TEXT::TEXT::TEXT, NULL::INT4::INT4)::GEOMETRY AS col484148) AS tab292732
        test_1        |             ORDER BY
        test_1        |             	col484148 NULLS FIRST;
        test_1        |             
        test_1        | FAIL
        compare_test_1 exited with code 1
        Stopping compare_postgres_1   ... 
        Stopping compare_cockroach2_1 ... 
        Stopping compare_cockroach1_1 ... 
        Stopping compare_postgres_1   ... done
        Stopping compare_cockroach2_1 ... done
        Stopping compare_cockroach1_1 ... done
        Aborting on container exit...
        
    compose_test.go:124: exit status 1
--- FAIL: TestComposeCompare (1169.18s)
Help

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

Same failure on other branches

This test on roachdash | Improve this report!

@fqazi fqazi added T-sql-queries SQL Queries Team and removed T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Sep 26, 2023
@fqazi fqazi removed this from Triage in SQL Foundations Sep 26, 2023
@fqazi
Copy link
Collaborator

fqazi commented Sep 26, 2023

@cockroachdb/sql-queries This looks like it's linked to geospatial functions like st_geomfromgeohash and st_makeenvelope not producing the same output as Postgres. Can someone take a look?

@yuzefovich yuzefovich added the C-test-failure Broken test (automatically or manually discovered). label Sep 26, 2023
@michae2 michae2 added the O-rsg Random Syntax Generator label Oct 4, 2023
@rharding6373
Copy link
Collaborator

rharding6373 commented Nov 3, 2023

Looking at a more recent failure with artifacts, here's a repro:

SELECT
*
FROM
(SELECT st_pointfromgeohash('B'::TEXT::TEXT::TEXT, NULL::INT4::INT4)::GEOMETRY AS col399955)
AS "ta\vb 195419"
ORDER BY
col399955 ASC NULLS LAST;

cockroach:

  col399955
-------------
  NULL

postgres:

                 col399955                  
--------------------------------------------
 01010000000000000000B063C00000000000E05040

This looks similar to the second failure in this thread with a similar builtin, which reduces to:

SELECT st_geomfromgeohash('C'::TEXT, NULL::INT4)::GEOMETRY;

cockroach:

NULL

postgres:

 010300000001000000050000000000000000E060C000000000008046400000000000E060C0000000000080564000000000008056C0000000000080564000000000008056C000000000008046400000000000E060C00000000000804640

@rharding6373
Copy link
Collaborator

rharding6373 commented Nov 3, 2023

You can also repro the error in the first comment:

SELECT
*
FROM
(
SELECT
st_makeenvelope(5.0::FLOAT8::FLOAT8::FLOAT8, 4.0::FLOAT8::FLOAT8::FLOAT8, 8.0::FLOAT8::FLOAT8::FLOAT8, CASE WHEN (NULL::BOOL AND true::BOOL) THEN (4.0::FLOAT8::FLOAT8::FLOAT8 * 4.0::FLOAT8::FLOAT8::FLOAT8)::FLOAT8 ELSE 2.0::FLOAT8::FLOAT8 END::FLOAT8)::GEOMETRY
AS "\\x16col272213"
)
AS "tab142335"
ORDER BY
"\\x16col272213" NULLS LAST;

Which reduces to:

SELECT st_makeenvelope(5.0::FLOAT8, 4.0::FLOAT8, 8.0::FLOAT8, 2.0::FLOAT8)::GEOMETRY;

cockroach:

  010300000000000000

postgres:

 010300000001000000050000000000000000001440000000000000104000000000000014400000000000000040000000000000204000000000000000400000000000002040000000000000104000000000000014400000000000001040

rharding6373 added a commit to rharding6373/cockroach that referenced this issue Nov 3, 2023
Allows and adds support for NULL inputs for the st_pointfromgeohash and
st_geomfromgeohash built-ins.

Epic: None
Informs: cockroachdb#111157

Release note (bug fix): Fixes null input handling for the geospatial
built-ins st_pointfromgeohash and st_geomfromgeohash.
rharding6373 added a commit to rharding6373/cockroach that referenced this issue Nov 3, 2023
Postgis allows xmin/ymin to be greater than xmax/ymax respectively in
st_makeenvelope, but the geom library does not allow this when
converting Bounds to Polygon. Instead, we build the polygon explicitly
from the provided min/max coordinates.

Epic: None
Fixes: cockroachdb#111157

Release note (bug fix): The geospatial st_makeenvelope built-in now
correctly supports xmin or ymin to be greater than xmax or ymax,
respectively.
rharding6373 added a commit to rharding6373/cockroach that referenced this issue Nov 3, 2023
Allows and adds support for NULL inputs for the st_pointfromgeohash and
st_geomfromgeohash built-ins.

Epic: None
Informs: cockroachdb#111157

Release note (bug fix): Fixes null input handling for the geospatial
built-ins st_pointfromgeohash and st_geomfromgeohash.
craig bot pushed a commit that referenced this issue Nov 5, 2023
113781: geo: various geospatial built-in fixes r=rharding6373 a=rharding6373

    geo: support null input for geohash builtins
    
    Allows and adds support for NULL inputs for the st_pointfromgeohash and
    st_geomfromgeohash built-ins.
    
    Epic: None
    Informs: #111157
    
    Release note (bug fix): Fixes null input handling for the geospatial
    built-ins st_pointfromgeohash and st_geomfromgeohash.
  

    geo: allow st_makeenvelope min/max bounds to be reversed
    
    Postgis allows xmin/ymin to be greater than xmax/ymax respectively in
    st_makeenvelope, but the geom library does not allow this when
    converting Bounds to Polygon. Instead, we build the polygon explicitly
    from the provided min/max coordinates.
    
    Epic: None
    Fixes: #111157
    
    Release note (bug fix): The geospatial st_makeenvelope built-in now
    correctly supports xmin or ymin to be greater than xmax or ymax,
    respectively.

Co-authored-by: rharding6373 <rharding6373@users.noreply.github.com>
@rharding6373 rharding6373 self-assigned this Nov 5, 2023
@craig craig bot closed this as completed in d929408 Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-test-failure Broken test (automatically or manually discovered). FROZEN.branch-release-23.1.11-rc O-robot Originated from a bot. O-rsg Random Syntax Generator T-sql-queries SQL Queries Team
Projects
Archived in project
Development

No branches or pull requests

6 participants