diff --git a/crates/connectors/ndc-citus/tests/query_tests.rs b/crates/connectors/ndc-citus/tests/query_tests.rs index a2f320225..2511ce4b6 100644 --- a/crates/connectors/ndc-citus/tests/query_tests.rs +++ b/crates/connectors/ndc-citus/tests/query_tests.rs @@ -108,18 +108,6 @@ mod predicates { insta::assert_json_snapshot!(result); } - #[tokio::test] - async fn select_where_name_similar() { - let result = run_query(create_router().await, "select_where_name_similar").await; - insta::assert_json_snapshot!(result); - } - - #[tokio::test] - async fn select_where_name_nsimilar() { - let result = run_query(create_router().await, "select_where_name_nsimilar").await; - insta::assert_json_snapshot!(result); - } - #[tokio::test] async fn select_where_name_regex() { let result = run_query(create_router().await, "select_where_name_regex").await; diff --git a/crates/connectors/ndc-citus/tests/snapshots/explain_tests__select_where_name_nilike.snap b/crates/connectors/ndc-citus/tests/snapshots/explain_tests__select_where_name_nilike.snap index 96a1109bf..cf1faded8 100644 --- a/crates/connectors/ndc-citus/tests/snapshots/explain_tests__select_where_name_nilike.snap +++ b/crates/connectors/ndc-citus/tests/snapshots/explain_tests__select_where_name_nilike.snap @@ -20,7 +20,7 @@ FROM FROM "public"."Album" AS "%0_Album" WHERE - ("%0_Album"."Title" NOT ILIKE cast($1 as varchar)) + ("%0_Album"."Title" !~~* cast($1 as varchar)) ORDER BY "%0_Album"."AlbumId" ASC LIMIT diff --git a/crates/connectors/ndc-citus/tests/snapshots/explain_tests__select_where_variable.snap b/crates/connectors/ndc-citus/tests/snapshots/explain_tests__select_where_variable.snap index 4f7518534..1f7f83087 100644 --- a/crates/connectors/ndc-citus/tests/snapshots/explain_tests__select_where_variable.snap +++ b/crates/connectors/ndc-citus/tests/snapshots/explain_tests__select_where_variable.snap @@ -20,7 +20,7 @@ FROM FROM "public"."Album" AS "%0_Album" WHERE - ("%0_Album"."Title" LIKE $1) + ("%0_Album"."Title" ~~ $1) ORDER BY "%0_Album"."AlbumId" ASC ) AS "%2_rows" diff --git a/crates/connectors/ndc-citus/tests/snapshots/query_tests__predicates__select_where_name_nsimilar.snap b/crates/connectors/ndc-citus/tests/snapshots/query_tests__predicates__select_where_name_nsimilar.snap deleted file mode 100644 index 90044145f..000000000 --- a/crates/connectors/ndc-citus/tests/snapshots/query_tests__predicates__select_where_name_nsimilar.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: crates/connectors/ndc-citus/tests/query_tests.rs -expression: result ---- -[ - { - "rows": [ - { - "AlbumId": 1, - "Title": "For Those About To Rock We Salute You" - }, - { - "AlbumId": 4, - "Title": "Let There Be Rock" - }, - { - "AlbumId": 6, - "Title": "Jagged Little Pill" - }, - { - "AlbumId": 7, - "Title": "Facelift" - }, - { - "AlbumId": 8, - "Title": "Warner 25 Anos" - } - ] - } -] diff --git a/crates/connectors/ndc-citus/tests/snapshots/query_tests__predicates__select_where_name_similar.snap b/crates/connectors/ndc-citus/tests/snapshots/query_tests__predicates__select_where_name_similar.snap deleted file mode 100644 index e4bab5112..000000000 --- a/crates/connectors/ndc-citus/tests/snapshots/query_tests__predicates__select_where_name_similar.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: crates/connectors/ndc-citus/tests/query_tests.rs -expression: result ---- -[ - { - "rows": [ - { - "AlbumId": 2, - "Title": "Balls to the Wall" - }, - { - "AlbumId": 3, - "Title": "Restless and Wild" - }, - { - "AlbumId": 5, - "Title": "Big Ones" - }, - { - "AlbumId": 12, - "Title": "BackBeat Soundtrack" - }, - { - "AlbumId": 16, - "Title": "Black Sabbath" - } - ] - } -] diff --git a/crates/connectors/ndc-citus/tests/snapshots/schema_tests__get_schema.snap b/crates/connectors/ndc-citus/tests/snapshots/schema_tests__get_schema.snap index 22d0be7be..20b8971af 100644 --- a/crates/connectors/ndc-citus/tests/snapshots/schema_tests__get_schema.snap +++ b/crates/connectors/ndc-citus/tests/snapshots/schema_tests__get_schema.snap @@ -4,67 +4,6 @@ expression: result --- { "scalar_types": { - "bit": { - "aggregate_functions": { - "bit_and": { - "result_type": { - "type": "named", - "name": "bit" - } - }, - "bit_or": { - "result_type": { - "type": "named", - "name": "bit" - } - }, - "bit_xor": { - "result_type": { - "type": "named", - "name": "bit" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "bit" - } - } - }, - "update_operators": {} - }, "bool": { "aggregate_functions": { "bool_and": { @@ -126,95 +65,88 @@ expression: result }, "update_operators": {} }, - "bpchar": { - "aggregate_functions": { - "max": { - "result_type": { + "char": { + "aggregate_functions": {}, + "comparison_operators": { + "_eq": { + "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "min": { - "result_type": { + "_gt": { + "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } - } - }, - "comparison_operators": { - "_eq": { + }, + "_gte": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_gt": { + "_ilike": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_gte": { + "_iregex": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_lt": { + "_like": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_lte": { + "_lt": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_neq": { + "_lte": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } - } - }, - "update_operators": {} - }, - "char": { - "aggregate_functions": {}, - "comparison_operators": { - "_eq": { + }, + "_neq": { "argument_type": { "type": "named", "name": "char" } }, - "_gt": { + "_nilike": { "argument_type": { "type": "named", "name": "char" } }, - "_gte": { + "_niregex": { "argument_type": { "type": "named", "name": "char" } }, - "_lt": { + "_nlike": { "argument_type": { "type": "named", "name": "char" } }, - "_lte": { + "_nregex": { "argument_type": { "type": "named", "name": "char" } }, - "_neq": { + "_regex": { "argument_type": { "type": "named", "name": "char" @@ -484,61 +416,6 @@ expression: result }, "update_operators": {} }, - "inet": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "inet" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "inet" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "inet" - } - } - }, - "update_operators": {} - }, "int2": { "aggregate_functions": { "avg": { @@ -902,310 +779,132 @@ expression: result }, "update_operators": {} }, - "interval": { - "aggregate_functions": { - "avg": { - "result_type": { + "name": { + "aggregate_functions": {}, + "comparison_operators": { + "_eq": { + "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "max": { - "result_type": { + "_gt": { + "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "min": { - "result_type": { + "_gte": { + "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "sum": { - "result_type": { - "type": "named", - "name": "interval" - } - } - }, - "comparison_operators": { - "_eq": { + "_ilike": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "_gt": { + "_iregex": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "_gte": { + "_like": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, "_lt": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, "_lte": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, "_neq": { "argument_type": { "type": "named", - "name": "interval" - } - } - }, - "update_operators": {} - }, - "json": { - "aggregate_functions": { - "json_cat_agg": { - "result_type": { - "type": "named", - "name": "json" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "json" + "name": "name" } }, - "_gt": { + "_nilike": { "argument_type": { "type": "named", - "name": "json" + "name": "name" } }, - "_gte": { + "_niregex": { "argument_type": { "type": "named", - "name": "json" + "name": "name" } }, - "_lt": { + "_nlike": { "argument_type": { "type": "named", - "name": "json" + "name": "name" } }, - "_lte": { + "_nregex": { "argument_type": { "type": "named", - "name": "json" + "name": "name" } }, - "_neq": { + "_regex": { "argument_type": { "type": "named", - "name": "json" + "name": "name" } } }, "update_operators": {} }, - "jsonb": { + "numeric": { "aggregate_functions": { - "jsonb_cat_agg": { + "avg": { "result_type": { "type": "named", - "name": "jsonb" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "jsonb" + "name": "numeric" } }, - "_gt": { - "argument_type": { + "max": { + "result_type": { "type": "named", - "name": "jsonb" + "name": "numeric" } }, - "_gte": { - "argument_type": { + "min": { + "result_type": { "type": "named", - "name": "jsonb" + "name": "numeric" } }, - "_lt": { - "argument_type": { + "stddev": { + "result_type": { "type": "named", - "name": "jsonb" + "name": "numeric" } }, - "_lte": { - "argument_type": { + "stddev_pop": { + "result_type": { "type": "named", - "name": "jsonb" + "name": "numeric" } }, - "_neq": { - "argument_type": { + "stddev_samp": { + "result_type": { "type": "named", - "name": "jsonb" - } - } - }, - "update_operators": {} - }, - "money": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "money" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "money" - } - }, - "sum": { - "result_type": { - "type": "named", - "name": "money" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "money" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "money" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "money" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "money" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "money" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "money" - } - } - }, - "update_operators": {} - }, - "name": { - "aggregate_functions": {}, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "name" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "name" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "name" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "name" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "name" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "name" - } - } - }, - "update_operators": {} - }, - "numeric": { - "aggregate_functions": { - "avg": { - "result_type": { - "type": "named", - "name": "numeric" - } - }, - "max": { - "result_type": { - "type": "named", - "name": "numeric" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "numeric" - } - }, - "stddev": { - "result_type": { - "type": "named", - "name": "numeric" - } - }, - "stddev_pop": { - "result_type": { - "type": "named", - "name": "numeric" - } - }, - "stddev_samp": { - "result_type": { - "type": "named", - "name": "numeric" + "name": "numeric" } }, "sum": { @@ -1273,116 +972,6 @@ expression: result }, "update_operators": {} }, - "oid": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "oid" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "oid" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "oid" - } - } - }, - "update_operators": {} - }, - "pg_lsn": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "pg_lsn" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - } - }, - "update_operators": {} - }, "regclass": { "aggregate_functions": {}, "comparison_operators": { @@ -1519,78 +1108,11 @@ expression: result "name": "text" } }, - "_nsimilar": { - "argument_type": { - "type": "named", - "name": "text" - } - }, "_regex": { "argument_type": { "type": "named", "name": "text" } - }, - "_similar": { - "argument_type": { - "type": "named", - "name": "text" - } - } - }, - "update_operators": {} - }, - "tid": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "tid" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "tid" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "tid" - } } }, "update_operators": {} @@ -1938,127 +1460,11 @@ expression: result "name": "varchar" } }, - "_nsimilar": { - "argument_type": { - "type": "named", - "name": "varchar" - } - }, "_regex": { "argument_type": { "type": "named", "name": "varchar" } - }, - "_similar": { - "argument_type": { - "type": "named", - "name": "varchar" - } - } - }, - "update_operators": {} - }, - "xid8": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "xid8" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "xid8" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "xid8" - } - } - }, - "update_operators": {} - }, - "xml": { - "aggregate_functions": { - "xmlagg": { - "result_type": { - "type": "named", - "name": "xml" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "xml" - } } }, "update_operators": {} diff --git a/crates/connectors/ndc-cockroach/tests/snapshots/schema_tests__get_schema.snap b/crates/connectors/ndc-cockroach/tests/snapshots/schema_tests__get_schema.snap index ce4299cf0..c83c9e77a 100644 --- a/crates/connectors/ndc-cockroach/tests/snapshots/schema_tests__get_schema.snap +++ b/crates/connectors/ndc-cockroach/tests/snapshots/schema_tests__get_schema.snap @@ -65,95 +65,100 @@ expression: result }, "update_operators": {} }, - "bytea": { - "aggregate_functions": { - "concat_agg": { - "result_type": { + "char": { + "aggregate_functions": {}, + "comparison_operators": { + "_eq": { + "argument_type": { "type": "named", - "name": "bytea" + "name": "char" } }, - "xor_agg": { - "result_type": { + "_gt": { + "argument_type": { "type": "named", - "name": "bytea" + "name": "char" } - } - }, - "comparison_operators": { - "_eq": { + }, + "_gte": { "argument_type": { "type": "named", - "name": "bytea" + "name": "char" } }, - "_gt": { + "_ilike": { "argument_type": { "type": "named", - "name": "bytea" + "name": "char" } }, - "_gte": { + "_iregex": { + "argument_type": { + "type": "named", + "name": "char" + } + }, + "_like": { "argument_type": { "type": "named", - "name": "bytea" + "name": "char" } }, "_lt": { "argument_type": { "type": "named", - "name": "bytea" + "name": "char" } }, "_lte": { "argument_type": { "type": "named", - "name": "bytea" + "name": "char" } }, "_neq": { "argument_type": { "type": "named", - "name": "bytea" + "name": "char" } - } - }, - "update_operators": {} - }, - "char": { - "aggregate_functions": {}, - "comparison_operators": { - "_eq": { + }, + "_nilike": { "argument_type": { "type": "named", "name": "char" } }, - "_gt": { + "_niregex": { "argument_type": { "type": "named", "name": "char" } }, - "_gte": { + "_nlike": { "argument_type": { "type": "named", "name": "char" } }, - "_lt": { + "_nregex": { "argument_type": { "type": "named", "name": "char" } }, - "_lte": { + "_nsimilar": { "argument_type": { "type": "named", "name": "char" } }, - "_neq": { + "_regex": { + "argument_type": { + "type": "named", + "name": "char" + } + }, + "_similar": { "argument_type": { "type": "named", "name": "char" @@ -343,85 +348,6 @@ expression: result }, "update_operators": {} }, - "geometry": { - "aggregate_functions": { - "st_collect": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_extent": { - "result_type": { - "type": "named", - "name": "box2d" - } - }, - "st_makeline": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_memcollect": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_memunion": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_union": { - "result_type": { - "type": "named", - "name": "geometry" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "geometry" - } - } - }, - "update_operators": {} - }, "int2": { "aggregate_functions": {}, "comparison_operators": { @@ -627,95 +553,100 @@ expression: result }, "update_operators": {} }, - "interval": { - "aggregate_functions": { - "avg": { - "result_type": { + "name": { + "aggregate_functions": {}, + "comparison_operators": { + "_eq": { + "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "sum": { - "result_type": { + "_gt": { + "argument_type": { "type": "named", - "name": "interval" + "name": "name" } - } - }, - "comparison_operators": { - "_eq": { + }, + "_gte": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "_gt": { + "_ilike": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "_gte": { + "_iregex": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" + } + }, + "_like": { + "argument_type": { + "type": "named", + "name": "name" } }, "_lt": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, "_lte": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, "_neq": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } - } - }, - "update_operators": {} - }, - "name": { - "aggregate_functions": {}, - "comparison_operators": { - "_eq": { + }, + "_nilike": { "argument_type": { "type": "named", "name": "name" } }, - "_gt": { + "_niregex": { "argument_type": { "type": "named", "name": "name" } }, - "_gte": { + "_nlike": { "argument_type": { "type": "named", "name": "name" } }, - "_lt": { + "_nregex": { "argument_type": { "type": "named", "name": "name" } }, - "_lte": { + "_nsimilar": { "argument_type": { "type": "named", "name": "name" } }, - "_neq": { + "_regex": { + "argument_type": { + "type": "named", + "name": "name" + } + }, + "_similar": { "argument_type": { "type": "named", "name": "name" @@ -1140,61 +1071,6 @@ expression: result }, "update_operators": {} }, - "varbit": { - "aggregate_functions": { - "bit_and": { - "result_type": { - "type": "named", - "name": "varbit" - } - }, - "bit_or": { - "result_type": { - "type": "named", - "name": "varbit" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "varbit" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "varbit" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "varbit" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "varbit" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "varbit" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "varbit" - } - } - }, - "update_operators": {} - }, "varchar": { "aggregate_functions": {}, "comparison_operators": { diff --git a/crates/connectors/ndc-postgres/src/configuration.sql b/crates/connectors/ndc-postgres/src/configuration.sql index 99de4bb83..5766c766f 100644 --- a/crates/connectors/ndc-postgres/src/configuration.sql +++ b/crates/connectors/ndc-postgres/src/configuration.sql @@ -15,7 +15,8 @@ -- query with arguments set. -- DEALLOCATE ALL; -- Or use 'DEALLOCATE configuration' between reloads --- PREPARE configuration(varchar[]) AS +-- PREPARE configuration(varchar[], jsonb) AS + WITH -- The overall structure of this query is a CTE (i.e. 'WITH .. SELECT') -- statement which define projections of the catalog tables into forms that are @@ -227,9 +228,10 @@ WITH ) ), - -- Aggregate functions are recorded in 'pg_proc', see - -- https://www.postgresql.org/docs/current/catalog-pg-proc.html for its - -- schema. + -- Aggregate functions are recorded across 'pg_proc' and 'pg_aggregate', see + -- https://www.postgresql.org/docs/current/catalog-pg-proc.html and + -- https://www.postgresql.org/docs/current/catalog-pg-aggregate.html for + -- their schema. aggregates AS ( WITH @@ -302,6 +304,131 @@ WITH ), + -- Operators are recorded across 'pg_proc', pg_operator, and 'pg_aggregate', see + -- https://www.postgresql.org/docs/current/catalog-pg-proc.html, + -- https://www.postgresql.org/docs/current/catalog-pg-operator.html and + -- https://www.postgresql.org/docs/current/catalog-pg-aggregate.html for + -- their schema. + -- + -- In PostgreSQL, operators and aggregation functions each relate to a `pg_proc` + -- procedure. On CockroachDB, however, they are independent. + comparison_operators AS + ( + SELECT + op.oprname AS operator_name, + t1.type_name AS argument1_type, + t2.type_name AS argument2_type + FROM + pg_operator + AS op + INNER JOIN + types + AS t1 + ON (op.oprleft = t1.type_id) + INNER JOIN + types + AS t2 + ON (op.oprright = t2.type_id) + INNER JOIN + types + AS t_res + ON (op.oprresult = t_res.type_id) + WHERE + t_res.type_name = 'bool' + ORDER BY op.oprname + ), + + implicit_casts AS + ( + SELECT + t_from.type_name as from_type, + t_to.type_name as to_type + FROM + pg_cast + INNER JOIN + types + AS t_from + ON (t_from.type_id = pg_cast.castsource) + INNER JOIN + types + AS t_to + ON (t_to.type_id = pg_cast.casttarget) + WHERE + pg_cast.castcontext = 'i' + ), + + -- Some comparison operators are not defined explicitly for every type they would be + -- valid for, relying instead on implicit casts to extend the types they can apply to. + -- + -- Examples: + -- + -- Postgres only defines 'like' for 'text', not for 'varchar'. But there's + -- an implicit cast for varchar->text. + -- + -- CockroachDB does not define any comparison operators for 'float4', but + -- for 'float8', along with an implict cast for float4->float8. + -- + -- To make comparison operators available to all those types as well we + -- extend our set of operators to include implicit casts. + comparison_operators_cast_extended AS + ( + -- The left argument could have been cast. + SELECT + op.operator_name, + cast1.from_type as argument1_type, + op.argument2_type + FROM + comparison_operators + AS op + INNER JOIN + implicit_casts + AS cast1 + ON (cast1.to_type = op.argument1_type) + UNION + -- The right argument could have been cast. + SELECT + op.operator_name, + op.argument1_type, + cast2.from_type as argument2_type + FROM + comparison_operators + AS op + INNER JOIN + implicit_casts + AS cast2 + ON (cast2.to_type = op.argument2_type) + UNION + -- Both arguments could have been cast. + SELECT + op.operator_name, + cast1.from_type as argument1_type, + cast2.from_type as argument2_type + FROM + comparison_operators + AS op + INNER JOIN + implicit_casts + AS cast1 + ON (cast1.to_type = op.argument1_type) + INNER JOIN + implicit_casts + AS cast2 + ON (cast2.to_type = op.argument2_type) + UNION + -- Neither argument could have been cast. + SELECT * FROM comparison_operators + ), + + -- The names that comparison operators are exposed under is configurable. + operator_mappings AS + ( + SELECT + v ->> 'operatorName' AS operator_name, + v ->> 'exposedName' AS exposed_name + FROM + jsonb_array_elements($2) AS v + ), + -- Constraints are recorded in 'pg_constraint', see -- https://www.postgresql.org/docs/current/catalog-pg-constraint.html for its -- schema. @@ -411,7 +538,8 @@ WITH ) SELECT coalesce(tables.result, '{}'::jsonb) AS "Tables", - coalesce(aggregate_functions.result, '{}'::jsonb) AS "AggregateFunctions" + coalesce(aggregate_functions.result, '{}'::jsonb) AS "AggregateFunctions", + coalesce(comparison_functions.result, '{}'::jsonb) as "ComparisonFunctions" FROM ( -- Tables and views @@ -616,3 +744,92 @@ FROM GROUP BY agg.argument_type ) AS agg ) AS aggregate_functions + + CROSS JOIN + ( + -- Comparison Operators + WITH + comparison_operators_mapped AS + ( + SELECT + map.exposed_name, + op.operator_name, + op.argument1_type, + op.argument2_type + FROM + comparison_operators_cast_extended + AS op + INNER JOIN + operator_mappings + AS map + USING (operator_name) + ), + + -- When an operator is overloaded for a type (either explicitly or + -- through implict casts), prefer the version where both arguments are + -- the same type. + comparison_operators_filtered AS + ( + SELECT DISTINCT ON (op.exposed_name, op.argument1_type) + op.exposed_name, + op.operator_name, + op.argument1_type, + op.argument2_type + FROM + comparison_operators_mapped + AS op + ORDER BY + op.exposed_name, + op.argument1_type, + op.argument1_type = op.argument2_type DESC + ), + + comparison_operators_by_first_arg AS + ( + SELECT + op.argument1_type, + jsonb_object_agg( + op.exposed_name, + jsonb_build_object( + 'operatorName', op.operator_name, + 'argumentType', op.argument2_type + ) + ) + AS result + FROM + comparison_operators_filtered + AS op + GROUP BY op.argument1_type + ) + SELECT + jsonb_object_agg( + op.argument1_type, + op.result + ) as result + FROM + comparison_operators_by_first_arg + AS op + ) AS comparison_functions; + +-- Uncomment the following lines to just run the configuration query with reasonable default arguments +-- +-- EXECUTE configuration( +-- '{"information_schema", "tiger"}'::varchar[], +-- '[ +-- {"operatorName": "=", "alias": "_eq"}, +-- {"operatorName": "!=", "alias": "_neq"}, +-- {"operatorName": "<>", "alias": "_neq"}, +-- {"operatorName": "<=", "alias": "_lte"}, +-- {"operatorName": ">", "alias": "_gt"}, +-- {"operatorName": ">=", "alias": "_gte"}, +-- {"operatorName": "<", "alias": "_lt"}, +-- {"operatorName": "~~", "alias": "_like"}, +-- {"operatorName": "!~~", "alias": "_nlike"}, +-- {"operatorName": "~~*", "alias": "_ilike"}, +-- {"operatorName": "!~~*", "alias": "_nilike"}, +-- {"operatorName": "~", "alias": "_regex"}, +-- {"operatorName": "!~", "alias": "_nregex"}, +-- {"operatorName": "~*", "alias": "_iregex"}, +-- {"operatorName": "!~*", "alias": "_niregex"} +-- ]'::jsonb +-- ); diff --git a/crates/connectors/ndc-postgres/src/configuration/version1.rs b/crates/connectors/ndc-postgres/src/configuration/version1.rs index c0cbe6823..42dbf44fe 100644 --- a/crates/connectors/ndc-postgres/src/configuration/version1.rs +++ b/crates/connectors/ndc-postgres/src/configuration/version1.rs @@ -7,7 +7,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use sqlx::postgres::PgConnection; use sqlx::{Connection, Executor, Row}; -use std::collections::{BTreeMap, BTreeSet}; +use std::collections::BTreeSet; use query_engine_metadata::metadata; @@ -27,10 +27,124 @@ pub struct RawConfiguration { pub pool_settings: PoolSettings, #[serde(default)] pub metadata: metadata::Metadata, + #[serde(default)] + pub configure_options: ConfigureOptions, +} + +/// Options which only influence how the configuration server updates the configuration +#[derive(Debug, Default, Deserialize, Serialize, JsonSchema)] +#[serde(rename_all = "camelCase")] +pub struct ConfigureOptions { /// Schemas which are excluded from introspection. The default setting will exclude the /// internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension. #[serde(default = "default_excluded_schemas")] pub excluded_schemas: Vec, + /// The mapping of comparison operator names to apply when updating the configuration + #[serde(default = "default_comparison_operator_mapping")] + pub comparison_operator_mapping: Vec, +} + +/// Define the names that comparison operators will be exposed as by the automatic introspection. +#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema)] +#[serde(rename_all = "camelCase")] +pub struct ComparisonOperatorMapping { + /// The name of the operator as defined by the database + pub operator_name: String, + /// The name the operator will appear under in the exposed API + pub exposed_name: String, +} + +/// The default comparison operator mappings apply the aliases that are used in graphql-engine v2. +fn default_comparison_operator_mapping() -> Vec { + vec![ + // Common mappings + ComparisonOperatorMapping { + operator_name: "=".to_string(), + exposed_name: "_eq".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "<=".to_string(), + exposed_name: "_lte".to_string(), + }, + ComparisonOperatorMapping { + operator_name: ">".to_string(), + exposed_name: "_gt".to_string(), + }, + ComparisonOperatorMapping { + operator_name: ">=".to_string(), + exposed_name: "_gte".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "<".to_string(), + exposed_name: "_lt".to_string(), + }, + // Preferred by CockroachDB + ComparisonOperatorMapping { + operator_name: "!=".to_string(), + exposed_name: "_neq".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "LIKE".to_string(), + exposed_name: "_like".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "NOT LIKE".to_string(), + exposed_name: "_nlike".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "ILIKE".to_string(), + exposed_name: "_ilike".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "NOT ILIKE".to_string(), + exposed_name: "_nilike".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "SIMILAR TO".to_string(), + exposed_name: "_similar".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "NOT SIMILAR TO".to_string(), + exposed_name: "_nsimilar".to_string(), + }, + // Preferred by Postgres + ComparisonOperatorMapping { + operator_name: "<>".to_string(), + exposed_name: "_neq".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "~~".to_string(), + exposed_name: "_like".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "!~~".to_string(), + exposed_name: "_nlike".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "~~*".to_string(), + exposed_name: "_ilike".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "!~~*".to_string(), + exposed_name: "_nilike".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "~".to_string(), + exposed_name: "_regex".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "!~".to_string(), + exposed_name: "_nregex".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "~*".to_string(), + exposed_name: "_iregex".to_string(), + }, + ComparisonOperatorMapping { + operator_name: "!~*".to_string(), + exposed_name: "_niregex".to_string(), + }, + ] } fn default_excluded_schemas() -> Vec { @@ -101,7 +215,10 @@ impl RawConfiguration { connection_uri: ConnectionUri::Uri(ResolvedSecret("".to_string())), pool_settings: PoolSettings::default(), metadata: metadata::Metadata::default(), - excluded_schemas: default_excluded_schemas(), + configure_options: ConfigureOptions { + excluded_schemas: default_excluded_schemas(), + comparison_operator_mapping: default_comparison_operator_mapping(), + }, } } } @@ -199,7 +316,12 @@ pub async fn configure( .await .map_err(|e| connector::UpdateConfigurationError::Other(e.into()))?; - let query = sqlx::query(configuration_query).bind(args.excluded_schemas.clone()); + let query = sqlx::query(configuration_query) + .bind(args.configure_options.excluded_schemas.clone()) + .bind( + serde_json::to_value(args.configure_options.comparison_operator_mapping.clone()) + .map_err(|e| connector::UpdateConfigurationError::Other(e.into()))?, + ); let row = connection .fetch_one(query) @@ -207,23 +329,35 @@ pub async fn configure( .await .map_err(|e| connector::UpdateConfigurationError::Other(e.into()))?; - let (tables, aggregate_functions) = async { + let (tables, aggregate_functions, comparison_operators) = async { let tables: metadata::TablesInfo = serde_json::from_value(row.get(0)) .map_err(|e| connector::UpdateConfigurationError::Other(e.into()))?; let aggregate_functions: metadata::AggregateFunctions = serde_json::from_value(row.get(1)) .map_err(|e| connector::UpdateConfigurationError::Other(e.into()))?; + let comparison_operators: metadata::ComparisonOperators = + serde_json::from_value(row.get(2)) + .map_err(|e| connector::UpdateConfigurationError::Other(e.into()))?; + // We need to specify the concrete return type explicitly so that rustc knows that it can // be sent across an async boundary. // (last verified with rustc 1.72.1) - Ok::<_, connector::UpdateConfigurationError>((tables, aggregate_functions)) + Ok::<_, connector::UpdateConfigurationError>(( + tables, + aggregate_functions, + comparison_operators, + )) } .instrument(info_span!("Decode introspection result")) .await?; - let scalar_types = - occurring_scalar_types(&tables, &args.metadata.native_queries, &aggregate_functions); + let scalar_types = occurring_scalar_types(&tables, &args.metadata.native_queries); + + let relevant_comparison_operators = + filter_comparison_operators(&scalar_types, comparison_operators); + let relevant_aggregate_functions = + filter_aggregate_functions(&scalar_types, aggregate_functions); Ok(RawConfiguration { version: 1, @@ -232,19 +366,60 @@ pub async fn configure( metadata: metadata::Metadata { tables, native_queries: args.metadata.native_queries, - aggregate_functions, - comparison_operators: dream_up_comparison_operators(scalar_types), + aggregate_functions: relevant_aggregate_functions, + comparison_operators: relevant_comparison_operators, }, - excluded_schemas: args.excluded_schemas, + configure_options: args.configure_options, }) } +fn filter_comparison_operators( + scalar_types: &BTreeSet, + comparison_operators: metadata::ComparisonOperators, +) -> metadata::ComparisonOperators { + metadata::ComparisonOperators( + comparison_operators + .0 + .into_iter() + .filter(|(typ, _)| scalar_types.contains(typ)) + .map(|(typ, ops)| { + ( + typ, + ops.into_iter() + .filter(|(_, op)| scalar_types.contains(&op.argument_type)) + .collect(), + ) + }) + .collect(), + ) +} + +fn filter_aggregate_functions( + scalar_types: &BTreeSet, + aggregate_functions: metadata::AggregateFunctions, +) -> metadata::AggregateFunctions { + metadata::AggregateFunctions( + aggregate_functions + .0 + .into_iter() + .filter(|(typ, _)| scalar_types.contains(typ)) + .map(|(typ, ops)| { + ( + typ, + ops.into_iter() + .filter(|(_, op)| scalar_types.contains(&op.return_type)) + .collect(), + ) + }) + .collect(), + ) +} + /// Collect all the types that can occur in the metadata. This is a bit circumstantial. A better /// approach is likely to record scalar type names directly in the metadata via configuration.sql. pub fn occurring_scalar_types( tables: &metadata::TablesInfo, native_queries: &metadata::NativeQueries, - aggregate_functions: &metadata::AggregateFunctions, ) -> BTreeSet { let tables_column_types = tables .0 @@ -261,166 +436,8 @@ pub fn occurring_scalar_types( .values() .flat_map(|v| v.arguments.values().map(|c| c.r#type.clone())); - let aggregate_types = aggregate_functions.0.keys().cloned(); - tables_column_types .chain(native_queries_column_types) .chain(native_queries_arguments_types) - .chain(aggregate_types) .collect::>() } - -// Until we have full introspection of operators we just dream up the same that we used to. -fn dream_up_comparison_operators( - scalar_types: BTreeSet, -) -> metadata::ComparisonOperators { - let fn_operators_supported_by_all_types = - |scalar_type: metadata::ScalarType| -> BTreeMap { - BTreeMap::from([ - ( - "_eq".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "=".to_string(), - }, - ), - ( - "_neq".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "!=".to_string(), - }, - ), - ( - "_lt".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "<".to_string(), - }, - ), - ( - "_lte".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "<=".to_string(), - }, - ), - ( - "_gt".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: ">".to_string(), - }, - ), - ( - "_gte".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: ">=".to_string(), - }, - ), - ]) - }; - let fn_string_operators = - |scalar_type: metadata::ScalarType| -> BTreeMap { - BTreeMap::from([ - ( - "_like".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "LIKE".to_string(), - }, - ), - ( - "_nlike".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "NOT LIKE".to_string(), - }, - ), - ( - "_ilike".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "ILIKE".to_string(), - }, - ), - ( - "_nilike".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "NOT ILIKE".to_string(), - }, - ), - /* - * SIMILAR TO does not seem to have its own defined operator/proc in postgres. - * Rather, it looks like 'haystack SIMILAR TO needle ESCAPE esc an alias of - * 'haystack ~ similar_to_escape(needle, esc)'. - * - */ - ( - "_similar".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "SIMILAR TO".to_string(), - }, - ), - ( - "_nsimilar".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "NOT SIMILAR TO".to_string(), - }, - ), - ( - "_regex".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "~".to_string(), - }, - ), - ( - "_nregex".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "!~".to_string(), - }, - ), - ( - "_iregex".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "~*".to_string(), - }, - ), - ( - "_niregex".to_string(), - metadata::ComparisonOperator { - argument_type: scalar_type.clone(), - operator_name: "!~*".to_string(), - }, - ), - ]) - }; - - let operators = scalar_types - .iter() - .map(|scalar_type| { - let str_ops = match scalar_type.0.as_str() { - "varchar" | "text" => fn_string_operators(scalar_type.clone()), - _ => BTreeMap::default(), - }; - - let common_ops = fn_operators_supported_by_all_types(scalar_type.clone()); - - let chained = str_ops.into_iter().chain(common_ops); - - ( - scalar_type.clone(), - chained.collect::>(), - ) - }) - .collect(); - - metadata::ComparisonOperators(operators) -} diff --git a/crates/connectors/ndc-postgres/src/schema.rs b/crates/connectors/ndc-postgres/src/schema.rs index bc26b2012..57e11d1e5 100644 --- a/crates/connectors/ndc-postgres/src/schema.rs +++ b/crates/connectors/ndc-postgres/src/schema.rs @@ -19,55 +19,52 @@ pub async fn get_schema( configuration::Configuration { config, .. }: &configuration::Configuration, ) -> Result { let configuration::RawConfiguration { metadata, .. } = config; - let scalar_types: BTreeMap = configuration::occurring_scalar_types( - &metadata.tables, - &metadata.native_queries, - &metadata.aggregate_functions, - ) - .iter() - .map(|scalar_type| { - ( - scalar_type.0.clone(), - models::ScalarType { - aggregate_functions: metadata - .aggregate_functions - .0 - .get(scalar_type) - .unwrap_or(&BTreeMap::new()) - .iter() - .map(|(function_name, function_definition)| { - ( - function_name.clone(), - models::AggregateFunctionDefinition { - result_type: models::Type::Named { - name: function_definition.return_type.0.clone(), - }, - }, - ) - }) - .collect(), - comparison_operators: metadata - .comparison_operators - .0 - .get(scalar_type) - .unwrap_or(&BTreeMap::new()) - .iter() - .map(|(op_name, op_def)| { - ( - op_name.clone(), - models::ComparisonOperatorDefinition { - argument_type: models::Type::Named { - name: op_def.argument_type.0.clone(), - }, - }, - ) - }) - .collect(), - update_operators: BTreeMap::new(), - }, - ) - }) - .collect(); + let scalar_types: BTreeMap = + configuration::occurring_scalar_types(&metadata.tables, &metadata.native_queries) + .iter() + .map(|scalar_type| { + ( + scalar_type.0.clone(), + models::ScalarType { + aggregate_functions: metadata + .aggregate_functions + .0 + .get(scalar_type) + .unwrap_or(&BTreeMap::new()) + .iter() + .map(|(function_name, function_definition)| { + ( + function_name.clone(), + models::AggregateFunctionDefinition { + result_type: models::Type::Named { + name: function_definition.return_type.0.clone(), + }, + }, + ) + }) + .collect(), + comparison_operators: metadata + .comparison_operators + .0 + .get(scalar_type) + .unwrap_or(&BTreeMap::new()) + .iter() + .map(|(op_name, op_def)| { + ( + op_name.clone(), + models::ComparisonOperatorDefinition { + argument_type: models::Type::Named { + name: op_def.argument_type.0.clone(), + }, + }, + ) + }) + .collect(), + update_operators: BTreeMap::new(), + }, + ) + }) + .collect(); let tables: Vec = metadata .tables diff --git a/crates/connectors/ndc-postgres/tests/query_tests.rs b/crates/connectors/ndc-postgres/tests/query_tests.rs index ff8298994..7a0fdcb20 100644 --- a/crates/connectors/ndc-postgres/tests/query_tests.rs +++ b/crates/connectors/ndc-postgres/tests/query_tests.rs @@ -122,18 +122,6 @@ mod predicates { insta::assert_json_snapshot!(result); } - #[tokio::test] - async fn select_where_name_similar() { - let result = run_query(create_router().await, "select_where_name_similar").await; - insta::assert_json_snapshot!(result); - } - - #[tokio::test] - async fn select_where_name_nsimilar() { - let result = run_query(create_router().await, "select_where_name_nsimilar").await; - insta::assert_json_snapshot!(result); - } - #[tokio::test] async fn select_where_name_regex() { let result = run_query(create_router().await, "select_where_name_regex").await; diff --git a/crates/connectors/ndc-postgres/tests/snapshots/configuration_tests__get_configuration_schema.snap b/crates/connectors/ndc-postgres/tests/snapshots/configuration_tests__get_configuration_schema.snap index 440b8dc88..a06f0e8e8 100644 --- a/crates/connectors/ndc-postgres/tests/snapshots/configuration_tests__get_configuration_schema.snap +++ b/crates/connectors/ndc-postgres/tests/snapshots/configuration_tests__get_configuration_schema.snap @@ -48,20 +48,16 @@ expression: schema } ] }, - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } + "configureOptions": { + "default": { + "excludedSchemas": [], + "comparisonOperatorMapping": [] + }, + "allOf": [ + { + "$ref": "#/definitions/ConfigureOptions" + } + ] } } }, @@ -392,6 +388,138 @@ expression: schema "$ref": "#/definitions/ScalarType" } } + }, + "ConfigureOptions": { + "description": "Options which only influence how the configuration server updates the configuration", + "type": "object", + "properties": { + "excludedSchemas": { + "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", + "default": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "comparisonOperatorMapping": { + "description": "The mapping of comparison operator names to apply when updating the configuration", + "default": [ + { + "operatorName": "=", + "exposedName": "_eq" + }, + { + "operatorName": "<=", + "exposedName": "_lte" + }, + { + "operatorName": ">", + "exposedName": "_gt" + }, + { + "operatorName": ">=", + "exposedName": "_gte" + }, + { + "operatorName": "<", + "exposedName": "_lt" + }, + { + "operatorName": "!=", + "exposedName": "_neq" + }, + { + "operatorName": "LIKE", + "exposedName": "_like" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar" + }, + { + "operatorName": "<>", + "exposedName": "_neq" + }, + { + "operatorName": "~~", + "exposedName": "_like" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike" + }, + { + "operatorName": "~", + "exposedName": "_regex" + }, + { + "operatorName": "!~", + "exposedName": "_nregex" + }, + { + "operatorName": "~*", + "exposedName": "_iregex" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex" + } + ], + "type": "array", + "items": { + "$ref": "#/definitions/ComparisonOperatorMapping" + } + } + } + }, + "ComparisonOperatorMapping": { + "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", + "type": "object", + "required": [ + "exposedName", + "operatorName" + ], + "properties": { + "operatorName": { + "description": "The name of the operator as defined by the database", + "type": "string" + }, + "exposedName": { + "description": "The name the operator will appear under in the exposed API", + "type": "string" + } + } } } } diff --git a/crates/connectors/ndc-postgres/tests/snapshots/configuration_tests__get_rawconfiguration_schema.snap b/crates/connectors/ndc-postgres/tests/snapshots/configuration_tests__get_rawconfiguration_schema.snap index 2d801134e..a3a0bb3e2 100644 --- a/crates/connectors/ndc-postgres/tests/snapshots/configuration_tests__get_rawconfiguration_schema.snap +++ b/crates/connectors/ndc-postgres/tests/snapshots/configuration_tests__get_rawconfiguration_schema.snap @@ -36,20 +36,16 @@ expression: schema } ] }, - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } + "configureOptions": { + "default": { + "excludedSchemas": [], + "comparisonOperatorMapping": [] + }, + "allOf": [ + { + "$ref": "#/definitions/ConfigureOptions" + } + ] } }, "definitions": { @@ -380,6 +376,138 @@ expression: schema "$ref": "#/definitions/ScalarType" } } + }, + "ConfigureOptions": { + "description": "Options which only influence how the configuration server updates the configuration", + "type": "object", + "properties": { + "excludedSchemas": { + "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", + "default": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "comparisonOperatorMapping": { + "description": "The mapping of comparison operator names to apply when updating the configuration", + "default": [ + { + "operatorName": "=", + "exposedName": "_eq" + }, + { + "operatorName": "<=", + "exposedName": "_lte" + }, + { + "operatorName": ">", + "exposedName": "_gt" + }, + { + "operatorName": ">=", + "exposedName": "_gte" + }, + { + "operatorName": "<", + "exposedName": "_lt" + }, + { + "operatorName": "!=", + "exposedName": "_neq" + }, + { + "operatorName": "LIKE", + "exposedName": "_like" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar" + }, + { + "operatorName": "<>", + "exposedName": "_neq" + }, + { + "operatorName": "~~", + "exposedName": "_like" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike" + }, + { + "operatorName": "~", + "exposedName": "_regex" + }, + { + "operatorName": "!~", + "exposedName": "_nregex" + }, + { + "operatorName": "~*", + "exposedName": "_iregex" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex" + } + ], + "type": "array", + "items": { + "$ref": "#/definitions/ComparisonOperatorMapping" + } + } + } + }, + "ComparisonOperatorMapping": { + "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", + "type": "object", + "required": [ + "exposedName", + "operatorName" + ], + "properties": { + "operatorName": { + "description": "The name of the operator as defined by the database", + "type": "string" + }, + "exposedName": { + "description": "The name the operator will appear under in the exposed API", + "type": "string" + } + } } } } diff --git a/crates/connectors/ndc-postgres/tests/snapshots/explain_tests__select_where_name_nilike.snap b/crates/connectors/ndc-postgres/tests/snapshots/explain_tests__select_where_name_nilike.snap index c4904423a..996654851 100644 --- a/crates/connectors/ndc-postgres/tests/snapshots/explain_tests__select_where_name_nilike.snap +++ b/crates/connectors/ndc-postgres/tests/snapshots/explain_tests__select_where_name_nilike.snap @@ -20,7 +20,7 @@ FROM FROM "public"."Album" AS "%0_Album" WHERE - ("%0_Album"."Title" NOT ILIKE cast($1 as varchar)) + ("%0_Album"."Title" !~~* cast($1 as varchar)) ORDER BY "%0_Album"."AlbumId" ASC LIMIT diff --git a/crates/connectors/ndc-postgres/tests/snapshots/explain_tests__select_where_variable.snap b/crates/connectors/ndc-postgres/tests/snapshots/explain_tests__select_where_variable.snap index 64ece6681..1716dfae8 100644 --- a/crates/connectors/ndc-postgres/tests/snapshots/explain_tests__select_where_variable.snap +++ b/crates/connectors/ndc-postgres/tests/snapshots/explain_tests__select_where_variable.snap @@ -20,7 +20,7 @@ FROM FROM "public"."Album" AS "%0_Album" WHERE - ("%0_Album"."Title" LIKE $1) + ("%0_Album"."Title" ~~ $1) ORDER BY "%0_Album"."AlbumId" ASC ) AS "%2_rows" diff --git a/crates/connectors/ndc-postgres/tests/snapshots/query_tests__predicates__select_where_name_nsimilar.snap b/crates/connectors/ndc-postgres/tests/snapshots/query_tests__predicates__select_where_name_nsimilar.snap deleted file mode 100644 index d60af5b3f..000000000 --- a/crates/connectors/ndc-postgres/tests/snapshots/query_tests__predicates__select_where_name_nsimilar.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: crates/connectors/ndc-postgres/tests/query_tests.rs -expression: result ---- -[ - { - "rows": [ - { - "AlbumId": 1, - "Title": "For Those About To Rock We Salute You" - }, - { - "AlbumId": 4, - "Title": "Let There Be Rock" - }, - { - "AlbumId": 6, - "Title": "Jagged Little Pill" - }, - { - "AlbumId": 7, - "Title": "Facelift" - }, - { - "AlbumId": 8, - "Title": "Warner 25 Anos" - } - ] - } -] diff --git a/crates/connectors/ndc-postgres/tests/snapshots/query_tests__predicates__select_where_name_similar.snap b/crates/connectors/ndc-postgres/tests/snapshots/query_tests__predicates__select_where_name_similar.snap deleted file mode 100644 index 30ac0c032..000000000 --- a/crates/connectors/ndc-postgres/tests/snapshots/query_tests__predicates__select_where_name_similar.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: crates/connectors/ndc-postgres/tests/query_tests.rs -expression: result ---- -[ - { - "rows": [ - { - "AlbumId": 2, - "Title": "Balls to the Wall" - }, - { - "AlbumId": 3, - "Title": "Restless and Wild" - }, - { - "AlbumId": 5, - "Title": "Big Ones" - }, - { - "AlbumId": 12, - "Title": "BackBeat Soundtrack" - }, - { - "AlbumId": 16, - "Title": "Black Sabbath" - } - ] - } -] diff --git a/crates/connectors/ndc-postgres/tests/snapshots/schema_tests__get_schema.snap b/crates/connectors/ndc-postgres/tests/snapshots/schema_tests__get_schema.snap index df26a9c01..3a72c0fd1 100644 --- a/crates/connectors/ndc-postgres/tests/snapshots/schema_tests__get_schema.snap +++ b/crates/connectors/ndc-postgres/tests/snapshots/schema_tests__get_schema.snap @@ -4,67 +4,6 @@ expression: result --- { "scalar_types": { - "bit": { - "aggregate_functions": { - "bit_and": { - "result_type": { - "type": "named", - "name": "bit" - } - }, - "bit_or": { - "result_type": { - "type": "named", - "name": "bit" - } - }, - "bit_xor": { - "result_type": { - "type": "named", - "name": "bit" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "bit" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "bit" - } - } - }, - "update_operators": {} - }, "bool": { "aggregate_functions": { "bool_and": { @@ -126,95 +65,88 @@ expression: result }, "update_operators": {} }, - "bpchar": { - "aggregate_functions": { - "max": { - "result_type": { + "char": { + "aggregate_functions": {}, + "comparison_operators": { + "_eq": { + "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "min": { - "result_type": { + "_gt": { + "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } - } - }, - "comparison_operators": { - "_eq": { + }, + "_gte": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_gt": { + "_ilike": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_gte": { + "_iregex": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_lt": { + "_like": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_lte": { + "_lt": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } }, - "_neq": { + "_lte": { "argument_type": { "type": "named", - "name": "bpchar" + "name": "char" } - } - }, - "update_operators": {} - }, - "char": { - "aggregate_functions": {}, - "comparison_operators": { - "_eq": { + }, + "_neq": { "argument_type": { "type": "named", "name": "char" } }, - "_gt": { + "_nilike": { "argument_type": { "type": "named", "name": "char" } }, - "_gte": { + "_niregex": { "argument_type": { "type": "named", "name": "char" } }, - "_lt": { + "_nlike": { "argument_type": { "type": "named", "name": "char" } }, - "_lte": { + "_nregex": { "argument_type": { "type": "named", "name": "char" } }, - "_neq": { + "_regex": { "argument_type": { "type": "named", "name": "char" @@ -484,158 +416,6 @@ expression: result }, "update_operators": {} }, - "geometry": { - "aggregate_functions": { - "st_3dextent": { - "result_type": { - "type": "named", - "name": "box3d" - } - }, - "st_collect": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_coverageunion": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_extent": { - "result_type": { - "type": "named", - "name": "box2d" - } - }, - "st_makeline": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_memcollect": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_memunion": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_polygonize": { - "result_type": { - "type": "named", - "name": "geometry" - } - }, - "st_union": { - "result_type": { - "type": "named", - "name": "geometry" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "geometry" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "geometry" - } - } - }, - "update_operators": {} - }, - "inet": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "inet" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "inet" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "inet" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "inet" - } - } - }, - "update_operators": {} - }, "int2": { "aggregate_functions": { "avg": { @@ -999,168 +779,88 @@ expression: result }, "update_operators": {} }, - "interval": { - "aggregate_functions": { - "avg": { - "result_type": { - "type": "named", - "name": "interval" - } - }, - "max": { - "result_type": { - "type": "named", - "name": "interval" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "interval" - } - }, - "sum": { - "result_type": { - "type": "named", - "name": "interval" - } - } - }, + "name": { + "aggregate_functions": {}, "comparison_operators": { "_eq": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, "_gt": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, "_gte": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "_lt": { + "_ilike": { "argument_type": { "type": "named", - "name": "interval" + "name": "name" } }, - "_lte": { - "argument_type": { - "type": "named", - "name": "interval" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "interval" - } - } - }, - "update_operators": {} - }, - "money": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "money" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "money" - } - }, - "sum": { - "result_type": { - "type": "named", - "name": "money" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "money" - } - }, - "_gt": { + "_iregex": { "argument_type": { "type": "named", - "name": "money" + "name": "name" } }, - "_gte": { + "_like": { "argument_type": { "type": "named", - "name": "money" + "name": "name" } }, "_lt": { "argument_type": { "type": "named", - "name": "money" + "name": "name" } }, "_lte": { "argument_type": { "type": "named", - "name": "money" + "name": "name" } }, "_neq": { - "argument_type": { - "type": "named", - "name": "money" - } - } - }, - "update_operators": {} - }, - "name": { - "aggregate_functions": {}, - "comparison_operators": { - "_eq": { "argument_type": { "type": "named", "name": "name" } }, - "_gt": { + "_nilike": { "argument_type": { "type": "named", "name": "name" } }, - "_gte": { + "_niregex": { "argument_type": { "type": "named", "name": "name" } }, - "_lt": { + "_nlike": { "argument_type": { "type": "named", "name": "name" } }, - "_lte": { + "_nregex": { "argument_type": { "type": "named", "name": "name" } }, - "_neq": { + "_regex": { "argument_type": { "type": "named", "name": "name" @@ -1272,116 +972,6 @@ expression: result }, "update_operators": {} }, - "oid": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "oid" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "oid" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "oid" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "oid" - } - } - }, - "update_operators": {} - }, - "pg_lsn": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "pg_lsn" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "pg_lsn" - } - } - }, - "update_operators": {} - }, "text": { "aggregate_functions": { "max": { @@ -1476,78 +1066,11 @@ expression: result "name": "text" } }, - "_nsimilar": { - "argument_type": { - "type": "named", - "name": "text" - } - }, "_regex": { "argument_type": { "type": "named", "name": "text" } - }, - "_similar": { - "argument_type": { - "type": "named", - "name": "text" - } - } - }, - "update_operators": {} - }, - "tid": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "tid" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "tid" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "tid" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "tid" - } } }, "update_operators": {} @@ -1772,55 +1295,6 @@ expression: result }, "update_operators": {} }, - "topoelement": { - "aggregate_functions": { - "topoelementarray_agg": { - "result_type": { - "type": "named", - "name": "topoelementarray" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "topoelement" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "topoelement" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "topoelement" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "topoelement" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "topoelement" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "topoelement" - } - } - }, - "update_operators": {} - }, "uuid": { "aggregate_functions": {}, "comparison_operators": { @@ -1944,127 +1418,11 @@ expression: result "name": "varchar" } }, - "_nsimilar": { - "argument_type": { - "type": "named", - "name": "varchar" - } - }, "_regex": { "argument_type": { "type": "named", "name": "varchar" } - }, - "_similar": { - "argument_type": { - "type": "named", - "name": "varchar" - } - } - }, - "update_operators": {} - }, - "xid8": { - "aggregate_functions": { - "max": { - "result_type": { - "type": "named", - "name": "xid8" - } - }, - "min": { - "result_type": { - "type": "named", - "name": "xid8" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "xid8" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "xid8" - } - } - }, - "update_operators": {} - }, - "xml": { - "aggregate_functions": { - "xmlagg": { - "result_type": { - "type": "named", - "name": "xml" - } - } - }, - "comparison_operators": { - "_eq": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_gt": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_gte": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_lt": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_lte": { - "argument_type": { - "type": "named", - "name": "xml" - } - }, - "_neq": { - "argument_type": { - "type": "named", - "name": "xml" - } } }, "update_operators": {} diff --git a/crates/documentation/openapi/src/snapshots/openapi_generator__tests__main.snap b/crates/documentation/openapi/src/snapshots/openapi_generator__tests__main.snap index 7ee86093b..559ada97b 100644 --- a/crates/documentation/openapi/src/snapshots/openapi_generator__tests__main.snap +++ b/crates/documentation/openapi/src/snapshots/openapi_generator__tests__main.snap @@ -36,20 +36,16 @@ expression: generated_schema } ] }, - "excludedSchemas": { - "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", - "default": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ], - "type": "array", - "items": { - "type": "string" - } + "configureOptions": { + "default": { + "excludedSchemas": [], + "comparisonOperatorMapping": [] + }, + "allOf": [ + { + "$ref": "#/components/schemas/ConfigureOptions" + } + ] } }, "definitions": { @@ -370,6 +366,138 @@ expression: generated_schema "$ref": "#/components/schemas/ScalarType" } } + }, + "ConfigureOptions": { + "description": "Options which only influence how the configuration server updates the configuration", + "type": "object", + "properties": { + "excludedSchemas": { + "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", + "default": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "comparisonOperatorMapping": { + "description": "The mapping of comparison operator names to apply when updating the configuration", + "default": [ + { + "operatorName": "=", + "exposedName": "_eq" + }, + { + "operatorName": "<=", + "exposedName": "_lte" + }, + { + "operatorName": ">", + "exposedName": "_gt" + }, + { + "operatorName": ">=", + "exposedName": "_gte" + }, + { + "operatorName": "<", + "exposedName": "_lt" + }, + { + "operatorName": "!=", + "exposedName": "_neq" + }, + { + "operatorName": "LIKE", + "exposedName": "_like" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar" + }, + { + "operatorName": "<>", + "exposedName": "_neq" + }, + { + "operatorName": "~~", + "exposedName": "_like" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike" + }, + { + "operatorName": "~", + "exposedName": "_regex" + }, + { + "operatorName": "!~", + "exposedName": "_nregex" + }, + { + "operatorName": "~*", + "exposedName": "_iregex" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ComparisonOperatorMapping" + } + } + } + }, + "ComparisonOperatorMapping": { + "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", + "type": "object", + "required": [ + "exposedName", + "operatorName" + ], + "properties": { + "operatorName": { + "description": "The name of the operator as defined by the database", + "type": "string" + }, + "exposedName": { + "description": "The name the operator will appear under in the exposed API", + "type": "string" + } + } } } } diff --git a/crates/tests/other-db-tests/src/aurora/query_tests.rs b/crates/tests/other-db-tests/src/aurora/query_tests.rs index 328f40ab8..5b8c09aeb 100644 --- a/crates/tests/other-db-tests/src/aurora/query_tests.rs +++ b/crates/tests/other-db-tests/src/aurora/query_tests.rs @@ -107,18 +107,6 @@ mod predicates { insta::assert_json_snapshot!(result); } - #[tokio::test] - async fn select_where_name_similar() { - let result = run_query(create_router().await, "select_where_name_similar").await; - insta::assert_json_snapshot!(result); - } - - #[tokio::test] - async fn select_where_name_nsimilar() { - let result = run_query(create_router().await, "select_where_name_nsimilar").await; - insta::assert_json_snapshot!(result); - } - #[tokio::test] async fn select_where_name_regex() { let result = run_query(create_router().await, "select_where_name_regex").await; diff --git a/crates/tests/other-db-tests/src/aurora/snapshots/other_db_tests__aurora__query_tests__predicates__select_where_name_nsimilar.snap b/crates/tests/other-db-tests/src/aurora/snapshots/other_db_tests__aurora__query_tests__predicates__select_where_name_nsimilar.snap deleted file mode 100644 index 4733f6d65..000000000 --- a/crates/tests/other-db-tests/src/aurora/snapshots/other_db_tests__aurora__query_tests__predicates__select_where_name_nsimilar.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: crates/other-db-tests/src/aurora/query_tests.rs -expression: result ---- -[ - { - "rows": [ - { - "AlbumId": 1, - "Title": "For Those About To Rock We Salute You" - }, - { - "AlbumId": 4, - "Title": "Let There Be Rock" - }, - { - "AlbumId": 6, - "Title": "Jagged Little Pill" - }, - { - "AlbumId": 7, - "Title": "Facelift" - }, - { - "AlbumId": 8, - "Title": "Warner 25 Anos" - } - ] - } -] diff --git a/crates/tests/other-db-tests/src/aurora/snapshots/other_db_tests__aurora__query_tests__predicates__select_where_name_similar.snap b/crates/tests/other-db-tests/src/aurora/snapshots/other_db_tests__aurora__query_tests__predicates__select_where_name_similar.snap deleted file mode 100644 index 7fb13765f..000000000 --- a/crates/tests/other-db-tests/src/aurora/snapshots/other_db_tests__aurora__query_tests__predicates__select_where_name_similar.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: crates/other-db-tests/src/aurora/query_tests.rs -expression: result ---- -[ - { - "rows": [ - { - "AlbumId": 2, - "Title": "Balls to the Wall" - }, - { - "AlbumId": 3, - "Title": "Restless and Wild" - }, - { - "AlbumId": 5, - "Title": "Big Ones" - }, - { - "AlbumId": 12, - "Title": "BackBeat Soundtrack" - }, - { - "AlbumId": 16, - "Title": "Black Sabbath" - } - ] - } -] diff --git a/crates/tests/other-db-tests/src/yugabyte/query_tests.rs b/crates/tests/other-db-tests/src/yugabyte/query_tests.rs index 328f40ab8..5b8c09aeb 100644 --- a/crates/tests/other-db-tests/src/yugabyte/query_tests.rs +++ b/crates/tests/other-db-tests/src/yugabyte/query_tests.rs @@ -107,18 +107,6 @@ mod predicates { insta::assert_json_snapshot!(result); } - #[tokio::test] - async fn select_where_name_similar() { - let result = run_query(create_router().await, "select_where_name_similar").await; - insta::assert_json_snapshot!(result); - } - - #[tokio::test] - async fn select_where_name_nsimilar() { - let result = run_query(create_router().await, "select_where_name_nsimilar").await; - insta::assert_json_snapshot!(result); - } - #[tokio::test] async fn select_where_name_regex() { let result = run_query(create_router().await, "select_where_name_regex").await; diff --git a/crates/tests/other-db-tests/src/yugabyte/snapshots/other_db_tests__yugabyte__query_tests__predicates__select_where_name_nsimilar.snap b/crates/tests/other-db-tests/src/yugabyte/snapshots/other_db_tests__yugabyte__query_tests__predicates__select_where_name_nsimilar.snap deleted file mode 100644 index 4733f6d65..000000000 --- a/crates/tests/other-db-tests/src/yugabyte/snapshots/other_db_tests__yugabyte__query_tests__predicates__select_where_name_nsimilar.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: crates/other-db-tests/src/aurora/query_tests.rs -expression: result ---- -[ - { - "rows": [ - { - "AlbumId": 1, - "Title": "For Those About To Rock We Salute You" - }, - { - "AlbumId": 4, - "Title": "Let There Be Rock" - }, - { - "AlbumId": 6, - "Title": "Jagged Little Pill" - }, - { - "AlbumId": 7, - "Title": "Facelift" - }, - { - "AlbumId": 8, - "Title": "Warner 25 Anos" - } - ] - } -] diff --git a/crates/tests/other-db-tests/src/yugabyte/snapshots/other_db_tests__yugabyte__query_tests__predicates__select_where_name_similar.snap b/crates/tests/other-db-tests/src/yugabyte/snapshots/other_db_tests__yugabyte__query_tests__predicates__select_where_name_similar.snap deleted file mode 100644 index 7fb13765f..000000000 --- a/crates/tests/other-db-tests/src/yugabyte/snapshots/other_db_tests__yugabyte__query_tests__predicates__select_where_name_similar.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: crates/other-db-tests/src/aurora/query_tests.rs -expression: result ---- -[ - { - "rows": [ - { - "AlbumId": 2, - "Title": "Balls to the Wall" - }, - { - "AlbumId": 3, - "Title": "Restless and Wild" - }, - { - "AlbumId": 5, - "Title": "Big Ones" - }, - { - "AlbumId": 12, - "Title": "BackBeat Soundtrack" - }, - { - "AlbumId": 16, - "Title": "Black Sabbath" - } - ] - } -] diff --git a/static/aurora/chinook-deployment-template.json b/static/aurora/chinook-deployment-template.json index 8ff6153a7..53651d5ee 100644 --- a/static/aurora/chinook-deployment-template.json +++ b/static/aurora/chinook-deployment-template.json @@ -876,17 +876,6 @@ } }, "aggregateFunctions": { - "bit": { - "bit_and": { - "returnType": "bit" - }, - "bit_or": { - "returnType": "bit" - }, - "bit_xor": { - "returnType": "bit" - } - }, "bool": { "bool_and": { "returnType": "bool" @@ -898,14 +887,6 @@ "returnType": "bool" } }, - "bpchar": { - "max": { - "returnType": "bpchar" - }, - "min": { - "returnType": "bpchar" - } - }, "date": { "max": { "returnType": "date" @@ -978,14 +959,6 @@ "returnType": "float8" } }, - "inet": { - "max": { - "returnType": "inet" - }, - "min": { - "returnType": "inet" - } - }, "int2": { "avg": { "returnType": "numeric" @@ -1109,31 +1082,6 @@ "returnType": "numeric" } }, - "interval": { - "avg": { - "returnType": "interval" - }, - "max": { - "returnType": "interval" - }, - "min": { - "returnType": "interval" - }, - "sum": { - "returnType": "interval" - } - }, - "money": { - "max": { - "returnType": "money" - }, - "min": { - "returnType": "money" - }, - "sum": { - "returnType": "money" - } - }, "numeric": { "avg": { "returnType": "numeric" @@ -1166,22 +1114,6 @@ "returnType": "numeric" } }, - "oid": { - "max": { - "returnType": "oid" - }, - "min": { - "returnType": "oid" - } - }, - "pg_lsn": { - "max": { - "returnType": "pg_lsn" - }, - "min": { - "returnType": "pg_lsn" - } - }, "text": { "max": { "returnType": "text" @@ -1190,14 +1122,6 @@ "returnType": "text" } }, - "tid": { - "max": { - "returnType": "tid" - }, - "min": { - "returnType": "tid" - } - }, "time": { "max": { "returnType": "time" @@ -1229,48 +1153,9 @@ "min": { "returnType": "timetz" } - }, - "xid8": { - "max": { - "returnType": "xid8" - }, - "min": { - "returnType": "xid8" - } - }, - "xml": { - "xmlagg": { - "returnType": "xml" - } } }, "comparisonOperators": { - "bit": { - "_eq": { - "operatorName": "=", - "argumentType": "bit" - }, - "_gt": { - "operatorName": ">", - "argumentType": "bit" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "bit" - }, - "_lt": { - "operatorName": "<", - "argumentType": "bit" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "bit" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "bit" - } - }, "bool": { "_eq": { "operatorName": "=", @@ -1293,59 +1178,65 @@ "argumentType": "bool" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "bool" } }, - "bpchar": { + "char": { "_eq": { "operatorName": "=", - "argumentType": "bpchar" + "argumentType": "char" }, "_gt": { "operatorName": ">", - "argumentType": "bpchar" + "argumentType": "char" }, "_gte": { "operatorName": ">=", - "argumentType": "bpchar" + "argumentType": "char" + }, + "_ilike": { + "operatorName": "~~*", + "argumentType": "char" + }, + "_iregex": { + "operatorName": "~*", + "argumentType": "char" + }, + "_like": { + "operatorName": "~~", + "argumentType": "char" }, "_lt": { "operatorName": "<", - "argumentType": "bpchar" + "argumentType": "char" }, "_lte": { "operatorName": "<=", - "argumentType": "bpchar" + "argumentType": "char" }, "_neq": { - "operatorName": "!=", - "argumentType": "bpchar" - } - }, - "char": { - "_eq": { - "operatorName": "=", + "operatorName": "<>", "argumentType": "char" }, - "_gt": { - "operatorName": ">", + "_nilike": { + "operatorName": "!~~*", "argumentType": "char" }, - "_gte": { - "operatorName": ">=", + "_niregex": { + "operatorName": "!~*", "argumentType": "char" }, - "_lt": { - "operatorName": "<", + "_nlike": { + "operatorName": "!~~", "argumentType": "char" }, - "_lte": { - "operatorName": "<=", + "_nregex": { + "operatorName": "!~", "argumentType": "char" }, - "_neq": { - "operatorName": "!=", + "_regex": { + "operatorName": "~", "argumentType": "char" } }, @@ -1371,7 +1262,7 @@ "argumentType": "date" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "date" } }, @@ -1397,7 +1288,7 @@ "argumentType": "float4" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "float4" } }, @@ -1423,36 +1314,10 @@ "argumentType": "float8" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "float8" } }, - "inet": { - "_eq": { - "operatorName": "=", - "argumentType": "inet" - }, - "_gt": { - "operatorName": ">", - "argumentType": "inet" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "inet" - }, - "_lt": { - "operatorName": "<", - "argumentType": "inet" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "inet" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "inet" - } - }, "int2": { "_eq": { "operatorName": "=", @@ -1475,7 +1340,7 @@ "argumentType": "int2" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int2" } }, @@ -1501,7 +1366,7 @@ "argumentType": "int4" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int4" } }, @@ -1527,62 +1392,10 @@ "argumentType": "int8" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int8" } }, - "interval": { - "_eq": { - "operatorName": "=", - "argumentType": "interval" - }, - "_gt": { - "operatorName": ">", - "argumentType": "interval" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "interval" - }, - "_lt": { - "operatorName": "<", - "argumentType": "interval" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "interval" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "interval" - } - }, - "money": { - "_eq": { - "operatorName": "=", - "argumentType": "money" - }, - "_gt": { - "operatorName": ">", - "argumentType": "money" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "money" - }, - "_lt": { - "operatorName": "<", - "argumentType": "money" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "money" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "money" - } - }, "numeric": { "_eq": { "operatorName": "=", @@ -1605,62 +1418,10 @@ "argumentType": "numeric" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "numeric" } }, - "oid": { - "_eq": { - "operatorName": "=", - "argumentType": "oid" - }, - "_gt": { - "operatorName": ">", - "argumentType": "oid" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "oid" - }, - "_lt": { - "operatorName": "<", - "argumentType": "oid" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "oid" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "oid" - } - }, - "pg_lsn": { - "_eq": { - "operatorName": "=", - "argumentType": "pg_lsn" - }, - "_gt": { - "operatorName": ">", - "argumentType": "pg_lsn" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "pg_lsn" - }, - "_lt": { - "operatorName": "<", - "argumentType": "pg_lsn" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "pg_lsn" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "pg_lsn" - } - }, "text": { "_eq": { "operatorName": "=", @@ -1675,7 +1436,7 @@ "argumentType": "text" }, "_ilike": { - "operatorName": "ILIKE", + "operatorName": "~~*", "argumentType": "text" }, "_iregex": { @@ -1683,7 +1444,7 @@ "argumentType": "text" }, "_like": { - "operatorName": "LIKE", + "operatorName": "~~", "argumentType": "text" }, "_lt": { @@ -1695,11 +1456,11 @@ "argumentType": "text" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "text" }, "_nilike": { - "operatorName": "NOT ILIKE", + "operatorName": "!~~*", "argumentType": "text" }, "_niregex": { @@ -1707,50 +1468,16 @@ "argumentType": "text" }, "_nlike": { - "operatorName": "NOT LIKE", + "operatorName": "!~~", "argumentType": "text" }, "_nregex": { "operatorName": "!~", "argumentType": "text" }, - "_nsimilar": { - "operatorName": "NOT SIMILAR TO", - "argumentType": "text" - }, "_regex": { "operatorName": "~", "argumentType": "text" - }, - "_similar": { - "operatorName": "SIMILAR TO", - "argumentType": "text" - } - }, - "tid": { - "_eq": { - "operatorName": "=", - "argumentType": "tid" - }, - "_gt": { - "operatorName": ">", - "argumentType": "tid" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "tid" - }, - "_lt": { - "operatorName": "<", - "argumentType": "tid" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "tid" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "tid" } }, "time": { @@ -1775,7 +1502,7 @@ "argumentType": "time" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "time" } }, @@ -1801,7 +1528,7 @@ "argumentType": "timestamp" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timestamp" } }, @@ -1827,7 +1554,7 @@ "argumentType": "timestamptz" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timestamptz" } }, @@ -1853,7 +1580,7 @@ "argumentType": "timetz" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timetz" } }, @@ -1879,7 +1606,7 @@ "argumentType": "uuid" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "uuid" } }, @@ -1897,7 +1624,7 @@ "argumentType": "varchar" }, "_ilike": { - "operatorName": "ILIKE", + "operatorName": "~~*", "argumentType": "varchar" }, "_iregex": { @@ -1905,7 +1632,7 @@ "argumentType": "varchar" }, "_like": { - "operatorName": "LIKE", + "operatorName": "~~", "argumentType": "varchar" }, "_lt": { @@ -1917,11 +1644,11 @@ "argumentType": "varchar" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "varchar" }, "_nilike": { - "operatorName": "NOT ILIKE", + "operatorName": "!~~*", "argumentType": "varchar" }, "_niregex": { @@ -1929,86 +1656,114 @@ "argumentType": "varchar" }, "_nlike": { - "operatorName": "NOT LIKE", + "operatorName": "!~~", "argumentType": "varchar" }, "_nregex": { "operatorName": "!~", "argumentType": "varchar" }, - "_nsimilar": { - "operatorName": "NOT SIMILAR TO", - "argumentType": "varchar" - }, "_regex": { "operatorName": "~", "argumentType": "varchar" - }, - "_similar": { - "operatorName": "SIMILAR TO", - "argumentType": "varchar" - } - }, - "xid8": { - "_eq": { - "operatorName": "=", - "argumentType": "xid8" - }, - "_gt": { - "operatorName": ">", - "argumentType": "xid8" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "xid8" - }, - "_lt": { - "operatorName": "<", - "argumentType": "xid8" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "xid8" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "xid8" - } - }, - "xml": { - "_eq": { - "operatorName": "=", - "argumentType": "xml" - }, - "_gt": { - "operatorName": ">", - "argumentType": "xml" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "xml" - }, - "_lt": { - "operatorName": "<", - "argumentType": "xml" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "xml" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "xml" } } } }, - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ] + "configureOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq" + }, + { + "operatorName": "<=", + "exposedName": "_lte" + }, + { + "operatorName": ">", + "exposedName": "_gt" + }, + { + "operatorName": ">=", + "exposedName": "_gte" + }, + { + "operatorName": "<", + "exposedName": "_lt" + }, + { + "operatorName": "!=", + "exposedName": "_neq" + }, + { + "operatorName": "LIKE", + "exposedName": "_like" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar" + }, + { + "operatorName": "<>", + "exposedName": "_neq" + }, + { + "operatorName": "~~", + "exposedName": "_like" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike" + }, + { + "operatorName": "~", + "exposedName": "_regex" + }, + { + "operatorName": "!~", + "exposedName": "_nregex" + }, + { + "operatorName": "~*", + "exposedName": "_iregex" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex" + } + ] + } } diff --git a/static/chinook-deployment.json b/static/chinook-deployment.json index ac7d9f9d8..b24e3ec16 100644 --- a/static/chinook-deployment.json +++ b/static/chinook-deployment.json @@ -1126,17 +1126,6 @@ } }, "aggregateFunctions": { - "bit": { - "bit_and": { - "returnType": "bit" - }, - "bit_or": { - "returnType": "bit" - }, - "bit_xor": { - "returnType": "bit" - } - }, "bool": { "bool_and": { "returnType": "bool" @@ -1148,14 +1137,6 @@ "returnType": "bool" } }, - "bpchar": { - "max": { - "returnType": "bpchar" - }, - "min": { - "returnType": "bpchar" - } - }, "date": { "max": { "returnType": "date" @@ -1228,43 +1209,6 @@ "returnType": "float8" } }, - "geometry": { - "st_3dextent": { - "returnType": "box3d" - }, - "st_collect": { - "returnType": "geometry" - }, - "st_coverageunion": { - "returnType": "geometry" - }, - "st_extent": { - "returnType": "box2d" - }, - "st_makeline": { - "returnType": "geometry" - }, - "st_memcollect": { - "returnType": "geometry" - }, - "st_memunion": { - "returnType": "geometry" - }, - "st_polygonize": { - "returnType": "geometry" - }, - "st_union": { - "returnType": "geometry" - } - }, - "inet": { - "max": { - "returnType": "inet" - }, - "min": { - "returnType": "inet" - } - }, "int2": { "avg": { "returnType": "numeric" @@ -1388,31 +1332,6 @@ "returnType": "numeric" } }, - "interval": { - "avg": { - "returnType": "interval" - }, - "max": { - "returnType": "interval" - }, - "min": { - "returnType": "interval" - }, - "sum": { - "returnType": "interval" - } - }, - "money": { - "max": { - "returnType": "money" - }, - "min": { - "returnType": "money" - }, - "sum": { - "returnType": "money" - } - }, "numeric": { "avg": { "returnType": "numeric" @@ -1445,22 +1364,6 @@ "returnType": "numeric" } }, - "oid": { - "max": { - "returnType": "oid" - }, - "min": { - "returnType": "oid" - } - }, - "pg_lsn": { - "max": { - "returnType": "pg_lsn" - }, - "min": { - "returnType": "pg_lsn" - } - }, "text": { "max": { "returnType": "text" @@ -1469,14 +1372,6 @@ "returnType": "text" } }, - "tid": { - "max": { - "returnType": "tid" - }, - "min": { - "returnType": "tid" - } - }, "time": { "max": { "returnType": "time" @@ -1508,53 +1403,9 @@ "min": { "returnType": "timetz" } - }, - "topoelement": { - "topoelementarray_agg": { - "returnType": "topoelementarray" - } - }, - "xid8": { - "max": { - "returnType": "xid8" - }, - "min": { - "returnType": "xid8" - } - }, - "xml": { - "xmlagg": { - "returnType": "xml" - } } }, "comparisonOperators": { - "bit": { - "_eq": { - "operatorName": "=", - "argumentType": "bit" - }, - "_gt": { - "operatorName": ">", - "argumentType": "bit" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "bit" - }, - "_lt": { - "operatorName": "<", - "argumentType": "bit" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "bit" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "bit" - } - }, "bool": { "_eq": { "operatorName": "=", @@ -1577,59 +1428,65 @@ "argumentType": "bool" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "bool" } }, - "bpchar": { + "char": { "_eq": { "operatorName": "=", - "argumentType": "bpchar" + "argumentType": "char" }, "_gt": { "operatorName": ">", - "argumentType": "bpchar" + "argumentType": "char" }, "_gte": { "operatorName": ">=", - "argumentType": "bpchar" + "argumentType": "char" + }, + "_ilike": { + "operatorName": "~~*", + "argumentType": "char" + }, + "_iregex": { + "operatorName": "~*", + "argumentType": "char" + }, + "_like": { + "operatorName": "~~", + "argumentType": "char" }, "_lt": { "operatorName": "<", - "argumentType": "bpchar" + "argumentType": "char" }, "_lte": { "operatorName": "<=", - "argumentType": "bpchar" + "argumentType": "char" }, "_neq": { - "operatorName": "!=", - "argumentType": "bpchar" - } - }, - "char": { - "_eq": { - "operatorName": "=", + "operatorName": "<>", "argumentType": "char" }, - "_gt": { - "operatorName": ">", + "_nilike": { + "operatorName": "!~~*", "argumentType": "char" }, - "_gte": { - "operatorName": ">=", + "_niregex": { + "operatorName": "!~*", "argumentType": "char" }, - "_lt": { - "operatorName": "<", + "_nlike": { + "operatorName": "!~~", "argumentType": "char" }, - "_lte": { - "operatorName": "<=", + "_nregex": { + "operatorName": "!~", "argumentType": "char" }, - "_neq": { - "operatorName": "!=", + "_regex": { + "operatorName": "~", "argumentType": "char" } }, @@ -1655,7 +1512,7 @@ "argumentType": "date" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "date" } }, @@ -1681,7 +1538,7 @@ "argumentType": "float4" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "float4" } }, @@ -1707,62 +1564,10 @@ "argumentType": "float8" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "float8" } }, - "geometry": { - "_eq": { - "operatorName": "=", - "argumentType": "geometry" - }, - "_gt": { - "operatorName": ">", - "argumentType": "geometry" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "geometry" - }, - "_lt": { - "operatorName": "<", - "argumentType": "geometry" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "geometry" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "geometry" - } - }, - "inet": { - "_eq": { - "operatorName": "=", - "argumentType": "inet" - }, - "_gt": { - "operatorName": ">", - "argumentType": "inet" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "inet" - }, - "_lt": { - "operatorName": "<", - "argumentType": "inet" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "inet" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "inet" - } - }, "int2": { "_eq": { "operatorName": "=", @@ -1785,7 +1590,7 @@ "argumentType": "int2" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int2" } }, @@ -1811,7 +1616,7 @@ "argumentType": "int4" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int4" } }, @@ -1837,85 +1642,65 @@ "argumentType": "int8" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int8" } }, - "interval": { + "name": { "_eq": { "operatorName": "=", - "argumentType": "interval" + "argumentType": "name" }, "_gt": { "operatorName": ">", - "argumentType": "interval" + "argumentType": "name" }, "_gte": { "operatorName": ">=", - "argumentType": "interval" - }, - "_lt": { - "operatorName": "<", - "argumentType": "interval" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "interval" + "argumentType": "name" }, - "_neq": { - "operatorName": "!=", - "argumentType": "interval" - } - }, - "money": { - "_eq": { - "operatorName": "=", - "argumentType": "money" + "_ilike": { + "operatorName": "~~*", + "argumentType": "name" }, - "_gt": { - "operatorName": ">", - "argumentType": "money" + "_iregex": { + "operatorName": "~*", + "argumentType": "name" }, - "_gte": { - "operatorName": ">=", - "argumentType": "money" + "_like": { + "operatorName": "~~", + "argumentType": "name" }, "_lt": { "operatorName": "<", - "argumentType": "money" + "argumentType": "name" }, "_lte": { "operatorName": "<=", - "argumentType": "money" + "argumentType": "name" }, "_neq": { - "operatorName": "!=", - "argumentType": "money" - } - }, - "name": { - "_eq": { - "operatorName": "=", + "operatorName": "<>", "argumentType": "name" }, - "_gt": { - "operatorName": ">", + "_nilike": { + "operatorName": "!~~*", "argumentType": "name" }, - "_gte": { - "operatorName": ">=", + "_niregex": { + "operatorName": "!~*", "argumentType": "name" }, - "_lt": { - "operatorName": "<", + "_nlike": { + "operatorName": "!~~", "argumentType": "name" }, - "_lte": { - "operatorName": "<=", + "_nregex": { + "operatorName": "!~", "argumentType": "name" }, - "_neq": { - "operatorName": "!=", + "_regex": { + "operatorName": "~", "argumentType": "name" } }, @@ -1941,62 +1726,10 @@ "argumentType": "numeric" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "numeric" } }, - "oid": { - "_eq": { - "operatorName": "=", - "argumentType": "oid" - }, - "_gt": { - "operatorName": ">", - "argumentType": "oid" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "oid" - }, - "_lt": { - "operatorName": "<", - "argumentType": "oid" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "oid" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "oid" - } - }, - "pg_lsn": { - "_eq": { - "operatorName": "=", - "argumentType": "pg_lsn" - }, - "_gt": { - "operatorName": ">", - "argumentType": "pg_lsn" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "pg_lsn" - }, - "_lt": { - "operatorName": "<", - "argumentType": "pg_lsn" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "pg_lsn" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "pg_lsn" - } - }, "text": { "_eq": { "operatorName": "=", @@ -2011,7 +1744,7 @@ "argumentType": "text" }, "_ilike": { - "operatorName": "ILIKE", + "operatorName": "~~*", "argumentType": "text" }, "_iregex": { @@ -2019,7 +1752,7 @@ "argumentType": "text" }, "_like": { - "operatorName": "LIKE", + "operatorName": "~~", "argumentType": "text" }, "_lt": { @@ -2031,11 +1764,11 @@ "argumentType": "text" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "text" }, "_nilike": { - "operatorName": "NOT ILIKE", + "operatorName": "!~~*", "argumentType": "text" }, "_niregex": { @@ -2043,50 +1776,16 @@ "argumentType": "text" }, "_nlike": { - "operatorName": "NOT LIKE", + "operatorName": "!~~", "argumentType": "text" }, "_nregex": { "operatorName": "!~", "argumentType": "text" }, - "_nsimilar": { - "operatorName": "NOT SIMILAR TO", - "argumentType": "text" - }, "_regex": { "operatorName": "~", "argumentType": "text" - }, - "_similar": { - "operatorName": "SIMILAR TO", - "argumentType": "text" - } - }, - "tid": { - "_eq": { - "operatorName": "=", - "argumentType": "tid" - }, - "_gt": { - "operatorName": ">", - "argumentType": "tid" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "tid" - }, - "_lt": { - "operatorName": "<", - "argumentType": "tid" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "tid" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "tid" } }, "time": { @@ -2111,7 +1810,7 @@ "argumentType": "time" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "time" } }, @@ -2137,7 +1836,7 @@ "argumentType": "timestamp" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timestamp" } }, @@ -2163,7 +1862,7 @@ "argumentType": "timestamptz" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timestamptz" } }, @@ -2189,36 +1888,10 @@ "argumentType": "timetz" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timetz" } }, - "topoelement": { - "_eq": { - "operatorName": "=", - "argumentType": "topoelement" - }, - "_gt": { - "operatorName": ">", - "argumentType": "topoelement" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "topoelement" - }, - "_lt": { - "operatorName": "<", - "argumentType": "topoelement" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "topoelement" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "topoelement" - } - }, "uuid": { "_eq": { "operatorName": "=", @@ -2241,7 +1914,7 @@ "argumentType": "uuid" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "uuid" } }, @@ -2259,7 +1932,7 @@ "argumentType": "varchar" }, "_ilike": { - "operatorName": "ILIKE", + "operatorName": "~~*", "argumentType": "varchar" }, "_iregex": { @@ -2267,7 +1940,7 @@ "argumentType": "varchar" }, "_like": { - "operatorName": "LIKE", + "operatorName": "~~", "argumentType": "varchar" }, "_lt": { @@ -2279,11 +1952,11 @@ "argumentType": "varchar" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "varchar" }, "_nilike": { - "operatorName": "NOT ILIKE", + "operatorName": "!~~*", "argumentType": "varchar" }, "_niregex": { @@ -2291,86 +1964,114 @@ "argumentType": "varchar" }, "_nlike": { - "operatorName": "NOT LIKE", + "operatorName": "!~~", "argumentType": "varchar" }, "_nregex": { "operatorName": "!~", "argumentType": "varchar" }, - "_nsimilar": { - "operatorName": "NOT SIMILAR TO", - "argumentType": "varchar" - }, "_regex": { "operatorName": "~", "argumentType": "varchar" - }, - "_similar": { - "operatorName": "SIMILAR TO", - "argumentType": "varchar" - } - }, - "xid8": { - "_eq": { - "operatorName": "=", - "argumentType": "xid8" - }, - "_gt": { - "operatorName": ">", - "argumentType": "xid8" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "xid8" - }, - "_lt": { - "operatorName": "<", - "argumentType": "xid8" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "xid8" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "xid8" - } - }, - "xml": { - "_eq": { - "operatorName": "=", - "argumentType": "xml" - }, - "_gt": { - "operatorName": ">", - "argumentType": "xml" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "xml" - }, - "_lt": { - "operatorName": "<", - "argumentType": "xml" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "xml" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "xml" } } } }, - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ] + "configureOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq" + }, + { + "operatorName": "<=", + "exposedName": "_lte" + }, + { + "operatorName": ">", + "exposedName": "_gt" + }, + { + "operatorName": ">=", + "exposedName": "_gte" + }, + { + "operatorName": "<", + "exposedName": "_lt" + }, + { + "operatorName": "!=", + "exposedName": "_neq" + }, + { + "operatorName": "LIKE", + "exposedName": "_like" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar" + }, + { + "operatorName": "<>", + "exposedName": "_neq" + }, + { + "operatorName": "~~", + "exposedName": "_like" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike" + }, + { + "operatorName": "~", + "exposedName": "_regex" + }, + { + "operatorName": "!~", + "exposedName": "_nregex" + }, + { + "operatorName": "~*", + "exposedName": "_iregex" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex" + } + ] + } } diff --git a/static/citus/chinook-deployment.json b/static/citus/chinook-deployment.json index 937413947..cdebc0c8c 100644 --- a/static/citus/chinook-deployment.json +++ b/static/citus/chinook-deployment.json @@ -927,17 +927,6 @@ } }, "aggregateFunctions": { - "bit": { - "bit_and": { - "returnType": "bit" - }, - "bit_or": { - "returnType": "bit" - }, - "bit_xor": { - "returnType": "bit" - } - }, "bool": { "bool_and": { "returnType": "bool" @@ -949,14 +938,6 @@ "returnType": "bool" } }, - "bpchar": { - "max": { - "returnType": "bpchar" - }, - "min": { - "returnType": "bpchar" - } - }, "date": { "max": { "returnType": "date" @@ -1029,14 +1010,6 @@ "returnType": "float8" } }, - "inet": { - "max": { - "returnType": "inet" - }, - "min": { - "returnType": "inet" - } - }, "int2": { "avg": { "returnType": "numeric" @@ -1160,41 +1133,6 @@ "returnType": "numeric" } }, - "interval": { - "avg": { - "returnType": "interval" - }, - "max": { - "returnType": "interval" - }, - "min": { - "returnType": "interval" - }, - "sum": { - "returnType": "interval" - } - }, - "json": { - "json_cat_agg": { - "returnType": "json" - } - }, - "jsonb": { - "jsonb_cat_agg": { - "returnType": "jsonb" - } - }, - "money": { - "max": { - "returnType": "money" - }, - "min": { - "returnType": "money" - }, - "sum": { - "returnType": "money" - } - }, "numeric": { "avg": { "returnType": "numeric" @@ -1227,22 +1165,6 @@ "returnType": "numeric" } }, - "oid": { - "max": { - "returnType": "oid" - }, - "min": { - "returnType": "oid" - } - }, - "pg_lsn": { - "max": { - "returnType": "pg_lsn" - }, - "min": { - "returnType": "pg_lsn" - } - }, "text": { "max": { "returnType": "text" @@ -1251,14 +1173,6 @@ "returnType": "text" } }, - "tid": { - "max": { - "returnType": "tid" - }, - "min": { - "returnType": "tid" - } - }, "time": { "max": { "returnType": "time" @@ -1290,48 +1204,9 @@ "min": { "returnType": "timetz" } - }, - "xid8": { - "max": { - "returnType": "xid8" - }, - "min": { - "returnType": "xid8" - } - }, - "xml": { - "xmlagg": { - "returnType": "xml" - } } }, "comparisonOperators": { - "bit": { - "_eq": { - "operatorName": "=", - "argumentType": "bit" - }, - "_gt": { - "operatorName": ">", - "argumentType": "bit" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "bit" - }, - "_lt": { - "operatorName": "<", - "argumentType": "bit" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "bit" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "bit" - } - }, "bool": { "_eq": { "operatorName": "=", @@ -1354,59 +1229,65 @@ "argumentType": "bool" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "bool" } }, - "bpchar": { + "char": { "_eq": { "operatorName": "=", - "argumentType": "bpchar" + "argumentType": "char" }, "_gt": { "operatorName": ">", - "argumentType": "bpchar" + "argumentType": "char" }, "_gte": { "operatorName": ">=", - "argumentType": "bpchar" + "argumentType": "char" + }, + "_ilike": { + "operatorName": "~~*", + "argumentType": "char" + }, + "_iregex": { + "operatorName": "~*", + "argumentType": "char" + }, + "_like": { + "operatorName": "~~", + "argumentType": "char" }, "_lt": { "operatorName": "<", - "argumentType": "bpchar" + "argumentType": "char" }, "_lte": { "operatorName": "<=", - "argumentType": "bpchar" + "argumentType": "char" }, "_neq": { - "operatorName": "!=", - "argumentType": "bpchar" - } - }, - "char": { - "_eq": { - "operatorName": "=", + "operatorName": "<>", "argumentType": "char" }, - "_gt": { - "operatorName": ">", + "_nilike": { + "operatorName": "!~~*", "argumentType": "char" }, - "_gte": { - "operatorName": ">=", + "_niregex": { + "operatorName": "!~*", "argumentType": "char" }, - "_lt": { - "operatorName": "<", + "_nlike": { + "operatorName": "!~~", "argumentType": "char" }, - "_lte": { - "operatorName": "<=", + "_nregex": { + "operatorName": "!~", "argumentType": "char" }, - "_neq": { - "operatorName": "!=", + "_regex": { + "operatorName": "~", "argumentType": "char" } }, @@ -1432,7 +1313,7 @@ "argumentType": "date" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "date" } }, @@ -1458,7 +1339,7 @@ "argumentType": "float4" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "float4" } }, @@ -1484,36 +1365,10 @@ "argumentType": "float8" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "float8" } }, - "inet": { - "_eq": { - "operatorName": "=", - "argumentType": "inet" - }, - "_gt": { - "operatorName": ">", - "argumentType": "inet" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "inet" - }, - "_lt": { - "operatorName": "<", - "argumentType": "inet" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "inet" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "inet" - } - }, "int2": { "_eq": { "operatorName": "=", @@ -1536,7 +1391,7 @@ "argumentType": "int2" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int2" } }, @@ -1562,7 +1417,7 @@ "argumentType": "int4" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int4" } }, @@ -1588,137 +1443,65 @@ "argumentType": "int8" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int8" } }, - "interval": { - "_eq": { - "operatorName": "=", - "argumentType": "interval" - }, - "_gt": { - "operatorName": ">", - "argumentType": "interval" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "interval" - }, - "_lt": { - "operatorName": "<", - "argumentType": "interval" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "interval" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "interval" - } - }, - "json": { - "_eq": { - "operatorName": "=", - "argumentType": "json" - }, - "_gt": { - "operatorName": ">", - "argumentType": "json" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "json" - }, - "_lt": { - "operatorName": "<", - "argumentType": "json" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "json" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "json" - } - }, - "jsonb": { + "name": { "_eq": { "operatorName": "=", - "argumentType": "jsonb" + "argumentType": "name" }, "_gt": { "operatorName": ">", - "argumentType": "jsonb" + "argumentType": "name" }, "_gte": { "operatorName": ">=", - "argumentType": "jsonb" - }, - "_lt": { - "operatorName": "<", - "argumentType": "jsonb" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "jsonb" + "argumentType": "name" }, - "_neq": { - "operatorName": "!=", - "argumentType": "jsonb" - } - }, - "money": { - "_eq": { - "operatorName": "=", - "argumentType": "money" + "_ilike": { + "operatorName": "~~*", + "argumentType": "name" }, - "_gt": { - "operatorName": ">", - "argumentType": "money" + "_iregex": { + "operatorName": "~*", + "argumentType": "name" }, - "_gte": { - "operatorName": ">=", - "argumentType": "money" + "_like": { + "operatorName": "~~", + "argumentType": "name" }, "_lt": { "operatorName": "<", - "argumentType": "money" + "argumentType": "name" }, "_lte": { "operatorName": "<=", - "argumentType": "money" + "argumentType": "name" }, "_neq": { - "operatorName": "!=", - "argumentType": "money" - } - }, - "name": { - "_eq": { - "operatorName": "=", + "operatorName": "<>", "argumentType": "name" }, - "_gt": { - "operatorName": ">", + "_nilike": { + "operatorName": "!~~*", "argumentType": "name" }, - "_gte": { - "operatorName": ">=", + "_niregex": { + "operatorName": "!~*", "argumentType": "name" }, - "_lt": { - "operatorName": "<", + "_nlike": { + "operatorName": "!~~", "argumentType": "name" }, - "_lte": { - "operatorName": "<=", + "_nregex": { + "operatorName": "!~", "argumentType": "name" }, - "_neq": { - "operatorName": "!=", + "_regex": { + "operatorName": "~", "argumentType": "name" } }, @@ -1744,62 +1527,10 @@ "argumentType": "numeric" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "numeric" } }, - "oid": { - "_eq": { - "operatorName": "=", - "argumentType": "oid" - }, - "_gt": { - "operatorName": ">", - "argumentType": "oid" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "oid" - }, - "_lt": { - "operatorName": "<", - "argumentType": "oid" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "oid" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "oid" - } - }, - "pg_lsn": { - "_eq": { - "operatorName": "=", - "argumentType": "pg_lsn" - }, - "_gt": { - "operatorName": ">", - "argumentType": "pg_lsn" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "pg_lsn" - }, - "_lt": { - "operatorName": "<", - "argumentType": "pg_lsn" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "pg_lsn" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "pg_lsn" - } - }, "regclass": { "_eq": { "operatorName": "=", @@ -1822,7 +1553,7 @@ "argumentType": "regclass" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "regclass" } }, @@ -1840,7 +1571,7 @@ "argumentType": "text" }, "_ilike": { - "operatorName": "ILIKE", + "operatorName": "~~*", "argumentType": "text" }, "_iregex": { @@ -1848,7 +1579,7 @@ "argumentType": "text" }, "_like": { - "operatorName": "LIKE", + "operatorName": "~~", "argumentType": "text" }, "_lt": { @@ -1860,11 +1591,11 @@ "argumentType": "text" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "text" }, "_nilike": { - "operatorName": "NOT ILIKE", + "operatorName": "!~~*", "argumentType": "text" }, "_niregex": { @@ -1872,50 +1603,16 @@ "argumentType": "text" }, "_nlike": { - "operatorName": "NOT LIKE", + "operatorName": "!~~", "argumentType": "text" }, "_nregex": { "operatorName": "!~", "argumentType": "text" }, - "_nsimilar": { - "operatorName": "NOT SIMILAR TO", - "argumentType": "text" - }, "_regex": { "operatorName": "~", "argumentType": "text" - }, - "_similar": { - "operatorName": "SIMILAR TO", - "argumentType": "text" - } - }, - "tid": { - "_eq": { - "operatorName": "=", - "argumentType": "tid" - }, - "_gt": { - "operatorName": ">", - "argumentType": "tid" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "tid" - }, - "_lt": { - "operatorName": "<", - "argumentType": "tid" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "tid" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "tid" } }, "time": { @@ -1940,7 +1637,7 @@ "argumentType": "time" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "time" } }, @@ -1966,7 +1663,7 @@ "argumentType": "timestamp" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timestamp" } }, @@ -1992,7 +1689,7 @@ "argumentType": "timestamptz" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timestamptz" } }, @@ -2018,7 +1715,7 @@ "argumentType": "timetz" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timetz" } }, @@ -2044,7 +1741,7 @@ "argumentType": "uuid" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "uuid" } }, @@ -2062,7 +1759,7 @@ "argumentType": "varchar" }, "_ilike": { - "operatorName": "ILIKE", + "operatorName": "~~*", "argumentType": "varchar" }, "_iregex": { @@ -2070,7 +1767,7 @@ "argumentType": "varchar" }, "_like": { - "operatorName": "LIKE", + "operatorName": "~~", "argumentType": "varchar" }, "_lt": { @@ -2082,11 +1779,11 @@ "argumentType": "varchar" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "varchar" }, "_nilike": { - "operatorName": "NOT ILIKE", + "operatorName": "!~~*", "argumentType": "varchar" }, "_niregex": { @@ -2094,86 +1791,114 @@ "argumentType": "varchar" }, "_nlike": { - "operatorName": "NOT LIKE", + "operatorName": "!~~", "argumentType": "varchar" }, "_nregex": { "operatorName": "!~", "argumentType": "varchar" }, - "_nsimilar": { - "operatorName": "NOT SIMILAR TO", - "argumentType": "varchar" - }, "_regex": { "operatorName": "~", "argumentType": "varchar" - }, - "_similar": { - "operatorName": "SIMILAR TO", - "argumentType": "varchar" - } - }, - "xid8": { - "_eq": { - "operatorName": "=", - "argumentType": "xid8" - }, - "_gt": { - "operatorName": ">", - "argumentType": "xid8" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "xid8" - }, - "_lt": { - "operatorName": "<", - "argumentType": "xid8" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "xid8" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "xid8" - } - }, - "xml": { - "_eq": { - "operatorName": "=", - "argumentType": "xml" - }, - "_gt": { - "operatorName": ">", - "argumentType": "xml" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "xml" - }, - "_lt": { - "operatorName": "<", - "argumentType": "xml" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "xml" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "xml" } } } }, - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ] + "configureOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq" + }, + { + "operatorName": "<=", + "exposedName": "_lte" + }, + { + "operatorName": ">", + "exposedName": "_gt" + }, + { + "operatorName": ">=", + "exposedName": "_gte" + }, + { + "operatorName": "<", + "exposedName": "_lt" + }, + { + "operatorName": "!=", + "exposedName": "_neq" + }, + { + "operatorName": "LIKE", + "exposedName": "_like" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar" + }, + { + "operatorName": "<>", + "exposedName": "_neq" + }, + { + "operatorName": "~~", + "exposedName": "_like" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike" + }, + { + "operatorName": "~", + "exposedName": "_regex" + }, + { + "operatorName": "!~", + "exposedName": "_nregex" + }, + { + "operatorName": "~*", + "exposedName": "_iregex" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex" + } + ] + } } diff --git a/static/cockroach/chinook-deployment.json b/static/cockroach/chinook-deployment.json index 607960784..f38b75fab 100644 --- a/static/cockroach/chinook-deployment.json +++ b/static/cockroach/chinook-deployment.json @@ -1022,14 +1022,6 @@ "returnType": "bool" } }, - "bytea": { - "concat_agg": { - "returnType": "bytea" - }, - "xor_agg": { - "returnType": "bytea" - } - }, "float8": { "avg": { "returnType": "float8" @@ -1059,26 +1051,6 @@ "returnType": "float8" } }, - "geometry": { - "st_collect": { - "returnType": "geometry" - }, - "st_extent": { - "returnType": "box2d" - }, - "st_makeline": { - "returnType": "geometry" - }, - "st_memcollect": { - "returnType": "geometry" - }, - "st_memunion": { - "returnType": "geometry" - }, - "st_union": { - "returnType": "geometry" - } - }, "int8": { "avg": { "returnType": "numeric" @@ -1120,14 +1092,6 @@ "returnType": "int8" } }, - "interval": { - "avg": { - "returnType": "interval" - }, - "sum": { - "returnType": "interval" - } - }, "numeric": { "avg": { "returnType": "numeric" @@ -1161,14 +1125,6 @@ "concat_agg": { "returnType": "text" } - }, - "varbit": { - "bit_and": { - "returnType": "varbit" - }, - "bit_or": { - "returnType": "varbit" - } } }, "comparisonOperators": { @@ -1198,55 +1154,69 @@ "argumentType": "bool" } }, - "bytea": { + "char": { "_eq": { "operatorName": "=", - "argumentType": "bytea" + "argumentType": "char" }, "_gt": { "operatorName": ">", - "argumentType": "bytea" + "argumentType": "char" }, "_gte": { "operatorName": ">=", - "argumentType": "bytea" + "argumentType": "char" + }, + "_ilike": { + "operatorName": "ILIKE", + "argumentType": "char" + }, + "_iregex": { + "operatorName": "~*", + "argumentType": "char" + }, + "_like": { + "operatorName": "LIKE", + "argumentType": "char" }, "_lt": { "operatorName": "<", - "argumentType": "bytea" + "argumentType": "char" }, "_lte": { "operatorName": "<=", - "argumentType": "bytea" + "argumentType": "char" }, "_neq": { "operatorName": "!=", - "argumentType": "bytea" - } - }, - "char": { - "_eq": { - "operatorName": "=", "argumentType": "char" }, - "_gt": { - "operatorName": ">", + "_nilike": { + "operatorName": "NOT ILIKE", "argumentType": "char" }, - "_gte": { - "operatorName": ">=", + "_niregex": { + "operatorName": "!~*", "argumentType": "char" }, - "_lt": { - "operatorName": "<", + "_nlike": { + "operatorName": "NOT LIKE", "argumentType": "char" }, - "_lte": { - "operatorName": "<=", + "_nregex": { + "operatorName": "!~", "argumentType": "char" }, - "_neq": { - "operatorName": "!=", + "_nsimilar": { + "operatorName": "NOT SIMILAR TO", + "argumentType": "char" + }, + "_regex": { + "operatorName": "~", + "argumentType": "char" + }, + "_similar": { + "operatorName": "SIMILAR TO", "argumentType": "char" } }, @@ -1328,32 +1298,6 @@ "argumentType": "float8" } }, - "geometry": { - "_eq": { - "operatorName": "=", - "argumentType": "geometry" - }, - "_gt": { - "operatorName": ">", - "argumentType": "geometry" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "geometry" - }, - "_lt": { - "operatorName": "<", - "argumentType": "geometry" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "geometry" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "geometry" - } - }, "int2": { "_eq": { "operatorName": "=", @@ -1432,55 +1376,69 @@ "argumentType": "int8" } }, - "interval": { + "name": { "_eq": { "operatorName": "=", - "argumentType": "interval" + "argumentType": "name" }, "_gt": { "operatorName": ">", - "argumentType": "interval" + "argumentType": "name" }, "_gte": { "operatorName": ">=", - "argumentType": "interval" + "argumentType": "name" + }, + "_ilike": { + "operatorName": "ILIKE", + "argumentType": "name" + }, + "_iregex": { + "operatorName": "~*", + "argumentType": "name" + }, + "_like": { + "operatorName": "LIKE", + "argumentType": "name" }, "_lt": { "operatorName": "<", - "argumentType": "interval" + "argumentType": "name" }, "_lte": { "operatorName": "<=", - "argumentType": "interval" + "argumentType": "name" }, "_neq": { "operatorName": "!=", - "argumentType": "interval" - } - }, - "name": { - "_eq": { - "operatorName": "=", "argumentType": "name" }, - "_gt": { - "operatorName": ">", + "_nilike": { + "operatorName": "NOT ILIKE", "argumentType": "name" }, - "_gte": { - "operatorName": ">=", + "_niregex": { + "operatorName": "!~*", "argumentType": "name" }, - "_lt": { - "operatorName": "<", + "_nlike": { + "operatorName": "NOT LIKE", "argumentType": "name" }, - "_lte": { - "operatorName": "<=", + "_nregex": { + "operatorName": "!~", "argumentType": "name" }, - "_neq": { - "operatorName": "!=", + "_nsimilar": { + "operatorName": "NOT SIMILAR TO", + "argumentType": "name" + }, + "_regex": { + "operatorName": "~", + "argumentType": "name" + }, + "_similar": { + "operatorName": "SIMILAR TO", "argumentType": "name" } }, @@ -1706,32 +1664,6 @@ "argumentType": "uuid" } }, - "varbit": { - "_eq": { - "operatorName": "=", - "argumentType": "varbit" - }, - "_gt": { - "operatorName": ">", - "argumentType": "varbit" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "varbit" - }, - "_lt": { - "operatorName": "<", - "argumentType": "varbit" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "varbit" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "varbit" - } - }, "varchar": { "_eq": { "operatorName": "=", @@ -1800,12 +1732,100 @@ } } }, - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ] + "configureOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq" + }, + { + "operatorName": "<=", + "exposedName": "_lte" + }, + { + "operatorName": ">", + "exposedName": "_gt" + }, + { + "operatorName": ">=", + "exposedName": "_gte" + }, + { + "operatorName": "<", + "exposedName": "_lt" + }, + { + "operatorName": "!=", + "exposedName": "_neq" + }, + { + "operatorName": "LIKE", + "exposedName": "_like" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar" + }, + { + "operatorName": "<>", + "exposedName": "_neq" + }, + { + "operatorName": "~~", + "exposedName": "_like" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike" + }, + { + "operatorName": "~", + "exposedName": "_regex" + }, + { + "operatorName": "!~", + "exposedName": "_nregex" + }, + { + "operatorName": "~*", + "exposedName": "_iregex" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex" + } + ] + } } diff --git a/static/yugabyte/chinook-deployment.json b/static/yugabyte/chinook-deployment.json index 560d3db25..30df208c3 100644 --- a/static/yugabyte/chinook-deployment.json +++ b/static/yugabyte/chinook-deployment.json @@ -870,22 +870,6 @@ } }, "aggregateFunctions": { - "abstime": { - "max": { - "returnType": "abstime" - }, - "min": { - "returnType": "abstime" - } - }, - "bit": { - "bit_and": { - "returnType": "bit" - }, - "bit_or": { - "returnType": "bit" - } - }, "bool": { "bool_and": { "returnType": "bool" @@ -897,14 +881,6 @@ "returnType": "bool" } }, - "bpchar": { - "max": { - "returnType": "bpchar" - }, - "min": { - "returnType": "bpchar" - } - }, "date": { "max": { "returnType": "date" @@ -977,14 +953,6 @@ "returnType": "float8" } }, - "inet": { - "max": { - "returnType": "inet" - }, - "min": { - "returnType": "inet" - } - }, "int2": { "avg": { "returnType": "numeric" @@ -1099,31 +1067,6 @@ "returnType": "numeric" } }, - "interval": { - "avg": { - "returnType": "interval" - }, - "max": { - "returnType": "interval" - }, - "min": { - "returnType": "interval" - }, - "sum": { - "returnType": "interval" - } - }, - "money": { - "max": { - "returnType": "money" - }, - "min": { - "returnType": "money" - }, - "sum": { - "returnType": "money" - } - }, "numeric": { "avg": { "returnType": "numeric" @@ -1156,14 +1099,6 @@ "returnType": "numeric" } }, - "oid": { - "max": { - "returnType": "oid" - }, - "min": { - "returnType": "oid" - } - }, "text": { "max": { "returnType": "text" @@ -1172,14 +1107,6 @@ "returnType": "text" } }, - "tid": { - "max": { - "returnType": "tid" - }, - "min": { - "returnType": "tid" - } - }, "time": { "max": { "returnType": "time" @@ -1211,66 +1138,9 @@ "min": { "returnType": "timetz" } - }, - "xml": { - "xmlagg": { - "returnType": "xml" - } } }, "comparisonOperators": { - "abstime": { - "_eq": { - "operatorName": "=", - "argumentType": "abstime" - }, - "_gt": { - "operatorName": ">", - "argumentType": "abstime" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "abstime" - }, - "_lt": { - "operatorName": "<", - "argumentType": "abstime" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "abstime" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "abstime" - } - }, - "bit": { - "_eq": { - "operatorName": "=", - "argumentType": "bit" - }, - "_gt": { - "operatorName": ">", - "argumentType": "bit" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "bit" - }, - "_lt": { - "operatorName": "<", - "argumentType": "bit" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "bit" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "bit" - } - }, "bool": { "_eq": { "operatorName": "=", @@ -1293,59 +1163,65 @@ "argumentType": "bool" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "bool" } }, - "bpchar": { + "char": { "_eq": { "operatorName": "=", - "argumentType": "bpchar" + "argumentType": "char" }, "_gt": { "operatorName": ">", - "argumentType": "bpchar" + "argumentType": "char" }, "_gte": { "operatorName": ">=", - "argumentType": "bpchar" + "argumentType": "char" + }, + "_ilike": { + "operatorName": "~~*", + "argumentType": "char" + }, + "_iregex": { + "operatorName": "~*", + "argumentType": "char" + }, + "_like": { + "operatorName": "~~", + "argumentType": "char" }, "_lt": { "operatorName": "<", - "argumentType": "bpchar" + "argumentType": "char" }, "_lte": { "operatorName": "<=", - "argumentType": "bpchar" + "argumentType": "char" }, "_neq": { - "operatorName": "!=", - "argumentType": "bpchar" - } - }, - "char": { - "_eq": { - "operatorName": "=", + "operatorName": "<>", "argumentType": "char" }, - "_gt": { - "operatorName": ">", + "_nilike": { + "operatorName": "!~~*", "argumentType": "char" }, - "_gte": { - "operatorName": ">=", + "_niregex": { + "operatorName": "!~*", "argumentType": "char" }, - "_lt": { - "operatorName": "<", + "_nlike": { + "operatorName": "!~~", "argumentType": "char" }, - "_lte": { - "operatorName": "<=", + "_nregex": { + "operatorName": "!~", "argumentType": "char" }, - "_neq": { - "operatorName": "!=", + "_regex": { + "operatorName": "~", "argumentType": "char" } }, @@ -1371,7 +1247,7 @@ "argumentType": "date" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "date" } }, @@ -1397,7 +1273,7 @@ "argumentType": "float4" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "float4" } }, @@ -1423,36 +1299,10 @@ "argumentType": "float8" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "float8" } }, - "inet": { - "_eq": { - "operatorName": "=", - "argumentType": "inet" - }, - "_gt": { - "operatorName": ">", - "argumentType": "inet" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "inet" - }, - "_lt": { - "operatorName": "<", - "argumentType": "inet" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "inet" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "inet" - } - }, "int2": { "_eq": { "operatorName": "=", @@ -1475,7 +1325,7 @@ "argumentType": "int2" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int2" } }, @@ -1501,7 +1351,7 @@ "argumentType": "int4" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int4" } }, @@ -1527,62 +1377,10 @@ "argumentType": "int8" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "int8" } }, - "interval": { - "_eq": { - "operatorName": "=", - "argumentType": "interval" - }, - "_gt": { - "operatorName": ">", - "argumentType": "interval" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "interval" - }, - "_lt": { - "operatorName": "<", - "argumentType": "interval" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "interval" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "interval" - } - }, - "money": { - "_eq": { - "operatorName": "=", - "argumentType": "money" - }, - "_gt": { - "operatorName": ">", - "argumentType": "money" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "money" - }, - "_lt": { - "operatorName": "<", - "argumentType": "money" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "money" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "money" - } - }, "numeric": { "_eq": { "operatorName": "=", @@ -1605,36 +1403,10 @@ "argumentType": "numeric" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "numeric" } }, - "oid": { - "_eq": { - "operatorName": "=", - "argumentType": "oid" - }, - "_gt": { - "operatorName": ">", - "argumentType": "oid" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "oid" - }, - "_lt": { - "operatorName": "<", - "argumentType": "oid" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "oid" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "oid" - } - }, "text": { "_eq": { "operatorName": "=", @@ -1649,7 +1421,7 @@ "argumentType": "text" }, "_ilike": { - "operatorName": "ILIKE", + "operatorName": "~~*", "argumentType": "text" }, "_iregex": { @@ -1657,7 +1429,7 @@ "argumentType": "text" }, "_like": { - "operatorName": "LIKE", + "operatorName": "~~", "argumentType": "text" }, "_lt": { @@ -1669,11 +1441,11 @@ "argumentType": "text" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "text" }, "_nilike": { - "operatorName": "NOT ILIKE", + "operatorName": "!~~*", "argumentType": "text" }, "_niregex": { @@ -1681,50 +1453,16 @@ "argumentType": "text" }, "_nlike": { - "operatorName": "NOT LIKE", + "operatorName": "!~~", "argumentType": "text" }, "_nregex": { "operatorName": "!~", "argumentType": "text" }, - "_nsimilar": { - "operatorName": "NOT SIMILAR TO", - "argumentType": "text" - }, "_regex": { "operatorName": "~", "argumentType": "text" - }, - "_similar": { - "operatorName": "SIMILAR TO", - "argumentType": "text" - } - }, - "tid": { - "_eq": { - "operatorName": "=", - "argumentType": "tid" - }, - "_gt": { - "operatorName": ">", - "argumentType": "tid" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "tid" - }, - "_lt": { - "operatorName": "<", - "argumentType": "tid" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "tid" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "tid" } }, "time": { @@ -1749,7 +1487,7 @@ "argumentType": "time" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "time" } }, @@ -1775,7 +1513,7 @@ "argumentType": "timestamp" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timestamp" } }, @@ -1801,7 +1539,7 @@ "argumentType": "timestamptz" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timestamptz" } }, @@ -1827,7 +1565,7 @@ "argumentType": "timetz" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "timetz" } }, @@ -1853,7 +1591,7 @@ "argumentType": "uuid" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "uuid" } }, @@ -1871,7 +1609,7 @@ "argumentType": "varchar" }, "_ilike": { - "operatorName": "ILIKE", + "operatorName": "~~*", "argumentType": "varchar" }, "_iregex": { @@ -1879,7 +1617,7 @@ "argumentType": "varchar" }, "_like": { - "operatorName": "LIKE", + "operatorName": "~~", "argumentType": "varchar" }, "_lt": { @@ -1891,11 +1629,11 @@ "argumentType": "varchar" }, "_neq": { - "operatorName": "!=", + "operatorName": "<>", "argumentType": "varchar" }, "_nilike": { - "operatorName": "NOT ILIKE", + "operatorName": "!~~*", "argumentType": "varchar" }, "_niregex": { @@ -1903,60 +1641,114 @@ "argumentType": "varchar" }, "_nlike": { - "operatorName": "NOT LIKE", + "operatorName": "!~~", "argumentType": "varchar" }, "_nregex": { "operatorName": "!~", "argumentType": "varchar" }, - "_nsimilar": { - "operatorName": "NOT SIMILAR TO", - "argumentType": "varchar" - }, "_regex": { "operatorName": "~", "argumentType": "varchar" - }, - "_similar": { - "operatorName": "SIMILAR TO", - "argumentType": "varchar" - } - }, - "xml": { - "_eq": { - "operatorName": "=", - "argumentType": "xml" - }, - "_gt": { - "operatorName": ">", - "argumentType": "xml" - }, - "_gte": { - "operatorName": ">=", - "argumentType": "xml" - }, - "_lt": { - "operatorName": "<", - "argumentType": "xml" - }, - "_lte": { - "operatorName": "<=", - "argumentType": "xml" - }, - "_neq": { - "operatorName": "!=", - "argumentType": "xml" } } } }, - "excludedSchemas": [ - "information_schema", - "pg_catalog", - "tiger", - "crdb_internal", - "columnar", - "columnar_internal" - ] + "configureOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq" + }, + { + "operatorName": "<=", + "exposedName": "_lte" + }, + { + "operatorName": ">", + "exposedName": "_gt" + }, + { + "operatorName": ">=", + "exposedName": "_gte" + }, + { + "operatorName": "<", + "exposedName": "_lt" + }, + { + "operatorName": "!=", + "exposedName": "_neq" + }, + { + "operatorName": "LIKE", + "exposedName": "_like" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar" + }, + { + "operatorName": "<>", + "exposedName": "_neq" + }, + { + "operatorName": "~~", + "exposedName": "_like" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike" + }, + { + "operatorName": "~", + "exposedName": "_regex" + }, + { + "operatorName": "!~", + "exposedName": "_nregex" + }, + { + "operatorName": "~*", + "exposedName": "_iregex" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex" + } + ] + } }