Giter VIP home page Giter VIP logo

Comments (5)

annrpom avatar annrpom commented on July 17, 2024
"message": "***UNEXPECTED ERROR; Received a non pg error.: context canceled"

"query": Error: ***UNEXPECTED ERROR; Failed to 
generate a random operation: CollectOne: Query: "\n\t  SELECT count(*)\n\t    FROM 
schema_w12_101.table_w1_181 as t1\n\t\t  LEFT JOIN schema_w12_101.table_w1_181 as 
t2\n\t\t\t\t     ON t1.col181_w1_188 = t2.\"col1!81_w1_192\"\n\t\t\tWHERE 
t2.\"col1!81_w1_192\" IS NOT NULL\n" []: ERROR: unsupported comparison operator: 
refcursor = refcursor (SQLSTATE 42883)
 FROM columns UNION ALL SELECT (((('INDEX ' || quote_ident(schema_name)) || '.') || 
quote_ident(table_name)) || '@') || quote_ident(index-\u003e\u003e'name') FROM indexes 
UNION ALL SELECT (((('CONSTRAINT ' || quote_ident(\"constraint\"-\u003e\u003e'name')) 
|| ' ON ') || quote_ident(schema_name)) || '.') || quote_ident(table_name) FROM constraints",
    "result": [
     "SCHEMA public",
     "SCHEMA schema_w0_63",
     "SCHEMA schema_w7_36",
     "SCHEMA schema_w5_45",
     "SCHEMA schema_w4_73",
     "SCHEMA schema_w3_87",
     "SCHEMA schema_w2_60",
     "SCHEMA schema_w1_84",
     "SCHEMA schema_w1_72",
     "SCHEMA schema_w19_88",
     "SCHEMA schema_w19_50",
     "SCHEMA schema_w17_70",
     "SCHEMA schema_w16_58",
     "SCHEMA schema_w13_59",
     "SCHEMA schema_w10_56"
    ]

removing release-blocker since this seems like a workload flake

from cockroach.

rafiss avatar rafiss commented on July 17, 2024

Nice find, do you know which operation runs that query? It seems like it might be comparing column values. Since the refcursor type is not comparable, do we need to exclude it somehow?

from cockroach.

annrpom avatar annrpom commented on July 17, 2024

@rafiss yeah, i think it's coming from rowsSatisfyFkConstraint:

q := fmt.Sprintf(`
SELECT count(*)
FROM %s as t1
LEFT JOIN %s as t2
ON t1.%s = t2.%s
WHERE t2.%s IS NOT NULL
`, childTable.String(), parentTable.String(), tree.NameString(childColumn.name), tree.NameString(parentColumn.name), tree.NameString(parentColumn.name))

i had a PR up https://github.com/cockroachdb/cockroach/pull/120712/files, but abandoned it: #119653 (comment) since we are supposed to disallow FKs on refcursors. let me confirm whether or not we actually disallow FKs on refcursors

from cockroach.

rafiss avatar rafiss commented on July 17, 2024

sounds good! thanks for digging into this

from cockroach.

annrpom avatar annrpom commented on July 17, 2024

yeah i had the wrong assumption:
i glossed over the case where we randomly don't enforce uniqueness on our parent column selection


if uniqueness was always enforced, we would not pick the refcursor type since we do not allow the recursor type to be indexed:

[email protected]:26257/demoapp/movr> CREATE TABLE example_table (                                                     
                                ->     id SERIAL PRIMARY KEY,                                                       
                                ->     cursor_column REFCURSOR UNIQUE                                               
                                -> );                                                                               
ERROR: unimplemented: column cursor_column is of type refcursor and thus is not indexable
SQLSTATE: 0A000
HINT: You have attempted to use a feature that is not yet implemented.
See: https://go.crdb.dev/issue-v/35730/v24.2

that PR def looks relevant now, but a bit wrong -- i think #124887 is all that is needed to fix

from cockroach.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.