From b9ff3714ecdbe058f941ee79a3e6e6e0687e1005 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Tue, 29 Jul 2025 17:06:48 +0200 Subject: [PATCH 1/5] feat(query-ochestrator): Reduce number of cache set for used flag (#9828) Right now, we use both flags: used and touch. We already had LRU cache for a long time with the touch flag to reduce the number of updates in the Cache Store, but we didn't do it for the used. This leads to a situation where, for a schema with 100 pre-aggs, we will do 200 cache sets per 1 minute because the default refresh interval is set to 30 seconds. --- packages/cubejs-backend-shared/src/env.ts | 7 +++ .../src/orchestrator/PreAggregations.ts | 49 ++++++++++++++++--- .../src/orchestrator/QueryCache.ts | 12 ++--- 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/packages/cubejs-backend-shared/src/env.ts b/packages/cubejs-backend-shared/src/env.ts index 3b0a155f880f3..19f589f5f0223 100644 --- a/packages/cubejs-backend-shared/src/env.ts +++ b/packages/cubejs-backend-shared/src/env.ts @@ -649,6 +649,13 @@ const variables: Record any> = { .default(8192) .asInt(), + /** + * Max number of elements + */ + usedPreAggregationCacheMaxCount: (): number => get('CUBEJS_USED_PRE_AGG_CACHE_MAX_COUNT') + .default(8192) + .asInt(), + /** * Max number of elements */ diff --git a/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts b/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts index 30a45ff1da9d9..c8a6722cc9049 100644 --- a/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts +++ b/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts @@ -242,11 +242,11 @@ type PreAggregationQueryBody = QueryBody & { }; export class PreAggregations { - public options: PreAggregationsOptions; + public readonly options: PreAggregationsOptions; - public externalDriverFactory: DriverFactory; + public readonly externalDriverFactory: DriverFactory; - public structureVersionPersistTime: any; + public readonly structureVersionPersistTime: any; private readonly touchTablePersistTime: number; @@ -260,6 +260,8 @@ export class PreAggregations { private readonly queue: Record = {}; + private readonly usedCache: LRUCache; + private readonly touchCache: LRUCache; public constructor( @@ -277,6 +279,25 @@ export class PreAggregations { this.dropPreAggregationsWithoutTouch = options.dropPreAggregationsWithoutTouch || getEnv('dropPreAggregationsWithoutTouch'); this.usedTablePersistTime = options.usedTablePersistTime || getEnv('dbQueryTimeout'); this.externalRefresh = options.externalRefresh; + + /** + * Comment for both caches: used and touch: + * + * Memory usage: By default, it defines max as 8096 keys, + * let's assume that avg key size is 64 symbols, it's around 100 bytes + * with V8's internal stuff: + * + * 100 x 8096 = 809 bytes, max 1Mb in memory. + * + * However, this is a theoretical limit. In practice, even a couple of thousand + * is a very large number + */ + this.usedCache = new LRUCache({ + max: getEnv('usedPreAggregationCacheMaxCount'), + ttl: Math.round(this.usedTablePersistTime / 2) * 1000, + allowStale: false, + updateAgeOnGet: false + }); this.touchCache = new LRUCache({ max: getEnv('touchPreAggregationCacheMaxCount'), ttl: getEnv('touchPreAggregationCacheMaxAge') * 1000, @@ -301,11 +322,23 @@ export class PreAggregations { } public async addTableUsed(tableName: string): Promise { - await this.queryCache.getCacheDriver().set( - this.tablesUsedRedisKey(tableName), - true, - this.usedTablePersistTime - ); + if (this.usedCache.has(tableName)) { + return; + } + + try { + this.usedCache.set(tableName, true); + + await this.queryCache.getCacheDriver().set( + this.tablesUsedRedisKey(tableName), + true, + this.usedTablePersistTime + ); + } catch (e: unknown) { + this.usedCache.delete(tableName); + + throw e; + } } public async tablesUsed() { diff --git a/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts b/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts index 3c07ac545ed5d..f3b6fbccce462 100644 --- a/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts +++ b/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts @@ -130,7 +130,7 @@ export class QueryCache { protected memoryCache: LRUCache; public constructor( - protected readonly redisPrefix: string, + protected readonly cachePrefix: string, protected readonly driverFactory: DriverFactoryByDataSource, protected readonly logger: any, public readonly options: QueryCacheOptions @@ -165,11 +165,7 @@ export class QueryCache { } public getKey(catalog: string, key: string): string { - if (this.cacheDriver instanceof CubeStoreCacheDriver) { - return `${this.redisPrefix}#${catalog}:${key}`; - } else { - return `${catalog}_${this.redisPrefix}_${key}`; - } + return `${this.cachePrefix}#${catalog}:${key}`; } /** @@ -469,7 +465,7 @@ export class QueryCache { const queueOptions = await this.options.queueOptions(dataSource); if (!this.queue[dataSource]) { this.queue[dataSource] = QueryCache.createQueue( - `SQL_QUERY_${this.redisPrefix}_${dataSource}`, + `SQL_QUERY_${this.cachePrefix}_${dataSource}`, () => this.driverFactory(dataSource), (client, req) => { this.logger('Executing SQL', { ...req }); @@ -537,7 +533,7 @@ export class QueryCache { public getExternalQueue() { if (!this.externalQueue) { this.externalQueue = QueryCache.createQueue( - `SQL_QUERY_EXT_${this.redisPrefix}`, + `SQL_QUERY_EXT_${this.cachePrefix}`, this.options.externalDriverFactory, (client, q) => { this.logger('Executing SQL', { From 18b09ee5408bd82d28eb06f6f23e7cab29a2ce54 Mon Sep 17 00:00:00 2001 From: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com> Date: Tue, 29 Jul 2025 18:53:55 +0300 Subject: [PATCH 2/5] feat(cubesql): Improve DataGrip compatibility (#9825) List of changes: - Parse explicit `DISTINCT` option with set operators (e.g. `UNION DISTINCT`) - `array_agg` function can now be prefixed with `pg_catalog.` - New introspection tables are supported: - `pg_auth_members` - `pg_available_extension_versions` - `pg_cast` - `pg_event_trigger` - `pg_foreign_data_wrapper` - `pg_foreign_server` - `pg_foreign_table` - `pg_language` - `pg_locks` - `pg_operator` - `pg_rewrite` - `pg_tablespace` - `pg_timezone_abbrevs` - `pg_timezone_names` - `pg_user_mapping` - New introspection functions are supported: - `pg_is_in_recovery` - `pg_postmaster_start_time` - `pg_tablespace_location` - `txid_current` - System field `xmin` added to the following introspection tables: - `pg_am` - `pg_attribute` - `pg_class` - `pg_constraint` - `pg_description` - `pg_extension` - `pg_index` - `pg_namespace` - `pg_proc` - `pg_type` - `pg_namespace`'s `nspacl` field now has correct type (`List(Utf8)`) - `AGE` function now accepts values of type `xid` - `"char"` casts are being replaced with `text` casts - `xid` casts are being replaced with `unsigned int` casts - New `PgType`s added: - `[ARRAY]PGAM` - `[ARRAY]PGCAST` - `[ARRAY]PGEVENTTRIGGER` - `[ARRAY]PGEXTENSION` - `[ARRAY]PGFOREIGNDATAWRAPPER` - `[ARRAY]PGFOREIGNSERVER` - `[ARRAY]PGLANGUAGE` - `CTID` system field is replaced with `NULL` in data queries Signed-off-by: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com> --- packages/cubejs-backend-native/Cargo.lock | 14 +- rust/cubenativeutils/Cargo.lock | 14 +- rust/cubesql/Cargo.lock | 14 +- rust/cubesql/cubesql/Cargo.toml | 4 +- ..._postgres__system_pg_catalog.pg_class.snap | 2 +- ...__postgres__system_pg_catalog.pg_proc.snap | 2 +- ...__postgres__system_pg_catalog.pg_type.snap | 2 +- .../src/compile/engine/context_postgresql.rs | 74 +++- .../engine/information_schema/postgres/mod.rs | 30 ++ .../information_schema/postgres/pg_am.rs | 4 + .../postgres/pg_attribute.rs | 5 + .../postgres/pg_auth_members.rs | 103 ++++++ .../pg_available_extension_versions.rs | 127 +++++++ .../information_schema/postgres/pg_cast.rs | 115 +++++++ .../information_schema/postgres/pg_class.rs | 5 + .../postgres/pg_constraint.rs | 4 + .../postgres/pg_description.rs | 6 + .../postgres/pg_event_trigger.rs | 123 +++++++ .../postgres/pg_extension.rs | 4 + .../postgres/pg_foreign_data_wrapper.rs | 127 +++++++ .../postgres/pg_foreign_server.rs | 131 +++++++ .../postgres/pg_foreign_table.rs | 103 ++++++ .../information_schema/postgres/pg_index.rs | 4 + .../postgres/pg_language.rs | 185 ++++++++++ .../information_schema/postgres/pg_locks.rs | 158 +++++++++ .../postgres/pg_namespace.rs | 23 +- .../postgres/pg_operator.rs | 151 ++++++++ .../information_schema/postgres/pg_proc.rs | 5 + .../information_schema/postgres/pg_rewrite.rs | 123 +++++++ .../postgres/pg_tablespace.rs | 144 ++++++++ .../postgres/pg_timezone_abbrevs.rs | 120 +++++++ .../postgres/pg_timezone_names.rs | 127 +++++++ .../information_schema/postgres/pg_type.rs | 5 + .../postgres/pg_user_mapping.rs | 107 ++++++ .../cubesql/src/compile/engine/udf/common.rs | 172 ++++++++-- rust/cubesql/cubesql/src/compile/parser.rs | 3 + .../cubesql/src/compile/query_engine.rs | 4 + ...mpile__tests__pgcatalog_pgam_postgres.snap | 11 +- ...tests__pgcatalog_pgattribute_postgres.snap | Bin 106910 -> 109045 bytes ...le__tests__pgcatalog_pgclass_postgres.snap | 20 +- ...ests__pgcatalog_pgconstraint_postgres.snap | 10 +- ...sts__pgcatalog_pgdescription_postgres.snap | 168 ++++----- ...tests__pgcatalog_pgextension_postgres.snap | 10 +- ...le__tests__pgcatalog_pgindex_postgres.snap | 10 +- ...tests__pgcatalog_pgnamespace_postgres.snap | 18 +- ...ile__tests__pgcatalog_pgproc_postgres.snap | 103 +++--- ...ile__tests__pgcatalog_pgtype_postgres.snap | 210 ++++++------ ...ection__dbeaver_introspection_columns.snap | Bin 10254 -> 10401 bytes ...ion__dbeaver_introspection_namespaces.snap | 14 +- ...ntrospection_tables_with_descriptions.snap | 18 +- ...spection__dbeaver_introspection_types.snap | 175 +++++----- ...__test_introspection__pg_auth_members.snap | 8 + ...tion__pg_available_extension_versions.snap | 8 + ...le__test__test_introspection__pg_cast.snap | 8 + ..._test_introspection__pg_event_trigger.snap | 8 + ...ntrospection__pg_foreign_data_wrapper.snap | 8 + ...test_introspection__pg_foreign_server.snap | 8 + ..._test_introspection__pg_foreign_table.snap | 8 + ...test__test_introspection__pg_language.snap | 11 + ...e__test__test_introspection__pg_locks.snap | 8 + ...test__test_introspection__pg_operator.snap | 8 + ..._test__test_introspection__pg_rewrite.snap | 8 + ...st__test_introspection__pg_tablespace.snap | 10 + ...st_introspection__pg_timezone_abbrevs.snap | 9 + ...test_introspection__pg_timezone_names.snap | 9 + ...__test_introspection__pg_user_mapping.snap | 8 + ...ql__compile__test__test_udfs__age_xid.snap | 9 + ...compile__test__test_udfs__format_type.snap | 14 + ...est_udfs__pg_datetime_precision_types.snap | 14 + ...e__test__test_udfs__pg_is_in_recovery.snap | 9 + ...test_udfs__pg_numeric_precision_types.snap | 14 + ...st__test_udfs__pg_numeric_scale_types.snap | 14 + ...st__test_udfs__pg_tablespace_location.snap | 9 + ...__test__test_udfs__pg_type_is_visible.snap | 14 + ...ompile__test__test_udfs__txid_current.snap | 9 + .../src/compile/test/test_introspection.rs | 285 ++++++++++++++++ .../cubesql/src/compile/test/test_udfs.rs | 64 ++++ rust/cubesql/cubesql/src/sql/statement.rs | 16 +- rust/cubesql/pg-srv/src/pg_type.rs | 322 ++++++++++++++++++ rust/cubesqlplanner/Cargo.lock | 14 +- 80 files changed, 3589 insertions(+), 456 deletions(-) create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_auth_members.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_available_extension_versions.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_cast.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_event_trigger.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_data_wrapper.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_server.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_table.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_language.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_locks.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_operator.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_rewrite.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_tablespace.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_timezone_abbrevs.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_timezone_names.rs create mode 100644 rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_user_mapping.rs create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_auth_members.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_available_extension_versions.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_cast.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_event_trigger.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_data_wrapper.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_server.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_table.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_language.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_locks.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_operator.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_rewrite.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_tablespace.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_timezone_abbrevs.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_timezone_names.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_user_mapping.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__age_xid.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_is_in_recovery.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_tablespace_location.snap create mode 100644 rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__txid_current.snap diff --git a/packages/cubejs-backend-native/Cargo.lock b/packages/cubejs-backend-native/Cargo.lock index d62709e76cbb0..b4de3fae06139 100644 --- a/packages/cubejs-backend-native/Cargo.lock +++ b/packages/cubejs-backend-native/Cargo.lock @@ -714,7 +714,7 @@ dependencies = [ [[package]] name = "cube-ext" version = "1.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "arrow", "chrono", @@ -884,7 +884,7 @@ checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "datafusion" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -917,7 +917,7 @@ dependencies = [ [[package]] name = "datafusion-common" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "arrow", "ordered-float 2.10.1", @@ -928,7 +928,7 @@ dependencies = [ [[package]] name = "datafusion-data-access" version = "1.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "async-trait", "chrono", @@ -941,7 +941,7 @@ dependencies = [ [[package]] name = "datafusion-expr" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -952,7 +952,7 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -3209,7 +3209,7 @@ dependencies = [ [[package]] name = "sqlparser" version = "0.16.0" -source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=34f22de680caa5fe586def5b336d56efe43c8cc4#34f22de680caa5fe586def5b336d56efe43c8cc4" +source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=e14d5bf45367edd8679cbc15ccee56693da8e4fb#e14d5bf45367edd8679cbc15ccee56693da8e4fb" dependencies = [ "log", ] diff --git a/rust/cubenativeutils/Cargo.lock b/rust/cubenativeutils/Cargo.lock index 9fbd818a0bd8b..931fb867f7e80 100644 --- a/rust/cubenativeutils/Cargo.lock +++ b/rust/cubenativeutils/Cargo.lock @@ -623,7 +623,7 @@ dependencies = [ [[package]] name = "cube-ext" version = "1.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "arrow", "chrono", @@ -715,7 +715,7 @@ dependencies = [ [[package]] name = "datafusion" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -748,7 +748,7 @@ dependencies = [ [[package]] name = "datafusion-common" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "arrow", "ordered-float 2.10.1", @@ -759,7 +759,7 @@ dependencies = [ [[package]] name = "datafusion-data-access" version = "1.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "async-trait", "chrono", @@ -772,7 +772,7 @@ dependencies = [ [[package]] name = "datafusion-expr" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -783,7 +783,7 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -2796,7 +2796,7 @@ dependencies = [ [[package]] name = "sqlparser" version = "0.16.0" -source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=34f22de680caa5fe586def5b336d56efe43c8cc4#34f22de680caa5fe586def5b336d56efe43c8cc4" +source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=e14d5bf45367edd8679cbc15ccee56693da8e4fb#e14d5bf45367edd8679cbc15ccee56693da8e4fb" dependencies = [ "log", ] diff --git a/rust/cubesql/Cargo.lock b/rust/cubesql/Cargo.lock index 1681340c2bb7a..9fdd9795c99cf 100644 --- a/rust/cubesql/Cargo.lock +++ b/rust/cubesql/Cargo.lock @@ -722,7 +722,7 @@ dependencies = [ [[package]] name = "cube-ext" version = "1.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "arrow", "chrono", @@ -846,7 +846,7 @@ dependencies = [ [[package]] name = "datafusion" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -879,7 +879,7 @@ dependencies = [ [[package]] name = "datafusion-common" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "arrow", "ordered-float 2.10.0", @@ -890,7 +890,7 @@ dependencies = [ [[package]] name = "datafusion-data-access" version = "1.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "async-trait", "chrono", @@ -903,7 +903,7 @@ dependencies = [ [[package]] name = "datafusion-expr" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -914,7 +914,7 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -3002,7 +3002,7 @@ dependencies = [ [[package]] name = "sqlparser" version = "0.16.0" -source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=34f22de680caa5fe586def5b336d56efe43c8cc4#34f22de680caa5fe586def5b336d56efe43c8cc4" +source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=e14d5bf45367edd8679cbc15ccee56693da8e4fb#e14d5bf45367edd8679cbc15ccee56693da8e4fb" dependencies = [ "log", ] diff --git a/rust/cubesql/cubesql/Cargo.toml b/rust/cubesql/cubesql/Cargo.toml index f23b5d9aaf933..96c0f4bc2bf70 100644 --- a/rust/cubesql/cubesql/Cargo.toml +++ b/rust/cubesql/cubesql/Cargo.toml @@ -10,14 +10,14 @@ homepage = "https://cube.dev" [dependencies] arc-swap = "1" -datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6", default-features = false, features = [ +datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "016c22f74b82f241fc01abd205020cb52b6c911e", default-features = false, features = [ "regex_expressions", "unicode_expressions", ] } thiserror = "2" cubeclient = { path = "../cubeclient" } pg-srv = { path = "../pg-srv" } -sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "34f22de680caa5fe586def5b336d56efe43c8cc4" } +sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "e14d5bf45367edd8679cbc15ccee56693da8e4fb" } base64 = "0.13.0" tokio = { version = "^1.35", features = ["full", "rt", "tracing"] } serde = { version = "^1.0", features = ["derive"] } diff --git a/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_class.snap b/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_class.snap index 5fc3c2b3b0a29..71514dac32c7c 100644 --- a/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_class.snap +++ b/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_class.snap @@ -1,6 +1,5 @@ --- source: cubesql/e2e/tests/postgres.rs -assertion_line: 316 expression: "self.print_query_result(res, true, false).await" --- oid type: 23 (int4) @@ -36,4 +35,5 @@ relminmxid type: 23 (int4) relacl type: 25 (text) reloptions type: 25 (text) relpartbound type: 25 (text) +xmin type: 23 (int4) relhasoids type: 16 (bool) diff --git a/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_proc.snap b/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_proc.snap index 55684b7afbf8f..5e5b47cbf615a 100644 --- a/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_proc.snap +++ b/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_proc.snap @@ -1,6 +1,5 @@ --- source: cubesql/e2e/tests/postgres.rs -assertion_line: 316 expression: "self.print_query_result(res, true, false).await" --- oid type: 23 (int4) @@ -33,3 +32,4 @@ probin type: 25 (text) prosqlbody type: 25 (text) proconfig type: 25 (text) proacl type: 25 (text) +xmin type: 23 (int4) diff --git a/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_type.snap b/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_type.snap index 3de96a8c0e058..c4d3b4241e955 100644 --- a/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_type.snap +++ b/rust/cubesql/cubesql/e2e/tests/snapshots/e2e__tests__postgres__system_pg_catalog.pg_type.snap @@ -1,6 +1,5 @@ --- source: cubesql/e2e/tests/postgres.rs -assertion_line: 316 expression: "self.print_query_result(res, true, false).await" --- oid type: 23 (int4) @@ -35,3 +34,4 @@ typcollation type: 25 (text) typdefaultbin type: 25 (text) typdefault type: 25 (text) typacl type: 25 (text) +xmin type: 23 (int4) diff --git a/rust/cubesql/cubesql/src/compile/engine/context_postgresql.rs b/rust/cubesql/cubesql/src/compile/engine/context_postgresql.rs index b7952f7d32b18..b51db77398491 100644 --- a/rust/cubesql/cubesql/src/compile/engine/context_postgresql.rs +++ b/rust/cubesql/cubesql/src/compile/engine/context_postgresql.rs @@ -17,16 +17,21 @@ use super::information_schema::postgres::{ InfoSchemaSqlImplementationInfoProvider as PostgresInfoSchemaSqlImplementationInfoProvider, InfoSchemaSqlSizingProvider as PostgresInfoSchemaSqlSizingProvider, InfoSchemaTestingBlockingProvider, InfoSchemaTestingDatasetProvider, PgCatalogAmProvider, - PgCatalogAttrdefProvider, PgCatalogAttributeProvider, PgCatalogClassProvider, + PgCatalogAttrdefProvider, PgCatalogAttributeProvider, PgCatalogAuthMembersProvider, + PgCatalogAvailableExtensionVersionsProvider, PgCatalogCastProvider, PgCatalogClassProvider, PgCatalogConstraintProvider, PgCatalogDatabaseProvider, PgCatalogDependProvider, - PgCatalogDescriptionProvider, PgCatalogEnumProvider, PgCatalogExtensionProvider, - PgCatalogIndexProvider, PgCatalogInheritsProvider, PgCatalogMatviewsProvider, - PgCatalogNamespaceProvider, PgCatalogPartitionedTableProvider, PgCatalogProcProvider, - PgCatalogRangeProvider, PgCatalogRolesProvider, PgCatalogSequenceProvider, + PgCatalogDescriptionProvider, PgCatalogEnumProvider, PgCatalogEventTriggerProvider, + PgCatalogExtensionProvider, PgCatalogForeignDataWrapperProvider, + PgCatalogForeignServerProvider, PgCatalogForeignTableProvider, PgCatalogIndexProvider, + PgCatalogInheritsProvider, PgCatalogLanguageProvider, PgCatalogLocksProvider, + PgCatalogMatviewsProvider, PgCatalogNamespaceProvider, PgCatalogOperatorProvider, + PgCatalogPartitionedTableProvider, PgCatalogProcProvider, PgCatalogRangeProvider, + PgCatalogRewriteProvider, PgCatalogRolesProvider, PgCatalogSequenceProvider, PgCatalogSettingsProvider, PgCatalogShdescriptionProvider, PgCatalogStatActivityProvider, PgCatalogStatUserTablesProvider, PgCatalogStatioUserTablesProvider, PgCatalogStatsProvider, - PgCatalogTableProvider, PgCatalogTypeProvider, PgCatalogUserProvider, PgCatalogViewsProvider, - PgPreparedStatementsProvider, + PgCatalogTableProvider, PgCatalogTablespaceProvider, PgCatalogTimezoneAbbrevsProvider, + PgCatalogTimezoneNamesProvider, PgCatalogTypeProvider, PgCatalogUserMappingProvider, + PgCatalogUserProvider, PgCatalogViewsProvider, PgPreparedStatementsProvider, }; use crate::{ compile::{ @@ -138,6 +143,36 @@ impl DatabaseProtocol { "pg_catalog.pg_stat_user_tables".to_string() } else if let Some(_) = any.downcast_ref::() { "pg_catalog.pg_shdescription".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_locks".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_timezone_names".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_timezone_abbrevs".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_auth_members".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_tablespace".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_event_trigger".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_foreign_data_wrapper".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_foreign_server".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_user_mapping".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_available_extension_versions".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_language".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_cast".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_foreign_table".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_operator".to_string() + } else if let Some(_) = any.downcast_ref::() { + "pg_catalog.pg_rewrite".to_string() } else if let Some(_) = any.downcast_ref::() { "pg_catalog.pg_external_schema".to_string() } else if let Some(_) = any.downcast_ref::() { @@ -404,6 +439,31 @@ impl DatabaseProtocol { ))) } "pg_shdescription" => return Some(Arc::new(PgCatalogShdescriptionProvider::new())), + "pg_locks" => return Some(Arc::new(PgCatalogLocksProvider::new())), + "pg_timezone_names" => { + return Some(Arc::new(PgCatalogTimezoneNamesProvider::new())) + } + "pg_timezone_abbrevs" => { + return Some(Arc::new(PgCatalogTimezoneAbbrevsProvider::new())) + } + "pg_auth_members" => return Some(Arc::new(PgCatalogAuthMembersProvider::new())), + "pg_tablespace" => return Some(Arc::new(PgCatalogTablespaceProvider::new())), + "pg_event_trigger" => return Some(Arc::new(PgCatalogEventTriggerProvider::new())), + "pg_foreign_data_wrapper" => { + return Some(Arc::new(PgCatalogForeignDataWrapperProvider::new())) + } + "pg_foreign_server" => { + return Some(Arc::new(PgCatalogForeignServerProvider::new())) + } + "pg_user_mapping" => return Some(Arc::new(PgCatalogUserMappingProvider::new())), + "pg_available_extension_versions" => { + return Some(Arc::new(PgCatalogAvailableExtensionVersionsProvider::new())) + } + "pg_language" => return Some(Arc::new(PgCatalogLanguageProvider::new())), + "pg_cast" => return Some(Arc::new(PgCatalogCastProvider::new())), + "pg_foreign_table" => return Some(Arc::new(PgCatalogForeignTableProvider::new())), + "pg_operator" => return Some(Arc::new(PgCatalogOperatorProvider::new())), + "pg_rewrite" => return Some(Arc::new(PgCatalogRewriteProvider::new())), "pg_external_schema" => { return Some(Arc::new(RedshiftPgExternalSchemaProvider::new())) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/mod.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/mod.rs index 9b5e52bd30a67..7a589b083a2a9 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/mod.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/mod.rs @@ -16,21 +16,32 @@ pub mod views; mod pg_am; mod pg_attrdef; mod pg_attribute; +mod pg_auth_members; +mod pg_available_extension_versions; +mod pg_cast; mod pg_class; mod pg_constraint; mod pg_database; mod pg_depend; mod pg_description; mod pg_enum; +mod pg_event_trigger; mod pg_extension; +mod pg_foreign_data_wrapper; +mod pg_foreign_server; +mod pg_foreign_table; mod pg_index; mod pg_inherits; +mod pg_language; +mod pg_locks; mod pg_matviews; mod pg_namespace; +mod pg_operator; mod pg_partitioned_table; mod pg_prepared_statements; mod pg_proc; mod pg_range; +mod pg_rewrite; mod pg_roles; mod pg_sequence; mod pg_settings; @@ -40,8 +51,12 @@ mod pg_stat_user_tables; mod pg_statio_user_tables; mod pg_stats; mod pg_tables; +mod pg_tablespace; +mod pg_timezone_abbrevs; +mod pg_timezone_names; mod pg_type; mod pg_user; +mod pg_user_mapping; mod pg_views; mod role_column_grants; mod role_table_grants; @@ -52,21 +67,32 @@ use super::utils; pub use pg_am::*; pub use pg_attrdef::*; pub use pg_attribute::*; +pub use pg_auth_members::*; +pub use pg_available_extension_versions::*; +pub use pg_cast::*; pub use pg_class::*; pub use pg_constraint::*; pub use pg_database::*; pub use pg_depend::*; pub use pg_description::*; pub use pg_enum::*; +pub use pg_event_trigger::*; pub use pg_extension::*; +pub use pg_foreign_data_wrapper::*; +pub use pg_foreign_server::*; +pub use pg_foreign_table::*; pub use pg_index::*; pub use pg_inherits::*; +pub use pg_language::*; +pub use pg_locks::*; pub use pg_matviews::*; pub use pg_namespace::*; +pub use pg_operator::*; pub use pg_partitioned_table::*; pub use pg_prepared_statements::*; pub use pg_proc::*; pub use pg_range::*; +pub use pg_rewrite::*; pub use pg_roles::*; pub use pg_sequence::*; pub use pg_settings::*; @@ -76,8 +102,12 @@ pub use pg_stat_user_tables::*; pub use pg_statio_user_tables::*; pub use pg_stats::*; pub use pg_tables::*; +pub use pg_tablespace::*; +pub use pg_timezone_abbrevs::*; +pub use pg_timezone_names::*; pub use pg_type::*; pub use pg_user::*; +pub use pg_user_mapping::*; pub use pg_views::*; pub use role_column_grants::*; pub use role_table_grants::*; diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_am.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_am.rs index 81d77ad08c83e..cf5a1931a396f 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_am.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_am.rs @@ -18,6 +18,7 @@ struct PgCatalogAmBuilder { amname: StringBuilder, amhandler: StringBuilder, amtype: StringBuilder, + xmin: UInt32Builder, } impl PgCatalogAmBuilder { @@ -29,6 +30,7 @@ impl PgCatalogAmBuilder { amname: StringBuilder::new(capacity), amhandler: StringBuilder::new(capacity), amtype: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), } } @@ -38,6 +40,7 @@ impl PgCatalogAmBuilder { Arc::new(self.amname.finish()), Arc::new(self.amhandler.finish()), Arc::new(self.amtype.finish()), + Arc::new(self.xmin.finish()), ]; columns @@ -74,6 +77,7 @@ impl TableProvider for PgCatalogAmProvider { Field::new("amname", DataType::Utf8, false), Field::new("amhandler", DataType::Utf8, false), Field::new("amtype", DataType::Utf8, false), + Field::new("xmin", DataType::UInt32, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_attribute.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_attribute.rs index 2664af7fb7487..92478b77fa126 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_attribute.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_attribute.rs @@ -46,6 +46,7 @@ struct PgCatalogAttributeBuilder { attoptions: StringBuilder, attfdwoptions: StringBuilder, attmissingval: StringBuilder, + xmin: UInt32Builder, } impl PgCatalogAttributeBuilder { @@ -79,6 +80,7 @@ impl PgCatalogAttributeBuilder { attoptions: StringBuilder::new(capacity), attfdwoptions: StringBuilder::new(capacity), attmissingval: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), } } @@ -121,6 +123,7 @@ impl PgCatalogAttributeBuilder { self.attoptions.append_null().unwrap(); self.attfdwoptions.append_null().unwrap(); self.attmissingval.append_null().unwrap(); + self.xmin.append_value(1).unwrap(); } fn finish(mut self) -> Vec> { @@ -151,6 +154,7 @@ impl PgCatalogAttributeBuilder { Arc::new(self.attoptions.finish()), Arc::new(self.attfdwoptions.finish()), Arc::new(self.attmissingval.finish()), + Arc::new(self.xmin.finish()), ]; columns @@ -224,6 +228,7 @@ impl TableProvider for PgCatalogAttributeProvider { Field::new("attoptions", DataType::Utf8, true), Field::new("attfdwoptions", DataType::Utf8, true), Field::new("attmissingval", DataType::Utf8, true), + Field::new("xmin", DataType::UInt32, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_auth_members.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_auth_members.rs new file mode 100644 index 0000000000000..5fa54ca29f8c6 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_auth_members.rs @@ -0,0 +1,103 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, BooleanBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogAuthMembersBuilder { + roleid: UInt32Builder, + member: UInt32Builder, + grantor: UInt32Builder, + admin_option: BooleanBuilder, +} + +impl PgCatalogAuthMembersBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + roleid: UInt32Builder::new(capacity), + member: UInt32Builder::new(capacity), + grantor: UInt32Builder::new(capacity), + admin_option: BooleanBuilder::new(capacity), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.roleid.finish()), + Arc::new(self.member.finish()), + Arc::new(self.grantor.finish()), + Arc::new(self.admin_option.finish()), + ]; + + columns + } +} + +pub struct PgCatalogAuthMembersProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-auth-members.html +impl PgCatalogAuthMembersProvider { + pub fn new() -> Self { + let builder = PgCatalogAuthMembersBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogAuthMembersProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("roleid", DataType::UInt32, false), + Field::new("member", DataType::UInt32, false), + Field::new("grantor", DataType::UInt32, false), + Field::new("admin_option", DataType::Boolean, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_available_extension_versions.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_available_extension_versions.rs new file mode 100644 index 0000000000000..e35087541e6db --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_available_extension_versions.rs @@ -0,0 +1,127 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, BooleanBuilder, ListBuilder, StringBuilder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogAvailableExtensionVersionsBuilder { + name: StringBuilder, + version: StringBuilder, + installed: BooleanBuilder, + superuser: BooleanBuilder, + trusted: BooleanBuilder, + relocatable: BooleanBuilder, + schema: StringBuilder, + requires: ListBuilder, + comment: StringBuilder, +} + +impl PgCatalogAvailableExtensionVersionsBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + name: StringBuilder::new(capacity), + version: StringBuilder::new(capacity), + installed: BooleanBuilder::new(capacity), + superuser: BooleanBuilder::new(capacity), + trusted: BooleanBuilder::new(capacity), + relocatable: BooleanBuilder::new(capacity), + schema: StringBuilder::new(capacity), + requires: ListBuilder::new(StringBuilder::new(capacity)), + comment: StringBuilder::new(capacity), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.name.finish()), + Arc::new(self.version.finish()), + Arc::new(self.installed.finish()), + Arc::new(self.superuser.finish()), + Arc::new(self.trusted.finish()), + Arc::new(self.relocatable.finish()), + Arc::new(self.schema.finish()), + Arc::new(self.requires.finish()), + Arc::new(self.comment.finish()), + ]; + + columns + } +} + +pub struct PgCatalogAvailableExtensionVersionsProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/view-pg-available-extension-versions.html +impl PgCatalogAvailableExtensionVersionsProvider { + pub fn new() -> Self { + let builder = PgCatalogAvailableExtensionVersionsBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogAvailableExtensionVersionsProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("name", DataType::Utf8, false), + Field::new("version", DataType::Utf8, false), + Field::new("installed", DataType::Boolean, false), + Field::new("superuser", DataType::Boolean, false), + Field::new("trusted", DataType::Boolean, false), + Field::new("relocatable", DataType::Boolean, false), + Field::new("schema", DataType::Utf8, true), + Field::new( + "requires", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new("comment", DataType::Utf8, true), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_cast.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_cast.rs new file mode 100644 index 0000000000000..1d7fa41b841b0 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_cast.rs @@ -0,0 +1,115 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogCastBuilder { + oid: UInt32Builder, + castsource: UInt32Builder, + casttarget: UInt32Builder, + castfunc: UInt32Builder, + castcontext: StringBuilder, + castmethod: StringBuilder, + xmin: UInt32Builder, +} + +impl PgCatalogCastBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + oid: UInt32Builder::new(capacity), + castsource: UInt32Builder::new(capacity), + casttarget: UInt32Builder::new(capacity), + castfunc: UInt32Builder::new(capacity), + castcontext: StringBuilder::new(capacity), + castmethod: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.oid.finish()), + Arc::new(self.castsource.finish()), + Arc::new(self.casttarget.finish()), + Arc::new(self.castfunc.finish()), + Arc::new(self.castcontext.finish()), + Arc::new(self.castmethod.finish()), + Arc::new(self.xmin.finish()), + ]; + + columns + } +} + +pub struct PgCatalogCastProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-cast.html +impl PgCatalogCastProvider { + pub fn new() -> Self { + let builder = PgCatalogCastBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogCastProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("oid", DataType::UInt32, false), + Field::new("castsource", DataType::UInt32, false), + Field::new("casttarget", DataType::UInt32, false), + Field::new("castfunc", DataType::UInt32, false), + Field::new("castcontext", DataType::Utf8, false), + Field::new("castmethod", DataType::Utf8, false), + Field::new("xmin", DataType::UInt32, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_class.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_class.rs index 9c7ec75dcecc1..ee57c4a444298 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_class.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_class.rs @@ -78,6 +78,7 @@ struct PgCatalogClassBuilder { relacl: StringBuilder, reloptions: StringBuilder, relpartbound: StringBuilder, + xmin: UInt32Builder, // This column was removed after PostgreSQL 12, but it's required to support Tableau Desktop with ODBC // True if we generate an OID for each row of the relation relhasoids: BooleanBuilder, @@ -121,6 +122,7 @@ impl PgCatalogClassBuilder { relacl: StringBuilder::new(capacity), reloptions: StringBuilder::new(capacity), relpartbound: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), relhasoids: BooleanBuilder::new(capacity), } } @@ -161,6 +163,7 @@ impl PgCatalogClassBuilder { self.relacl.append_null().unwrap(); self.reloptions.append_null().unwrap(); self.relpartbound.append_null().unwrap(); + self.xmin.append_value(1).unwrap(); self.relhasoids.append_value(false).unwrap(); } @@ -199,6 +202,7 @@ impl PgCatalogClassBuilder { Arc::new(self.relacl.finish()), Arc::new(self.reloptions.finish()), Arc::new(self.relpartbound.finish()), + Arc::new(self.xmin.finish()), Arc::new(self.relhasoids.finish()), ]; @@ -317,6 +321,7 @@ impl TableProvider for PgCatalogClassProvider { Field::new("relacl", DataType::Utf8, true), Field::new("reloptions", DataType::Utf8, true), Field::new("relpartbound", DataType::Utf8, true), + Field::new("xmin", DataType::UInt32, false), Field::new("relhasoids", DataType::Boolean, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_constraint.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_constraint.rs index 46d1c7bce5eab..b55cfc6c5f153 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_constraint.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_constraint.rs @@ -43,6 +43,7 @@ struct PgCatalogConstraintBuilder { conffeqop: StringBuilder, conexclop: StringBuilder, conbin: StringBuilder, + xmin: UInt32Builder, } impl PgCatalogConstraintBuilder { @@ -75,6 +76,7 @@ impl PgCatalogConstraintBuilder { conffeqop: StringBuilder::new(capacity), conexclop: StringBuilder::new(capacity), conbin: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), } } @@ -105,6 +107,7 @@ impl PgCatalogConstraintBuilder { Arc::new(self.conffeqop.finish()), Arc::new(self.conexclop.finish()), Arc::new(self.conbin.finish()), + Arc::new(self.xmin.finish()), ]; columns @@ -170,6 +173,7 @@ impl TableProvider for PgCatalogConstraintProvider { Field::new("conffeqop", DataType::Utf8, true), Field::new("conexclop", DataType::Utf8, true), Field::new("conbin", DataType::Utf8, true), + Field::new("xmin", DataType::UInt32, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_description.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_description.rs index b3de6e0d25779..a370dd03cef4f 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_description.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_description.rs @@ -28,6 +28,7 @@ struct PgCatalogDescriptionBuilder { objsubid: Int32Builder, /// Arbitrary text that serves as the description of this object description: StringBuilder, + xmin: UInt32Builder, } impl PgCatalogDescriptionBuilder { @@ -39,6 +40,7 @@ impl PgCatalogDescriptionBuilder { classoid: UInt32Builder::new(capacity), objsubid: Int32Builder::new(capacity), description: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), } } @@ -47,6 +49,7 @@ impl PgCatalogDescriptionBuilder { self.classoid.append_value(PG_CLASS_CLASS_OID).unwrap(); self.objsubid.append_value(0).unwrap(); self.description.append_value(description).unwrap(); + self.xmin.append_value(1).unwrap(); } fn add_column(&mut self, table_oid: u32, column_idx: usize, description: impl AsRef) { @@ -57,6 +60,7 @@ impl PgCatalogDescriptionBuilder { .append_value(i32::try_from(column_idx).unwrap() + 1) .unwrap(); self.description.append_value(description).unwrap(); + self.xmin.append_value(1).unwrap(); } fn finish(mut self) -> Vec> { @@ -65,6 +69,7 @@ impl PgCatalogDescriptionBuilder { Arc::new(self.classoid.finish()), Arc::new(self.objsubid.finish()), Arc::new(self.description.finish()), + Arc::new(self.xmin.finish()), ]; columns @@ -113,6 +118,7 @@ impl TableProvider for PgCatalogDescriptionProvider { Field::new("classoid", DataType::UInt32, false), Field::new("objsubid", DataType::Int32, false), Field::new("description", DataType::Utf8, false), + Field::new("xmin", DataType::UInt32, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_event_trigger.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_event_trigger.rs new file mode 100644 index 0000000000000..a375d169b4059 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_event_trigger.rs @@ -0,0 +1,123 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, ListBuilder, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogEventTriggerBuilder { + oid: UInt32Builder, + evtname: StringBuilder, + evtevent: StringBuilder, + evtowner: UInt32Builder, + evtfoid: UInt32Builder, + evtenabled: StringBuilder, + evttags: ListBuilder, + xmin: UInt32Builder, +} + +impl PgCatalogEventTriggerBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + oid: UInt32Builder::new(capacity), + evtname: StringBuilder::new(capacity), + evtevent: StringBuilder::new(capacity), + evtowner: UInt32Builder::new(capacity), + evtfoid: UInt32Builder::new(capacity), + evtenabled: StringBuilder::new(capacity), + evttags: ListBuilder::new(StringBuilder::new(capacity)), + xmin: UInt32Builder::new(capacity), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.oid.finish()), + Arc::new(self.evtname.finish()), + Arc::new(self.evtevent.finish()), + Arc::new(self.evtowner.finish()), + Arc::new(self.evtfoid.finish()), + Arc::new(self.evtenabled.finish()), + Arc::new(self.evttags.finish()), + Arc::new(self.xmin.finish()), + ]; + + columns + } +} + +pub struct PgCatalogEventTriggerProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-event-trigger.html +impl PgCatalogEventTriggerProvider { + pub fn new() -> Self { + let builder = PgCatalogEventTriggerBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogEventTriggerProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("oid", DataType::UInt32, false), + Field::new("evtname", DataType::Utf8, false), + Field::new("evtevent", DataType::Utf8, false), + Field::new("evtowner", DataType::UInt32, false), + Field::new("evtfoid", DataType::UInt32, false), + Field::new("evtenabled", DataType::Utf8, false), + Field::new( + "evttags", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new("xmin", DataType::UInt32, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_extension.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_extension.rs index feed20c165805..2db70426963cd 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_extension.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_extension.rs @@ -23,6 +23,7 @@ struct PgCatalogExtensionBuilder { extversion: StringBuilder, extconfig: ListBuilder, extcondition: ListBuilder, + xmin: UInt32Builder, } impl PgCatalogExtensionBuilder { @@ -38,6 +39,7 @@ impl PgCatalogExtensionBuilder { extversion: StringBuilder::new(capacity), extconfig: ListBuilder::new(UInt32Builder::new(capacity)), extcondition: ListBuilder::new(StringBuilder::new(capacity)), + xmin: UInt32Builder::new(capacity), } } @@ -51,6 +53,7 @@ impl PgCatalogExtensionBuilder { Arc::new(self.extversion.finish()), Arc::new(self.extconfig.finish()), Arc::new(self.extcondition.finish()), + Arc::new(self.xmin.finish()), ]; columns @@ -99,6 +102,7 @@ impl TableProvider for PgCatalogExtensionProvider { DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), true, ), + Field::new("xmin", DataType::UInt32, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_data_wrapper.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_data_wrapper.rs new file mode 100644 index 0000000000000..3381aee62d92c --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_data_wrapper.rs @@ -0,0 +1,127 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, ListBuilder, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogForeignDataWrapperBuilder { + oid: UInt32Builder, + fdwname: StringBuilder, + fdwowner: UInt32Builder, + fdwhandler: UInt32Builder, + fdwvalidator: UInt32Builder, + fdwacl: ListBuilder, + fdwoptions: ListBuilder, + xmin: UInt32Builder, +} + +impl PgCatalogForeignDataWrapperBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + oid: UInt32Builder::new(capacity), + fdwname: StringBuilder::new(capacity), + fdwowner: UInt32Builder::new(capacity), + fdwhandler: UInt32Builder::new(capacity), + fdwvalidator: UInt32Builder::new(capacity), + fdwacl: ListBuilder::new(StringBuilder::new(capacity)), + fdwoptions: ListBuilder::new(StringBuilder::new(capacity)), + xmin: UInt32Builder::new(capacity), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.oid.finish()), + Arc::new(self.fdwname.finish()), + Arc::new(self.fdwowner.finish()), + Arc::new(self.fdwhandler.finish()), + Arc::new(self.fdwvalidator.finish()), + Arc::new(self.fdwacl.finish()), + Arc::new(self.fdwoptions.finish()), + Arc::new(self.xmin.finish()), + ]; + + columns + } +} + +pub struct PgCatalogForeignDataWrapperProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-foreign-data-wrapper.html +impl PgCatalogForeignDataWrapperProvider { + pub fn new() -> Self { + let builder = PgCatalogForeignDataWrapperBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogForeignDataWrapperProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("oid", DataType::UInt32, false), + Field::new("fdwname", DataType::Utf8, false), + Field::new("fdwowner", DataType::UInt32, false), + Field::new("fdwhandler", DataType::UInt32, false), + Field::new("fdwvalidator", DataType::UInt32, false), + Field::new( + "fdwacl", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new( + "fdwoptions", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new("xmin", DataType::UInt32, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_server.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_server.rs new file mode 100644 index 0000000000000..0d97adb233914 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_server.rs @@ -0,0 +1,131 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, ListBuilder, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogForeignServerBuilder { + oid: UInt32Builder, + srvname: StringBuilder, + srvowner: UInt32Builder, + srvfdw: UInt32Builder, + srvtype: StringBuilder, + srvversion: StringBuilder, + srvacl: ListBuilder, + srvoptions: ListBuilder, + xmin: UInt32Builder, +} + +impl PgCatalogForeignServerBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + oid: UInt32Builder::new(capacity), + srvname: StringBuilder::new(capacity), + srvowner: UInt32Builder::new(capacity), + srvfdw: UInt32Builder::new(capacity), + srvtype: StringBuilder::new(capacity), + srvversion: StringBuilder::new(capacity), + srvacl: ListBuilder::new(StringBuilder::new(capacity)), + srvoptions: ListBuilder::new(StringBuilder::new(capacity)), + xmin: UInt32Builder::new(capacity), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.oid.finish()), + Arc::new(self.srvname.finish()), + Arc::new(self.srvowner.finish()), + Arc::new(self.srvfdw.finish()), + Arc::new(self.srvtype.finish()), + Arc::new(self.srvversion.finish()), + Arc::new(self.srvacl.finish()), + Arc::new(self.srvoptions.finish()), + Arc::new(self.xmin.finish()), + ]; + + columns + } +} + +pub struct PgCatalogForeignServerProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-foreign-server.html +impl PgCatalogForeignServerProvider { + pub fn new() -> Self { + let builder = PgCatalogForeignServerBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogForeignServerProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("oid", DataType::UInt32, false), + Field::new("srvname", DataType::Utf8, false), + Field::new("srvowner", DataType::UInt32, false), + Field::new("srvfdw", DataType::UInt32, false), + Field::new("srvtype", DataType::Utf8, true), + Field::new("srvversion", DataType::Utf8, true), + Field::new( + "srvacl", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new( + "srvoptions", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new("xmin", DataType::UInt32, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_table.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_table.rs new file mode 100644 index 0000000000000..b53aec1128ee5 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_foreign_table.rs @@ -0,0 +1,103 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, ListBuilder, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogForeignTableBuilder { + ftrelid: UInt32Builder, + ftserver: UInt32Builder, + ftoptions: ListBuilder, +} + +impl PgCatalogForeignTableBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + ftrelid: UInt32Builder::new(capacity), + ftserver: UInt32Builder::new(capacity), + ftoptions: ListBuilder::new(StringBuilder::new(capacity)), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.ftrelid.finish()), + Arc::new(self.ftserver.finish()), + Arc::new(self.ftoptions.finish()), + ]; + + columns + } +} + +pub struct PgCatalogForeignTableProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-foreign-table.html +impl PgCatalogForeignTableProvider { + pub fn new() -> Self { + let builder = PgCatalogForeignTableBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogForeignTableProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("ftrelid", DataType::UInt32, false), + Field::new("ftserver", DataType::UInt32, false), + Field::new( + "ftoptions", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_index.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_index.rs index 45839de1d7fd7..db12036d71cef 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_index.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_index.rs @@ -37,6 +37,7 @@ struct PgCatalogIndexBuilder { indoption: ListBuilder, indexprs: StringBuilder, indpred: StringBuilder, + xmin: UInt32Builder, } impl PgCatalogIndexBuilder { @@ -64,6 +65,7 @@ impl PgCatalogIndexBuilder { indoption: ListBuilder::new(Int16Builder::new(capacity)), indexprs: StringBuilder::new(capacity), indpred: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), } } @@ -89,6 +91,7 @@ impl PgCatalogIndexBuilder { Arc::new(self.indoption.finish()), Arc::new(self.indexprs.finish()), Arc::new(self.indpred.finish()), + Arc::new(self.xmin.finish()), ]; columns @@ -157,6 +160,7 @@ impl TableProvider for PgCatalogIndexProvider { ), Field::new("indexprs", DataType::Utf8, true), Field::new("indpred", DataType::Utf8, true), + Field::new("xmin", DataType::UInt32, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_language.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_language.rs new file mode 100644 index 0000000000000..835782012cb7e --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_language.rs @@ -0,0 +1,185 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, BooleanBuilder, ListBuilder, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgLanguage { + oid: u32, + lanname: &'static str, + lanowner: u32, + lanispl: bool, + lanpltrusted: bool, + lanplcallfoid: u32, + laninline: u32, + lanvalidator: u32, +} + +struct PgCatalogLanguageBuilder { + oid: UInt32Builder, + lanname: StringBuilder, + lanowner: UInt32Builder, + lanispl: BooleanBuilder, + lanpltrusted: BooleanBuilder, + lanplcallfoid: UInt32Builder, + laninline: UInt32Builder, + lanvalidator: UInt32Builder, + lanacl: ListBuilder, + xmin: UInt32Builder, +} + +impl PgCatalogLanguageBuilder { + fn new() -> Self { + let capacity = 3; + + Self { + oid: UInt32Builder::new(capacity), + lanname: StringBuilder::new(capacity), + lanowner: UInt32Builder::new(capacity), + lanispl: BooleanBuilder::new(capacity), + lanpltrusted: BooleanBuilder::new(capacity), + lanplcallfoid: UInt32Builder::new(capacity), + laninline: UInt32Builder::new(capacity), + lanvalidator: UInt32Builder::new(capacity), + lanacl: ListBuilder::new(StringBuilder::new(capacity)), + xmin: UInt32Builder::new(capacity), + } + } + + fn add_language(&mut self, lan: &PgLanguage) { + self.oid.append_value(lan.oid).unwrap(); + self.lanname.append_value(lan.lanname).unwrap(); + self.lanowner.append_value(lan.lanowner).unwrap(); + self.lanispl.append_value(lan.lanispl).unwrap(); + self.lanpltrusted.append_value(lan.lanpltrusted).unwrap(); + self.lanplcallfoid.append_value(lan.lanplcallfoid).unwrap(); + self.laninline.append_value(lan.laninline).unwrap(); + self.lanvalidator.append_value(lan.lanvalidator).unwrap(); + self.lanacl.append(false).unwrap(); + self.xmin.append_value(1).unwrap(); + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.oid.finish()), + Arc::new(self.lanname.finish()), + Arc::new(self.lanowner.finish()), + Arc::new(self.lanispl.finish()), + Arc::new(self.lanpltrusted.finish()), + Arc::new(self.lanplcallfoid.finish()), + Arc::new(self.laninline.finish()), + Arc::new(self.lanvalidator.finish()), + Arc::new(self.lanacl.finish()), + Arc::new(self.xmin.finish()), + ]; + + columns + } +} + +pub struct PgCatalogLanguageProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-language.html +impl PgCatalogLanguageProvider { + pub fn new() -> Self { + let mut builder = PgCatalogLanguageBuilder::new(); + builder.add_language(&PgLanguage { + oid: 12, + lanname: "internal", + lanowner: 10, + lanispl: false, + lanpltrusted: false, + lanplcallfoid: 0, + laninline: 0, + lanvalidator: 2246, + }); + builder.add_language(&PgLanguage { + oid: 13, + lanname: "c", + lanowner: 10, + lanispl: false, + lanpltrusted: false, + lanplcallfoid: 0, + laninline: 0, + lanvalidator: 2247, + }); + builder.add_language(&PgLanguage { + oid: 14, + lanname: "sql", + lanowner: 10, + lanispl: false, + lanpltrusted: true, + lanplcallfoid: 0, + laninline: 0, + lanvalidator: 2248, + }); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogLanguageProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("oid", DataType::UInt32, false), + Field::new("lanname", DataType::Utf8, false), + Field::new("lanowner", DataType::UInt32, false), + Field::new("lanispl", DataType::Boolean, false), + Field::new("lanpltrusted", DataType::Boolean, false), + Field::new("lanplcallfoid", DataType::UInt32, false), + Field::new("laninline", DataType::UInt32, false), + Field::new("lanvalidator", DataType::UInt32, false), + Field::new( + "lanacl", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new("xmin", DataType::UInt32, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_locks.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_locks.rs new file mode 100644 index 0000000000000..462df8066ed93 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_locks.rs @@ -0,0 +1,158 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{ + Array, ArrayRef, BooleanBuilder, Int16Builder, Int32Builder, StringBuilder, + TimestampNanosecondBuilder, UInt32Builder, + }, + datatypes::{DataType, Field, Schema, SchemaRef, TimeUnit}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogLocksBuilder { + locktype: StringBuilder, + database: UInt32Builder, + relation: UInt32Builder, + page: Int32Builder, + tuple: Int16Builder, + virtualxid: StringBuilder, + transactionid: UInt32Builder, + classid: UInt32Builder, + objid: UInt32Builder, + objsubid: Int16Builder, + virtualtransaction: StringBuilder, + pid: Int32Builder, + mode: StringBuilder, + granted: BooleanBuilder, + fastpath: BooleanBuilder, + waitstart: TimestampNanosecondBuilder, +} + +impl PgCatalogLocksBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + locktype: StringBuilder::new(capacity), + database: UInt32Builder::new(capacity), + relation: UInt32Builder::new(capacity), + page: Int32Builder::new(capacity), + tuple: Int16Builder::new(capacity), + virtualxid: StringBuilder::new(capacity), + transactionid: UInt32Builder::new(capacity), + classid: UInt32Builder::new(capacity), + objid: UInt32Builder::new(capacity), + objsubid: Int16Builder::new(capacity), + virtualtransaction: StringBuilder::new(capacity), + pid: Int32Builder::new(capacity), + mode: StringBuilder::new(capacity), + granted: BooleanBuilder::new(capacity), + fastpath: BooleanBuilder::new(capacity), + waitstart: TimestampNanosecondBuilder::new(capacity), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.locktype.finish()), + Arc::new(self.database.finish()), + Arc::new(self.relation.finish()), + Arc::new(self.page.finish()), + Arc::new(self.tuple.finish()), + Arc::new(self.virtualxid.finish()), + Arc::new(self.transactionid.finish()), + Arc::new(self.classid.finish()), + Arc::new(self.objid.finish()), + Arc::new(self.objsubid.finish()), + Arc::new(self.virtualtransaction.finish()), + Arc::new(self.pid.finish()), + Arc::new(self.mode.finish()), + Arc::new(self.granted.finish()), + Arc::new(self.fastpath.finish()), + Arc::new(self.waitstart.finish()), + ]; + + columns + } +} + +pub struct PgCatalogLocksProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/view-pg-locks.html +impl PgCatalogLocksProvider { + pub fn new() -> Self { + let builder = PgCatalogLocksBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogLocksProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("locktype", DataType::Utf8, true), + Field::new("database", DataType::UInt32, true), + Field::new("relation", DataType::UInt32, true), + Field::new("page", DataType::Int32, true), + Field::new("tuple", DataType::Int16, true), + Field::new("virtualxid", DataType::Utf8, true), + Field::new("transactionid", DataType::UInt32, true), + Field::new("classid", DataType::UInt32, true), + Field::new("objid", DataType::UInt32, true), + Field::new("objsubid", DataType::Int16, true), + Field::new("virtualtransaction", DataType::Utf8, true), + Field::new("pid", DataType::Int32, true), + Field::new("mode", DataType::Utf8, true), + Field::new("granted", DataType::Boolean, true), + Field::new("fastpath", DataType::Boolean, true), + Field::new( + "waitstart", + DataType::Timestamp(TimeUnit::Nanosecond, None), + true, + ), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_namespace.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_namespace.rs index efd17ef01a5af..76dd681ad4392 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_namespace.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_namespace.rs @@ -4,7 +4,7 @@ use async_trait::async_trait; use datafusion::{ arrow::{ - array::{Array, ArrayRef, StringBuilder, UInt32Builder}, + array::{Array, ArrayRef, ListBuilder, StringBuilder, UInt32Builder}, datatypes::{DataType, Field, Schema, SchemaRef}, record_batch::RecordBatch, }, @@ -25,14 +25,14 @@ struct PgNamespace { oid: u32, nspname: &'static str, nspowner: u32, - nspacl: &'static str, } struct PgCatalogNamespaceBuilder { oid: UInt32Builder, nspname: StringBuilder, nspowner: UInt32Builder, - nspacl: StringBuilder, + nspacl: ListBuilder, + xmin: UInt32Builder, } impl PgCatalogNamespaceBuilder { @@ -43,7 +43,8 @@ impl PgCatalogNamespaceBuilder { oid: UInt32Builder::new(capacity), nspname: StringBuilder::new(capacity), nspowner: UInt32Builder::new(capacity), - nspacl: StringBuilder::new(capacity), + nspacl: ListBuilder::new(StringBuilder::new(capacity)), + xmin: UInt32Builder::new(capacity), } } @@ -51,7 +52,8 @@ impl PgCatalogNamespaceBuilder { self.oid.append_value(ns.oid).unwrap(); self.nspname.append_value(ns.nspname).unwrap(); self.nspowner.append_value(ns.nspowner).unwrap(); - self.nspacl.append_value(ns.nspacl).unwrap(); + self.nspacl.append(false).unwrap(); + self.xmin.append_value(1).unwrap(); } fn finish(mut self) -> Vec> { @@ -60,6 +62,7 @@ impl PgCatalogNamespaceBuilder { Arc::new(self.nspname.finish()), Arc::new(self.nspowner.finish()), Arc::new(self.nspacl.finish()), + Arc::new(self.xmin.finish()), ]; columns @@ -77,19 +80,16 @@ impl PgCatalogNamespaceProvider { oid: PG_NAMESPACE_CATALOG_OID, nspname: "pg_catalog", nspowner: 10, - nspacl: "{test=UC/test,=U/test}", }); builder.add_namespace(&PgNamespace { oid: PG_NAMESPACE_PUBLIC_OID, nspname: "public", nspowner: 10, - nspacl: "{test=UC/test,=U/test}", }); builder.add_namespace(&PgNamespace { oid: 13000, nspname: "information_schema", nspowner: 10, - nspacl: "{test=UC/test,=U/test}", }); Self { @@ -113,7 +113,12 @@ impl TableProvider for PgCatalogNamespaceProvider { Field::new("oid", DataType::UInt32, false), Field::new("nspname", DataType::Utf8, false), Field::new("nspowner", DataType::UInt32, false), - Field::new("nspacl", DataType::Utf8, true), + Field::new( + "nspacl", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new("xmin", DataType::UInt32, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_operator.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_operator.rs new file mode 100644 index 0000000000000..5f3a3c3e41079 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_operator.rs @@ -0,0 +1,151 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, BooleanBuilder, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogOperatorBuilder { + oid: UInt32Builder, + oprname: StringBuilder, + oprnamespace: UInt32Builder, + oprowner: UInt32Builder, + oprkind: StringBuilder, + oprcanmerge: BooleanBuilder, + oprcanhash: BooleanBuilder, + oprleft: UInt32Builder, + oprright: UInt32Builder, + oprresult: UInt32Builder, + oprcom: UInt32Builder, + oprnegate: UInt32Builder, + oprcode: StringBuilder, + oprrest: StringBuilder, + oprjoin: StringBuilder, + xmin: UInt32Builder, +} + +impl PgCatalogOperatorBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + oid: UInt32Builder::new(capacity), + oprname: StringBuilder::new(capacity), + oprnamespace: UInt32Builder::new(capacity), + oprowner: UInt32Builder::new(capacity), + oprkind: StringBuilder::new(capacity), + oprcanmerge: BooleanBuilder::new(capacity), + oprcanhash: BooleanBuilder::new(capacity), + oprleft: UInt32Builder::new(capacity), + oprright: UInt32Builder::new(capacity), + oprresult: UInt32Builder::new(capacity), + oprcom: UInt32Builder::new(capacity), + oprnegate: UInt32Builder::new(capacity), + oprcode: StringBuilder::new(capacity), + oprrest: StringBuilder::new(capacity), + oprjoin: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.oid.finish()), + Arc::new(self.oprname.finish()), + Arc::new(self.oprnamespace.finish()), + Arc::new(self.oprowner.finish()), + Arc::new(self.oprkind.finish()), + Arc::new(self.oprcanmerge.finish()), + Arc::new(self.oprcanhash.finish()), + Arc::new(self.oprleft.finish()), + Arc::new(self.oprright.finish()), + Arc::new(self.oprresult.finish()), + Arc::new(self.oprcom.finish()), + Arc::new(self.oprnegate.finish()), + Arc::new(self.oprcode.finish()), + Arc::new(self.oprrest.finish()), + Arc::new(self.oprjoin.finish()), + Arc::new(self.xmin.finish()), + ]; + + columns + } +} + +pub struct PgCatalogOperatorProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-operator.html +impl PgCatalogOperatorProvider { + pub fn new() -> Self { + let builder = PgCatalogOperatorBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogOperatorProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("oid", DataType::UInt32, false), + Field::new("oprname", DataType::Utf8, false), + Field::new("oprnamespace", DataType::UInt32, false), + Field::new("oprowner", DataType::UInt32, false), + Field::new("oprkind", DataType::Utf8, false), + Field::new("oprcanmerge", DataType::Boolean, false), + Field::new("oprcanhash", DataType::Boolean, false), + Field::new("oprleft", DataType::UInt32, false), + Field::new("oprright", DataType::UInt32, false), + Field::new("oprresult", DataType::UInt32, false), + Field::new("oprcom", DataType::UInt32, false), + Field::new("oprnegate", DataType::UInt32, false), + Field::new("oprcode", DataType::Utf8, false), + Field::new("oprrest", DataType::Utf8, false), + Field::new("oprjoin", DataType::Utf8, false), + Field::new("xmin", DataType::UInt32, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_proc.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_proc.rs index 6e2936a328781..85c2281920627 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_proc.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_proc.rs @@ -65,6 +65,7 @@ struct PgCatalogProcBuilder { prosqlbody: StringBuilder, proconfig: StringBuilder, proacl: StringBuilder, + xmin: UInt32Builder, } impl PgCatalogProcBuilder { @@ -102,6 +103,7 @@ impl PgCatalogProcBuilder { prosqlbody: StringBuilder::new(capacity), proconfig: StringBuilder::new(capacity), proacl: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), } } @@ -150,6 +152,7 @@ impl PgCatalogProcBuilder { self.prosqlbody.append_null().unwrap(); self.proconfig.append_null().unwrap(); self.proacl.append_null().unwrap(); + self.xmin.append_value(1).unwrap(); } fn finish(mut self) -> Vec> { @@ -184,6 +187,7 @@ impl PgCatalogProcBuilder { Arc::new(self.prosqlbody.finish()), Arc::new(self.proconfig.finish()), Arc::new(self.proacl.finish()), + Arc::new(self.xmin.finish()), ]; columns @@ -793,6 +797,7 @@ impl TableProvider for PgCatalogProcProvider { Field::new("prosqlbody", DataType::Utf8, true), Field::new("proconfig", DataType::Utf8, true), Field::new("proacl", DataType::Utf8, true), + Field::new("xmin", DataType::UInt32, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_rewrite.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_rewrite.rs new file mode 100644 index 0000000000000..808a0cf286e8e --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_rewrite.rs @@ -0,0 +1,123 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, BooleanBuilder, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogRewriteBuilder { + oid: UInt32Builder, + rulename: StringBuilder, + ev_class: UInt32Builder, + ev_type: StringBuilder, + ev_enabled: StringBuilder, + is_instead: BooleanBuilder, + ev_qual: StringBuilder, // FIXME: actual type "pg_node_tree" + ev_action: StringBuilder, // FIXME: actual type "pg_node_tree" + xmin: UInt32Builder, +} + +impl PgCatalogRewriteBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + oid: UInt32Builder::new(capacity), + rulename: StringBuilder::new(capacity), + ev_class: UInt32Builder::new(capacity), + ev_type: StringBuilder::new(capacity), + ev_enabled: StringBuilder::new(capacity), + is_instead: BooleanBuilder::new(capacity), + ev_qual: StringBuilder::new(capacity), + ev_action: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.oid.finish()), + Arc::new(self.rulename.finish()), + Arc::new(self.ev_class.finish()), + Arc::new(self.ev_type.finish()), + Arc::new(self.ev_enabled.finish()), + Arc::new(self.is_instead.finish()), + Arc::new(self.ev_qual.finish()), + Arc::new(self.ev_action.finish()), + Arc::new(self.xmin.finish()), + ]; + + columns + } +} + +pub struct PgCatalogRewriteProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-rewrite.html +impl PgCatalogRewriteProvider { + pub fn new() -> Self { + let builder = PgCatalogRewriteBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogRewriteProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("oid", DataType::UInt32, false), + Field::new("rulename", DataType::Utf8, false), + Field::new("ev_class", DataType::UInt32, false), + Field::new("ev_type", DataType::Utf8, false), + Field::new("ev_enabled", DataType::Utf8, false), + Field::new("is_instead", DataType::Boolean, false), + Field::new("ev_qual", DataType::Utf8, false), + Field::new("ev_action", DataType::Utf8, false), + Field::new("xmin", DataType::UInt32, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_tablespace.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_tablespace.rs new file mode 100644 index 0000000000000..868f06ea1381a --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_tablespace.rs @@ -0,0 +1,144 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, ListBuilder, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgTablespace { + oid: u32, + spcname: &'static str, + spcowner: u32, +} + +struct PgCatalogTablespaceBuilder { + oid: UInt32Builder, + spcname: StringBuilder, + spcowner: UInt32Builder, + spcacl: ListBuilder, + spcoptions: ListBuilder, + xmin: UInt32Builder, +} + +impl PgCatalogTablespaceBuilder { + fn new() -> Self { + let capacity = 2; + + Self { + oid: UInt32Builder::new(capacity), + spcname: StringBuilder::new(capacity), + spcowner: UInt32Builder::new(capacity), + spcacl: ListBuilder::new(StringBuilder::new(capacity)), + spcoptions: ListBuilder::new(StringBuilder::new(capacity)), + xmin: UInt32Builder::new(capacity), + } + } + + fn add_tablespace(&mut self, ts: &PgTablespace) { + self.oid.append_value(ts.oid).unwrap(); + self.spcname.append_value(ts.spcname).unwrap(); + self.spcowner.append_value(ts.spcowner).unwrap(); + self.spcacl.append(false).unwrap(); + self.spcoptions.append(false).unwrap(); + self.xmin.append_value(1).unwrap(); + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.oid.finish()), + Arc::new(self.spcname.finish()), + Arc::new(self.spcowner.finish()), + Arc::new(self.spcacl.finish()), + Arc::new(self.spcoptions.finish()), + Arc::new(self.xmin.finish()), + ]; + + columns + } +} + +pub struct PgCatalogTablespaceProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-tablespace.html +impl PgCatalogTablespaceProvider { + pub fn new() -> Self { + let mut builder = PgCatalogTablespaceBuilder::new(); + builder.add_tablespace(&PgTablespace { + oid: 1663, + spcname: "pg_default", + spcowner: 10, + }); + builder.add_tablespace(&PgTablespace { + oid: 1664, + spcname: "pg_global", + spcowner: 10, + }); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogTablespaceProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("oid", DataType::UInt32, false), + Field::new("spcname", DataType::Utf8, false), + Field::new("spcowner", DataType::UInt32, false), + Field::new( + "spcacl", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new( + "spcoptions", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + Field::new("xmin", DataType::UInt32, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_timezone_abbrevs.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_timezone_abbrevs.rs new file mode 100644 index 0000000000000..7078170cf46d5 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_timezone_abbrevs.rs @@ -0,0 +1,120 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, BooleanBuilder, IntervalMonthDayNanoBuilder, StringBuilder}, + datatypes::{DataType, Field, IntervalMonthDayNanoType, IntervalUnit, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgTimezoneAbbrev { + abbrev: &'static str, + utc_offset: i128, // IntervalMonthDayNano + is_dst: bool, +} + +struct PgCatalogTimezoneAbbrevsBuilder { + abbrev: StringBuilder, + utc_offset: IntervalMonthDayNanoBuilder, + is_dst: BooleanBuilder, +} + +impl PgCatalogTimezoneAbbrevsBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + abbrev: StringBuilder::new(capacity), + utc_offset: IntervalMonthDayNanoBuilder::new(capacity), + is_dst: BooleanBuilder::new(capacity), + } + } + + fn add_timezone_abbrev(&mut self, tzabbrev: &PgTimezoneAbbrev) { + self.abbrev.append_value(tzabbrev.abbrev).unwrap(); + self.utc_offset.append_value(tzabbrev.utc_offset).unwrap(); + self.is_dst.append_value(tzabbrev.is_dst).unwrap(); + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.abbrev.finish()), + Arc::new(self.utc_offset.finish()), + Arc::new(self.is_dst.finish()), + ]; + + columns + } +} + +pub struct PgCatalogTimezoneAbbrevsProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/view-pg-timezone-abbrevs.html +impl PgCatalogTimezoneAbbrevsProvider { + pub fn new() -> Self { + let mut builder = PgCatalogTimezoneAbbrevsBuilder::new(); + builder.add_timezone_abbrev(&PgTimezoneAbbrev { + abbrev: "UTC", + utc_offset: IntervalMonthDayNanoType::make_value(0, 0, 0), + is_dst: false, + }); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogTimezoneAbbrevsProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("abbrev", DataType::Utf8, false), + Field::new( + "utc_offset", + DataType::Interval(IntervalUnit::MonthDayNano), + false, + ), + Field::new("is_dst", DataType::Boolean, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_timezone_names.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_timezone_names.rs new file mode 100644 index 0000000000000..1f9122623cff4 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_timezone_names.rs @@ -0,0 +1,127 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, BooleanBuilder, IntervalMonthDayNanoBuilder, StringBuilder}, + datatypes::{DataType, Field, IntervalMonthDayNanoType, IntervalUnit, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgTimezoneName { + name: &'static str, + abbrev: &'static str, + utc_offset: i128, // IntervalMonthDayNano + is_dst: bool, +} + +struct PgCatalogTimezoneNamesBuilder { + name: StringBuilder, + abbrev: StringBuilder, + utc_offset: IntervalMonthDayNanoBuilder, + is_dst: BooleanBuilder, +} + +impl PgCatalogTimezoneNamesBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + name: StringBuilder::new(capacity), + abbrev: StringBuilder::new(capacity), + utc_offset: IntervalMonthDayNanoBuilder::new(capacity), + is_dst: BooleanBuilder::new(capacity), + } + } + + fn add_timezone_name(&mut self, tzname: &PgTimezoneName) { + self.name.append_value(tzname.name).unwrap(); + self.abbrev.append_value(tzname.abbrev).unwrap(); + self.utc_offset.append_value(tzname.utc_offset).unwrap(); + self.is_dst.append_value(tzname.is_dst).unwrap(); + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.name.finish()), + Arc::new(self.abbrev.finish()), + Arc::new(self.utc_offset.finish()), + Arc::new(self.is_dst.finish()), + ]; + + columns + } +} + +pub struct PgCatalogTimezoneNamesProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/view-pg-timezone-names.html +impl PgCatalogTimezoneNamesProvider { + pub fn new() -> Self { + let mut builder = PgCatalogTimezoneNamesBuilder::new(); + builder.add_timezone_name(&PgTimezoneName { + name: "UTC", + abbrev: "UTC", + utc_offset: IntervalMonthDayNanoType::make_value(0, 0, 0), + is_dst: false, + }); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogTimezoneNamesProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("name", DataType::Utf8, false), + Field::new("abbrev", DataType::Utf8, false), + Field::new( + "utc_offset", + DataType::Interval(IntervalUnit::MonthDayNano), + false, + ), + Field::new("is_dst", DataType::Boolean, false), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_type.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_type.rs index c3608efad2f5f..445064ef28804 100644 --- a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_type.rs +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_type.rs @@ -59,6 +59,7 @@ struct PgCatalogTypeBuilder { typdefaultbin: StringBuilder, typdefault: StringBuilder, typacl: StringBuilder, + xmin: UInt32Builder, } impl PgCatalogTypeBuilder { @@ -100,6 +101,7 @@ impl PgCatalogTypeBuilder { typdefaultbin: StringBuilder::new(capacity), typdefault: StringBuilder::new(capacity), typacl: StringBuilder::new(capacity), + xmin: UInt32Builder::new(capacity), } } @@ -137,6 +139,7 @@ impl PgCatalogTypeBuilder { self.typdefaultbin.append_null().unwrap(); self.typdefault.append_null().unwrap(); self.typacl.append_null().unwrap(); + self.xmin.append_value(1).unwrap(); } fn finish(mut self) -> Vec> { @@ -173,6 +176,7 @@ impl PgCatalogTypeBuilder { Arc::new(self.typdefaultbin.finish()), Arc::new(self.typdefault.finish()), Arc::new(self.typacl.finish()), + Arc::new(self.xmin.finish()), ]; columns @@ -297,6 +301,7 @@ impl TableProvider for PgCatalogTypeProvider { Field::new("typdefaultbin", DataType::Utf8, true), Field::new("typdefault", DataType::Utf8, true), Field::new("typacl", DataType::Utf8, true), + Field::new("xmin", DataType::UInt32, false), ])) } diff --git a/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_user_mapping.rs b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_user_mapping.rs new file mode 100644 index 0000000000000..073eb199172b3 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_user_mapping.rs @@ -0,0 +1,107 @@ +use std::{any::Any, sync::Arc}; + +use async_trait::async_trait; + +use datafusion::{ + arrow::{ + array::{Array, ArrayRef, ListBuilder, StringBuilder, UInt32Builder}, + datatypes::{DataType, Field, Schema, SchemaRef}, + record_batch::RecordBatch, + }, + datasource::{datasource::TableProviderFilterPushDown, TableProvider, TableType}, + error::DataFusionError, + logical_plan::Expr, + physical_plan::{memory::MemoryExec, ExecutionPlan}, +}; + +struct PgCatalogUserMappingBuilder { + oid: UInt32Builder, + umuser: UInt32Builder, + umserver: UInt32Builder, + umoptions: ListBuilder, +} + +impl PgCatalogUserMappingBuilder { + fn new() -> Self { + let capacity = 1; + + Self { + oid: UInt32Builder::new(capacity), + umuser: UInt32Builder::new(capacity), + umserver: UInt32Builder::new(capacity), + umoptions: ListBuilder::new(StringBuilder::new(capacity)), + } + } + + fn finish(mut self) -> Vec> { + let columns: Vec> = vec![ + Arc::new(self.oid.finish()), + Arc::new(self.umuser.finish()), + Arc::new(self.umserver.finish()), + Arc::new(self.umoptions.finish()), + ]; + + columns + } +} + +pub struct PgCatalogUserMappingProvider { + data: Arc>, +} + +// https://www.postgresql.org/docs/14/catalog-pg-user-mapping.html +impl PgCatalogUserMappingProvider { + pub fn new() -> Self { + let builder = PgCatalogUserMappingBuilder::new(); + + Self { + data: Arc::new(builder.finish()), + } + } +} + +#[async_trait] +impl TableProvider for PgCatalogUserMappingProvider { + fn as_any(&self) -> &dyn Any { + self + } + + fn table_type(&self) -> TableType { + TableType::View + } + + fn schema(&self) -> SchemaRef { + Arc::new(Schema::new(vec![ + Field::new("oid", DataType::UInt32, false), + Field::new("umuser", DataType::UInt32, false), + Field::new("umserver", DataType::UInt32, false), + Field::new( + "umoptions", + DataType::List(Box::new(Field::new("item", DataType::Utf8, true))), + true, + ), + ])) + } + + async fn scan( + &self, + projection: &Option>, + _filters: &[Expr], + _limit: Option, + ) -> Result, DataFusionError> { + let batch = RecordBatch::try_new(self.schema(), self.data.to_vec())?; + + Ok(Arc::new(MemoryExec::try_new( + &[vec![batch]], + self.schema(), + projection.clone(), + )?)) + } + + fn supports_filter_pushdown( + &self, + _filter: &Expr, + ) -> Result { + Ok(TableProviderFilterPushDown::Unsupported) + } +} diff --git a/rust/cubesql/cubesql/src/compile/engine/udf/common.rs b/rust/cubesql/cubesql/src/compile/engine/udf/common.rs index 6535634178916..ee5d3e2310140 100644 --- a/rust/cubesql/cubesql/src/compile/engine/udf/common.rs +++ b/rust/cubesql/cubesql/src/compile/engine/udf/common.rs @@ -11,11 +11,12 @@ use datafusion::{ arrow::{ array::{ new_null_array, Array, ArrayBuilder, ArrayRef, BooleanArray, BooleanBuilder, - Date32Array, Float64Array, Float64Builder, GenericStringArray, Int32Builder, - Int64Array, Int64Builder, IntervalDayTimeBuilder, IntervalMonthDayNanoArray, ListArray, - ListBuilder, PrimitiveArray, PrimitiveBuilder, StringArray, StringBuilder, - StructBuilder, TimestampMicrosecondArray, TimestampMillisecondArray, - TimestampNanosecondArray, TimestampSecondArray, UInt32Builder, UInt64Builder, + Date32Array, Float64Array, Float64Builder, GenericStringArray, Int32Array, + Int32Builder, Int64Array, Int64Builder, IntervalDayTimeBuilder, + IntervalMonthDayNanoArray, ListArray, ListBuilder, PrimitiveArray, PrimitiveBuilder, + StringArray, StringBuilder, StructBuilder, TimestampMicrosecondArray, + TimestampMillisecondArray, TimestampNanosecondArray, TimestampNanosecondBuilder, + TimestampSecondArray, UInt32Builder, UInt64Builder, }, compute::{cast, concat}, datatypes::{ @@ -1876,6 +1877,44 @@ pub fn create_format_type_udf() -> ScalarUDF { PgTypeId::ARRAYINT8MULTIRANGE => { format!("int8multirange{}[]", typemod_str()) } + PgTypeId::ARRAYPGAM => { + format!("pg_am{}[]", typemod_str()) + } + PgTypeId::PGAM => { + format!("pg_am{}", typemod_str()) + } + PgTypeId::ARRAYPGLANGUAGE => { + format!("pg_language{}[]", typemod_str()) + } + PgTypeId::PGLANGUAGE => { + format!("pg_language{}", typemod_str()) + } + PgTypeId::ARRAYPGEVENTTRIGGER => { + format!("pg_event_trigger{}[]", typemod_str()) + } + PgTypeId::PGEVENTTRIGGER => { + format!("pg_event_trigger{}", typemod_str()) + } + PgTypeId::ARRAYPGCAST => { + format!("pg_cast{}[]", typemod_str()) + } + PgTypeId::PGCAST => format!("pg_cast{}", typemod_str()), + PgTypeId::ARRAYPGEXTENSION => { + format!("pg_extension{}[]", typemod_str()) + } + PgTypeId::PGEXTENSION => format!("pg_extension{}", typemod_str()), + PgTypeId::ARRAYPGFOREIGNDATAWRAPPER => { + format!("pg_foreign_data_wrapper{}[]", typemod_str()) + } + PgTypeId::PGFOREIGNDATAWRAPPER => { + format!("pg_foreign_data_wrapper{}", typemod_str()) + } + PgTypeId::ARRAYPGFOREIGNSERVER => { + format!("pg_foreign_server{}[]", typemod_str()) + } + PgTypeId::PGFOREIGNSERVER => { + format!("pg_foreign_server{}", typemod_str()) + } PgTypeId::ARRAYPGCONSTRAINT => { format!("pg_constraint{}[]", typemod_str()) } @@ -3758,6 +3797,18 @@ pub fn create_pg_get_indexdef_udf() -> ScalarUDF { pub fn create_age_udf() -> ScalarUDF { let fun = make_scalar_function(move |args: &[ArrayRef]| match args.len() { 1 => { + // Special handling for `AGE(xid)` + if args[0].data_type() == &DataType::UInt32 { + let xids = downcast_primitive_arg!(args[0], "xid", OidType); + + let result = xids + .iter() + .map(|xid| xid.map(|_| i32::MAX)) + .collect::(); + + return Ok(Arc::new(result) as ArrayRef); + } + let older_dates = downcast_primitive_arg!(args[0], "older_date", TimestampNanosecondType); let current_date = Utc::now().date_naive().and_time(NaiveTime::default()); @@ -3806,8 +3857,13 @@ pub fn create_age_udf() -> ScalarUDF { )), }); - let return_type: ReturnTypeFunction = - Arc::new(move |_| Ok(Arc::new(DataType::Interval(IntervalUnit::MonthDayNano)))); + let return_type: ReturnTypeFunction = Arc::new(move |dt| { + // Special handling for `AGE(xid)` which returns Int32 + if dt.len() == 1 && dt[0] == DataType::UInt32 { + return Ok(Arc::new(DataType::Int32)); + } + Ok(Arc::new(DataType::Interval(IntervalUnit::MonthDayNano))) + }); ScalarUDF::new( "age", @@ -3818,6 +3874,7 @@ pub fn create_age_udf() -> ScalarUDF { DataType::Timestamp(TimeUnit::Nanosecond, None), DataType::Timestamp(TimeUnit::Nanosecond, None), ]), + TypeSignature::Exact(vec![DataType::UInt32]), ], // NOTE: volatility should be `Stable` but we have no access // to `query_execution_start_time` @@ -4052,6 +4109,85 @@ pub fn create_pg_relation_size_udf() -> ScalarUDF { ) } +pub fn create_pg_postmaster_start_time_udf() -> ScalarUDF { + let fun_registration_nanos = Utc::now() + .timestamp_nanos_opt() + .expect("Unable to get current time as nanoseconds"); + + let fun = make_scalar_function(move |_args: &[ArrayRef]| { + let mut builder = TimestampNanosecondBuilder::new(1); + builder.append_value(fun_registration_nanos).unwrap(); + + Ok(Arc::new(builder.finish()) as ArrayRef) + }); + + let return_type: ReturnTypeFunction = + Arc::new(move |_| Ok(Arc::new(DataType::Timestamp(TimeUnit::Nanosecond, None)))); + + ScalarUDF::new( + "pg_postmaster_start_time", + &Signature::exact(vec![], Volatility::Stable), + &return_type, + &fun, + ) +} + +pub fn create_txid_current_udf() -> ScalarUDF { + let fun = make_scalar_function(move |_args: &[ArrayRef]| { + let mut builder = Int64Builder::new(1); + builder.append_value(1).unwrap(); + + Ok(Arc::new(builder.finish()) as ArrayRef) + }); + + let return_type: ReturnTypeFunction = Arc::new(move |_| Ok(Arc::new(DataType::Int64))); + + ScalarUDF::new( + "txid_current", + &Signature::exact(vec![], Volatility::Stable), + &return_type, + &fun, + ) +} + +pub fn create_pg_is_in_recovery_udf() -> ScalarUDF { + let fun = make_scalar_function(move |_args: &[ArrayRef]| { + let mut builder = BooleanBuilder::new(1); + builder.append_value(false).unwrap(); + + Ok(Arc::new(builder.finish()) as ArrayRef) + }); + + let return_type: ReturnTypeFunction = Arc::new(move |_| Ok(Arc::new(DataType::Boolean))); + + ScalarUDF::new( + "pg_is_in_recovery", + &Signature::exact(vec![], Volatility::Stable), + &return_type, + &fun, + ) +} + +pub fn create_pg_tablespace_location_udf() -> ScalarUDF { + let fun = make_scalar_function(move |args: &[ArrayRef]| { + assert!(args.len() == 1); + + let oids = downcast_primitive_arg!(args[0], "oid", OidType); + let result = oids.iter().map(|_| Some("")).collect::(); + + Ok(Arc::new(result)) + }); + + let return_type: ReturnTypeFunction = Arc::new(move |_| Ok(Arc::new(DataType::Utf8))); + + ScalarUDF::new( + "pg_tablespace_location", + &Signature::exact(vec![DataType::UInt32], Volatility::Stable), + &return_type, + &fun, + ) +} + pub fn register_fun_stubs(mut ctx: SessionContext) -> SessionContext { macro_rules! register_fun_stub { ($FTYP:ident, $NAME:expr, argc=$ARGC:expr $(, rettyp=$RETTYP:ident)? $(, vol=$VOL:ident)?) => { @@ -4804,13 +4940,6 @@ pub fn register_fun_stubs(mut ctx: SessionContext) -> SessionContext { rettyp = Int64, vol = Stable ); - register_fun_stub!( - udf, - "pg_is_in_recovery", - argc = 0, - rettyp = Boolean, - vol = Volatile - ); register_fun_stub!( udf, "pg_is_wal_replay_paused", @@ -4874,13 +5003,6 @@ pub fn register_fun_stubs(mut ctx: SessionContext) -> SessionContext { rettyp = Regclass, vol = Stable ); - register_fun_stub!( - udf, - "pg_postmaster_start_time", - argc = 0, - rettyp = TimestampTz, - vol = Stable - ); register_fun_stub!( udf, "pg_promote", @@ -5010,13 +5132,6 @@ pub fn register_fun_stubs(mut ctx: SessionContext) -> SessionContext { rettyp = Int64, vol = Volatile ); - register_fun_stub!( - udf, - "pg_tablespace_location", - tsig = [Oid], - rettyp = Utf8, - vol = Stable - ); register_fun_stub!( udf, "pg_tablespace_size", @@ -5202,7 +5317,6 @@ pub fn register_fun_stubs(mut ctx: SessionContext) -> SessionContext { vol = Stable ); register_fun_stub!(udf, "trim_scale", tsig = [Float64], rettyp = Float64); - register_fun_stub!(udf, "txid_current", argc = 0, rettyp = Int64, vol = Stable); register_fun_stub!( udf, "txid_current_if_assigned", diff --git a/rust/cubesql/cubesql/src/compile/parser.rs b/rust/cubesql/cubesql/src/compile/parser.rs index 6b4e1ccc4c097..32b0ff8e2e67f 100644 --- a/rust/cubesql/cubesql/src/compile/parser.rs +++ b/rust/cubesql/cubesql/src/compile/parser.rs @@ -242,6 +242,9 @@ pub fn parse_sql_to_statements( .to_string() }; + // DataGrip CTID workaround + let query = query.replace("SELECT t.*, CTID\nFROM ", "SELECT t.*, NULL AS ctid\nFROM "); + if let Some(qtrace) = qtrace { qtrace.set_replaced_query(&query) } diff --git a/rust/cubesql/cubesql/src/compile/query_engine.rs b/rust/cubesql/cubesql/src/compile/query_engine.rs index a9ff013c3dce2..fee95d644b756 100644 --- a/rust/cubesql/cubesql/src/compile/query_engine.rs +++ b/rust/cubesql/cubesql/src/compile/query_engine.rs @@ -518,6 +518,10 @@ impl QueryEngine for SqlQueryEngine { ctx.register_udf(create_age_udf()); ctx.register_udf(create_pg_get_partkeydef_udf()); ctx.register_udf(create_pg_relation_size_udf()); + ctx.register_udf(create_pg_postmaster_start_time_udf()); + ctx.register_udf(create_txid_current_udf()); + ctx.register_udf(create_pg_is_in_recovery_udf()); + ctx.register_udf(create_pg_tablespace_location_udf()); // udaf ctx.register_udaf(create_measure_udaf()); diff --git a/rust/cubesql/cubesql/src/compile/snapshots/cubesql__compile__tests__pgcatalog_pgam_postgres.snap b/rust/cubesql/cubesql/src/compile/snapshots/cubesql__compile__tests__pgcatalog_pgam_postgres.snap index 4c143074c3fcf..2c2cf40368da1 100644 --- a/rust/cubesql/cubesql/src/compile/snapshots/cubesql__compile__tests__pgcatalog_pgam_postgres.snap +++ b/rust/cubesql/cubesql/src/compile/snapshots/cubesql__compile__tests__pgcatalog_pgam_postgres.snap @@ -1,9 +1,8 @@ --- source: cubesql/src/compile/mod.rs -assertion_line: 5296 -expression: "execute_query(\"SELECT * FROM pg_catalog.pg_am\".to_string(),\n DatabaseProtocol::PostgreSQL).await?" +expression: "execute_query(\"SELECT * FROM pg_catalog.pg_am\".to_string(),\nDatabaseProtocol::PostgreSQL).await?" --- -+-----+--------+-----------+--------+ -| oid | amname | amhandler | amtype | -+-----+--------+-----------+--------+ -+-----+--------+-----------+--------+ ++-----+--------+-----------+--------+------+ +| oid | amname | amhandler | amtype | xmin | ++-----+--------+-----------+--------+------+ ++-----+--------+-----------+--------+------+ diff --git a/rust/cubesql/cubesql/src/compile/snapshots/cubesql__compile__tests__pgcatalog_pgattribute_postgres.snap b/rust/cubesql/cubesql/src/compile/snapshots/cubesql__compile__tests__pgcatalog_pgattribute_postgres.snap index df0aceb304c202e6616091adf1e9dcef0736a8b9..b3b845f986339c1b7a69480ad9dd607fe6968149 100644 GIT binary patch delta 3738 zcmYk9eOQfW9LKMxQRKBwI@VFDk$3BG`?>GuzMnc}XIx)gbG5rz zYF*iXN{Z6dfAQ?}IXu#?Oj5+PiYAj37k|~7>84{rt_gx!rrQ+fHEYn32xe%mcWM^p zE;BM;)&lu;OXTF%$Vb~CdwWP`X3xfcc2$Rda69B;Z{)xA$g%Gt@A3gQ`TDZ99b)9O zn|z_$eG*aO~k zkhA6@U(G-co`+mKUoxxCf^N|fyAb_di;!JEMV^`sEcV*zCCL7tA?M^sW|g_nEwcUc z&@atLez_cZ^omAS!mXBImEAA&mM1|pv|S0V8fsv3R!L?Di(mwCt@~>9SFS;RP>dYC z4tcw!kq=oLk)@PKX4^JEwKzaNHt+>6E=9h+2|4Ub#SA8$pD|4K5m*s)>sTF!thv&g4Xzj|v!+XWw*6R~WaAC}q2qvRot~wf0QP9mv*RZv z+mv?{J@Yvw1v6L5Zrk1V+QsXqAyL^|6JcjT9E{M!`tPK$ilH8#LykX>ysrw`{i0-M zx&)6d?mPEA`kj72&cA|OTa6rf4Op8J+fsx4>PN}UcmukHUw#vPuUp9Ten!4>8@cx# zOg-dGR5ct6ko zK~8*v{OwcZ*3Xe=y+FS3QZn;sfNs%O_%HhRUm*{AEgANK{S6Us-=a7&K|#TfDWJHv zdE^N4ZoaSy4b?QID#VSdbA- zh`8fL!~kz1HtRufZPUYK#O~)wK5$u{1%B8-m8UON8GckLf|T)I+~+KsA{-Kpx(ld9}qpt#lvvy$a~f@!EkrRr&jLy0ra6T+z4{{dAk z`%*O{92D2?gP~+WP=6XK7(i9shg3xkq^c|mlvVo}@&=>g{2J#KTntT>Vlcso3Tn?mm>$;4g$rVX7dH-XYG>!w0YmW#+$$7jTPebD;(z=QiTGu|6CKs4#^4esY44Dc^ zo;i&!;G;AeiknXBcBj)ix0y7VHVczFTkw3PDL*k=8R1-gFKZPG=cDE-@`naDXW&Ze ztOex}yv01QY}=w09oO!cuiB`{zRV}5VE;+QWFqhWdTSk+{e44Z`r^z=3;BoB{VJP`@$3CYa{VH0wporGh zd_j}y8k$^NOq2C%A<4DLz)*5ocCV+QW+k+4+6G#8W+P1omeOSICYt3K9g<9| delta 2833 zcmX}udsNS790&08M7jUsxB6A?Lam5clNK#hYF#zLtTauzg^8L*6S=PC@>{iBS~QWv z(e~gO8FOo9v)qo$I2@OCtTA)4<}mE@{C@B6=bz`ie4h97`+UB)j(;vXm7j2`aFDGW zl7(8gQzQ#n-!es5y=|bDA9&Fgz1$9o;0{2A32^KP z%;*Hvn-hfeazU3eSCn5`fHZgDvO9Z2=IH15|ztw9W-GKLIW*BIqYOG>=+nZ21&$ z$Okf((kus-(JXp@&~lVZRshde0;#KkQ)>u%UY|nrDf%2}Dgq{~1HNAmcv^v#UjPq^ zfib1PfiI(kblOO>=$9{l6ZO$(*bGFM12ta(u3LfJZNRNcAZ$BOT}99@v1uoeRSjI- z1q|N}Y}*60+DrE(sfK3JN6&wQ@(>AZ+DFLtHOZ&@>3hxgb(SeA-i{OB*n#{7#F@nylIvy)ZOWFvt{ObftiKk+Ptg1^9 zr9*~Lz1wNj^MAt6HJkyWe*tRF0oGz$-=I6A%b7P(zHkc&ybWx=1BiP-`tJmNu|GEe{`Z06KY(YAz~l$O$%lZ?BcSMS zpy@Hq646An=sS1#38wGW46OJU`12`{@C?}h9O(Q4`1B=k@0A@YN(ej)wbwz!*dL2> zX~|sZ$h_&q9Mzhr=n>Kb(+^U0Xvcf=+B2_oU=DL8>T6IH9jT>Fj%GtMUNcnhVkp33 zsLajKOLs$QoeiDtV#u$XU1nwNPTf>P51NlUnN@Nxdv~)s?rF%okD6nN5H9>?U5Rk}$;&(alVk`&Jk~na3JO}zu1MX-pd}nA$>+eUr5s2t;J~Tn92l^Y18Y}t;K^zZB!9+%BZVC3T|`vWnC`5t z{lj&@t%DSmihCv9>U>RODvnZC=lIlo2L8S&x->^Hz=uMn=QU>Rd;F z)MR{5}fiR{RADnrGAH>`&F9=r0FJH1bP&fdlj!zV>?u;0eS+coX0;FK`RY|zf oY%*|lM`Xd~@ymlGH=k92tNEt{mhe;oi+HN2Zq`v-jO=D^0RK8b*Z=?k delta 271 zcmZ1&*cY(j7t17dmdW?n1t%}ykee*W&b8T&wVHAB0k%Vo=n}^`Y8WS95aHS!%(Vr~ znA|U)yt$eu5W#WaL*lRsAaPC!!Z|6MCkO{1^n{4QWs)~biX(CENkBN89i)&f%#cA+ nqALeg(k~BDvN=Q%No|cXRQjF@RP>&T=;j@2i_tyDq|F5Yh1g($ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_namespaces.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_namespaces.snap index bffad4c29d043..27ab049a0a774 100644 --- a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_namespaces.snap +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_namespaces.snap @@ -2,10 +2,10 @@ source: cubesql/src/compile/test/test_introspection.rs expression: "execute_query(\"SELECT n.oid,n.*,d.description FROM pg_catalog.pg_namespace n\n LEFT OUTER JOIN pg_catalog.pg_description d ON d.objoid=n.oid AND d.objsubid=0 AND d.classoid='pg_namespace'::regclass\n ORDER BY nspname\".to_string(),\nDatabaseProtocol::PostgreSQL).await?" --- -+-------+-------+--------------------+----------+------------------------+-------------+ -| _oid | oid | nspname | nspowner | nspacl | description | -+-------+-------+--------------------+----------+------------------------+-------------+ -| 13000 | 13000 | information_schema | 10 | {test=UC/test,=U/test} | NULL | -| 11 | 11 | pg_catalog | 10 | {test=UC/test,=U/test} | NULL | -| 2200 | 2200 | public | 10 | {test=UC/test,=U/test} | NULL | -+-------+-------+--------------------+----------+------------------------+-------------+ ++-------+-------+--------------------+----------+--------+------+-------------+ +| _oid | oid | nspname | nspowner | nspacl | xmin | description | ++-------+-------+--------------------+----------+--------+------+-------------+ +| 13000 | 13000 | information_schema | 10 | NULL | 1 | NULL | +| 11 | 11 | pg_catalog | 10 | NULL | 1 | NULL | +| 2200 | 2200 | public | 10 | NULL | 1 | NULL | ++-------+-------+--------------------+----------+--------+------+-------------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_tables_with_descriptions.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_tables_with_descriptions.snap index 6656934629127..290b8453ff5a5 100644 --- a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_tables_with_descriptions.snap +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_tables_with_descriptions.snap @@ -2,12 +2,12 @@ source: cubesql/src/compile/test/test_introspection.rs expression: "execute_query(r#\"\n SELECT c.oid,c.*,d.description,pg_catalog.pg_get_expr(c.relpartbound, c.oid) as partition_expr, pg_catalog.pg_get_partkeydef(c.oid) as partition_key \n FROM pg_catalog.pg_class c\n LEFT OUTER JOIN pg_catalog.pg_description d ON d.objoid=c.oid AND d.objsubid=0 AND d.classoid='pg_class'::regclass\n WHERE c.relnamespace=2200 AND c.relkind not in ('i','I','c')\n ORDER BY c.oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" --- -+-------+-------+---------------------------+--------------+---------+-----------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+----------------+---------+----------+-----------+-------------+----------------+----------------+----------------+---------------------+----------------+--------------+----------------+------------+--------------+------------+--------+------------+--------------+------------+-------------------------------------------------------+----------------+---------------+ -| _oid | oid | relname | relnamespace | reltype | reloftype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | relallvisible | reltoastrelid | relhasindex | relisshared | relpersistence | relkind | relnatts | relchecks | relhasrules | relhastriggers | relhassubclass | relrowsecurity | relforcerowsecurity | relispopulated | relreplident | relispartition | relrewrite | relfrozenxid | relminmxid | relacl | reloptions | relpartbound | relhasoids | description | partition_expr | partition_key | -+-------+-------+---------------------------+--------------+---------+-----------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+----------------+---------+----------+-----------+-------------+----------------+----------------+----------------+---------------------+----------------+--------------+----------------+------------+--------------+------------+--------+------------+--------------+------------+-------------------------------------------------------+----------------+---------------+ -| 18000 | 18000 | KibanaSampleDataEcommerce | 2200 | 18001 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 17 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | false | Sample data for tracking eCommerce orders from Kibana | NULL | NULL | -| 18020 | 18020 | Logs | 2200 | 18021 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 7 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | false | NULL | NULL | NULL | -| 18030 | 18030 | NumberCube | 2200 | 18031 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 3 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | false | NULL | NULL | NULL | -| 18036 | 18036 | WideCube | 2200 | 18037 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 207 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | false | NULL | NULL | NULL | -| 18246 | 18246 | MultiTypeCube | 2200 | 18247 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 67 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | false | Test cube with a little bit of everything | NULL | NULL | -+-------+-------+---------------------------+--------------+---------+-----------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+----------------+---------+----------+-----------+-------------+----------------+----------------+----------------+---------------------+----------------+--------------+----------------+------------+--------------+------------+--------+------------+--------------+------------+-------------------------------------------------------+----------------+---------------+ ++-------+-------+---------------------------+--------------+---------+-----------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+----------------+---------+----------+-----------+-------------+----------------+----------------+----------------+---------------------+----------------+--------------+----------------+------------+--------------+------------+--------+------------+--------------+------+------------+-------------------------------------------------------+----------------+---------------+ +| _oid | oid | relname | relnamespace | reltype | reloftype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | relallvisible | reltoastrelid | relhasindex | relisshared | relpersistence | relkind | relnatts | relchecks | relhasrules | relhastriggers | relhassubclass | relrowsecurity | relforcerowsecurity | relispopulated | relreplident | relispartition | relrewrite | relfrozenxid | relminmxid | relacl | reloptions | relpartbound | xmin | relhasoids | description | partition_expr | partition_key | ++-------+-------+---------------------------+--------------+---------+-----------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+----------------+---------+----------+-----------+-------------+----------------+----------------+----------------+---------------------+----------------+--------------+----------------+------------+--------------+------------+--------+------------+--------------+------+------------+-------------------------------------------------------+----------------+---------------+ +| 18000 | 18000 | KibanaSampleDataEcommerce | 2200 | 18001 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 17 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | 1 | false | Sample data for tracking eCommerce orders from Kibana | NULL | NULL | +| 18020 | 18020 | Logs | 2200 | 18021 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 7 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | 1 | false | NULL | NULL | NULL | +| 18030 | 18030 | NumberCube | 2200 | 18031 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 3 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | 1 | false | NULL | NULL | NULL | +| 18036 | 18036 | WideCube | 2200 | 18037 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 207 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | 1 | false | NULL | NULL | NULL | +| 18246 | 18246 | MultiTypeCube | 2200 | 18247 | 0 | 10 | 2 | 0 | 0 | 0 | -1 | 0 | 0 | false | false | p | r | 67 | 0 | false | false | false | false | false | true | p | false | 0 | 0 | 1 | NULL | NULL | NULL | 1 | false | Test cube with a little bit of everything | NULL | NULL | ++-------+-------+---------------------------+--------------+---------+-----------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+----------------+---------+----------+-----------+-------------+----------------+----------------+----------------+---------------------+----------------+--------------+----------------+------------+--------------+------------+--------+------------+--------------+------+------------+-------------------------------------------------------+----------------+---------------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_types.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_types.snap index f8780f2c652ec..7cecadd5fafff 100644 --- a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_types.snap +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__dbeaver_introspection_types.snap @@ -2,87 +2,94 @@ source: cubesql/src/compile/test/test_introspection.rs expression: "execute_query(\"SELECT t.oid,t.*,c.relkind,format_type(nullif(t.typbasetype, 0), t.typtypmod) as base_type_name, d.description\n FROM pg_catalog.pg_type t\n LEFT OUTER JOIN pg_catalog.pg_type et ON et.oid=t.typelem\n LEFT OUTER JOIN pg_catalog.pg_class c ON c.oid=t.typrelid\n LEFT OUTER JOIN pg_catalog.pg_description d ON t.oid=d.objoid\n WHERE t.typname IS NOT NULL\n AND (c.relkind IS NULL OR c.relkind = 'c') AND (et.typcategory IS NULL OR et.typcategory <> 'C')\n ORDER BY t.oid ASC\".to_string(),\nDatabaseProtocol::PostgreSQL).await?" --- -+-------+-------+-----------------+--------------+----------+--------+----------+---------+-------------+---------------+--------------+----------+----------+-----------------------------+---------+----------+-------------------+-----------+------------+---------+----------+-----------+------------+----------+------------+------------+-------------+-----------+----------+--------------+---------------+------------+--------+---------+-------------------+-------------+ -| _oid | oid | typname | typnamespace | typowner | typlen | typbyval | typtype | typcategory | typisprefered | typisdefined | typdelim | typrelid | typsubscript | typelem | typarray | typinput | typoutput | typreceive | typsend | typmodin | typmodout | typanalyze | typalign | typstorage | typnotnull | typbasetype | typtypmod | typndims | typcollation | typdefaultbin | typdefault | typacl | relkind | base_type_name | description | -+-------+-------+-----------------+--------------+----------+--------+----------+---------+-------------+---------------+--------------+----------+----------+-----------------------------+---------+----------+-------------------+-----------+------------+---------+----------+-----------+------------+----------+------------+------------+-------------+-----------+----------+--------------+---------------+------------+--------+---------+-------------------+-------------+ -| 16 | 16 | bool | 11 | 10 | 1 | true | b | B | true | true | , | 0 | - | 0 | 1000 | boolin | NULL | 2436 | NULL | NULL | NULL | NULL | c | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 17 | 17 | bytea | 11 | 10 | -1 | false | b | U | false | true | , | 0 | - | 0 | 1001 | byteain | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 19 | 19 | name | 11 | 10 | 64 | false | b | S | false | true | , | 0 | raw_array_subscript_handler | 0 | 1003 | namein | NULL | 0 | NULL | NULL | NULL | NULL | c | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 20 | 20 | int8 | 11 | 10 | 8 | true | b | N | false | true | , | 0 | - | 0 | 1016 | int8in | NULL | 2408 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 21 | 21 | int2 | 11 | 10 | 2 | true | b | N | false | true | , | 0 | - | 0 | 1005 | int2in | NULL | 0 | NULL | NULL | NULL | NULL | s | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 23 | 23 | int4 | 11 | 10 | 4 | true | b | N | false | true | , | 0 | - | 0 | 1007 | int4in | NULL | 2406 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 25 | 25 | text | 11 | 10 | -1 | false | b | S | true | true | , | 0 | - | 0 | 1009 | textin | NULL | 2414 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 26 | 26 | oid | 11 | 10 | 4 | true | b | N | true | true | , | 0 | - | 0 | 1028 | oidin | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 27 | 27 | tid | 11 | 10 | 6 | false | b | U | false | true | , | 0 | - | 0 | 1010 | tidin | NULL | 0 | NULL | NULL | NULL | NULL | s | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 700 | 700 | float4 | 11 | 10 | 4 | true | b | N | false | true | , | 0 | - | 0 | 1021 | float4in | NULL | 2424 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 701 | 701 | float8 | 11 | 10 | 8 | true | b | N | true | true | , | 0 | - | 0 | 1022 | float8in | NULL | 2426 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 790 | 790 | money | 11 | 10 | 8 | true | b | N | false | true | , | 0 | - | 0 | 791 | cash_in | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 791 | 791 | _money | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 790 | 0 | _moneyin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 869 | 869 | inet | 11 | 10 | -1 | false | b | I | true | true | , | 0 | - | 0 | 1041 | inetin | NULL | 0 | NULL | NULL | NULL | NULL | i | m | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1000 | 1000 | _bool | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 16 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1001 | 1001 | _bytea | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 17 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1003 | 1003 | _name | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 19 | 0 | _namein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1005 | 1005 | _int2 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 21 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1007 | 1007 | _int4 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 23 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1009 | 1009 | _text | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 25 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1010 | 1010 | _tid | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 27 | 0 | _tidin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1014 | 1014 | _bpchar | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1042 | 0 | _bpcharin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1015 | 1015 | _varchar | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1043 | 0 | _varcharin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1016 | 1016 | _int8 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 20 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1021 | 1021 | _float4 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 700 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1022 | 1022 | _float8 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 701 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1028 | 1028 | _oid | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 26 | 0 | _oidin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1033 | 1033 | aclitem | 11 | 10 | 12 | false | b | U | false | true | , | 0 | - | 0 | 1034 | aclitemin | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1034 | 1034 | _aclitem | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1033 | 0 | _aclitemin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1041 | 1041 | _inet | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 869 | 0 | _inetin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1042 | 1042 | bpchar | 11 | 10 | -1 | false | b | S | false | true | , | 0 | - | 0 | 1014 | bpcharin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1043 | 1043 | varchar | 11 | 10 | -1 | false | b | S | false | true | , | 0 | - | 0 | 1015 | varcharin | NULL | 2432 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1082 | 1082 | date | 11 | 10 | 4 | true | b | D | false | true | , | 0 | - | 0 | 1182 | date_in | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1083 | 1083 | time | 11 | 10 | 8 | true | b | D | false | true | , | 0 | - | 0 | 1183 | time_in | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1114 | 1114 | timestamp | 11 | 10 | 8 | true | b | D | false | true | , | 0 | - | 0 | 1115 | timestamp_in | NULL | 2474 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1115 | 1115 | _timestamp | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1114 | 0 | _timestampin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1182 | 1182 | _date | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1082 | 0 | _datein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1183 | 1183 | _time | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1083 | 0 | _timein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1184 | 1184 | timestamptz | 11 | 10 | 8 | true | b | D | true | true | , | 0 | - | 0 | 1185 | timestamptz_in | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1185 | 1185 | _timestamptz | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1184 | 0 | _timestamptzin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1186 | 1186 | interval | 11 | 10 | 16 | false | b | T | true | true | , | 0 | - | 0 | 1187 | intervalin | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1187 | 1187 | _interval | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1186 | 0 | _intervalin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1231 | 1231 | _numeric | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1700 | 0 | _numericin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1266 | 1266 | timetz | 11 | 10 | 12 | false | b | D | false | true | , | 0 | - | 0 | 1270 | timetz_in | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1270 | 1270 | _timetz | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1266 | 0 | _timetzin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 1700 | 1700 | numeric | 11 | 10 | -1 | false | b | N | false | true | , | 0 | - | 0 | 1231 | numericin | NULL | 2460 | NULL | NULL | NULL | NULL | i | m | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 2249 | 2249 | record | 11 | 10 | -1 | false | p | P | false | true | , | 0 | - | 0 | 2287 | recordin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 2277 | 2277 | anyarray | 11 | 10 | -1 | false | p | P | false | true | , | 0 | - | 0 | 0 | anyarrayin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 2283 | 2283 | anyelement | 11 | 10 | 4 | true | p | P | false | true | , | 0 | - | 0 | 0 | anyelementin | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 2287 | 2287 | _record | 11 | 10 | -1 | false | p | P | false | true | , | 0 | array_subscript_handler | 2249 | 0 | _recordin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3220 | 3220 | pg_lsn | 11 | 10 | 8 | true | b | U | false | true | , | 0 | - | 0 | 3221 | pg_lsnin | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3221 | 3221 | _pg_lsn | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3220 | 0 | _pg_lsnin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3500 | 3500 | anyenum | 11 | 10 | 4 | true | p | P | false | true | , | 0 | - | 0 | 0 | anyenumin | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3831 | 3831 | anyrange | 11 | 10 | -1 | false | p | P | false | true | , | 0 | - | 0 | 0 | anyrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3904 | 3904 | int4range | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3905 | int4rangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3905 | 3905 | _int4range | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3904 | 0 | _int4rangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3906 | 3906 | numrange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3907 | numrangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3907 | 3907 | _numrange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3906 | 0 | _numrangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3908 | 3908 | tsrange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3909 | tsrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3909 | 3909 | _tsrange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3908 | 0 | _tsrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3910 | 3910 | tstzrange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3911 | tstzrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3911 | 3911 | _tstzrange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3910 | 0 | _tstzrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3912 | 3912 | daterange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3913 | daterangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3913 | 3913 | _daterange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3912 | 0 | _daterangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3926 | 3926 | int8range | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3927 | int8rangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 3927 | 3927 | _int8range | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3926 | 0 | _int8rangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 4451 | 4451 | int4multirange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 6150 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 4532 | 4532 | nummultirange | 11 | 10 | -1 | false | m | R | false | true | , | 0 | - | 0 | 6151 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 4533 | 4533 | tsmultirange | 11 | 10 | -1 | false | m | R | false | true | , | 0 | - | 0 | 6152 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 4535 | 4535 | datemultirange | 11 | 10 | -1 | false | m | R | false | true | , | 0 | - | 0 | 6155 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 4536 | 4536 | int8multirange | 11 | 10 | -1 | false | m | R | false | true | , | 0 | - | 0 | 6157 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 6150 | 6150 | _int4multirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4451 | 0 | _int4multirangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 6151 | 6151 | _nummultirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4532 | 0 | _nummultirangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 6152 | 6152 | _tsmultirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4533 | 0 | _tsmultirangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 6155 | 6155 | _datemultirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4535 | 0 | _datemultirangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 6157 | 6157 | _int8multirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4536 | 0 | _int8multirangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 12003 | 12003 | pg_constraint | 11 | 10 | -1 | false | c | C | false | true | , | 2606 | - | 0 | 12002 | pg_constraintin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 12047 | 12047 | pg_namespace | 11 | 10 | -1 | false | c | C | false | true | , | 2615 | - | 0 | 12046 | record_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | -| 13408 | 13408 | character_data | 13000 | 10 | -1 | false | d | S | false | true | , | 0 | - | 0 | 0 | character_datain | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 1043 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | character varying | NULL | -| 13410 | 13410 | sql_identifier | 13000 | 10 | 64 | false | d | S | false | true | , | 0 | - | 0 | 0 | sql_identifierin | NULL | 0 | NULL | NULL | NULL | NULL | c | p | false | 19 | -1 | NULL | NULL | NULL | NULL | NULL | NULL | name | NULL | -+-------+-------+-----------------+--------------+----------+--------+----------+---------+-------------+---------------+--------------+----------+----------+-----------------------------+---------+----------+-------------------+-----------+------------+---------+----------+-----------+------------+----------+------------+------------+-------------+-----------+----------+--------------+---------------+------------+--------+---------+-------------------+-------------+ ++-------+-------+-------------------------+--------------+----------+--------+----------+---------+-------------+---------------+--------------+----------+----------+-----------------------------+---------+----------+---------------------------+-----------+------------+---------+----------+-----------+------------+----------+------------+------------+-------------+-----------+----------+--------------+---------------+------------+--------+------+---------+-------------------+-------------+ +| _oid | oid | typname | typnamespace | typowner | typlen | typbyval | typtype | typcategory | typisprefered | typisdefined | typdelim | typrelid | typsubscript | typelem | typarray | typinput | typoutput | typreceive | typsend | typmodin | typmodout | typanalyze | typalign | typstorage | typnotnull | typbasetype | typtypmod | typndims | typcollation | typdefaultbin | typdefault | typacl | xmin | relkind | base_type_name | description | ++-------+-------+-------------------------+--------------+----------+--------+----------+---------+-------------+---------------+--------------+----------+----------+-----------------------------+---------+----------+---------------------------+-----------+------------+---------+----------+-----------+------------+----------+------------+------------+-------------+-----------+----------+--------------+---------------+------------+--------+------+---------+-------------------+-------------+ +| 16 | 16 | bool | 11 | 10 | 1 | true | b | B | true | true | , | 0 | - | 0 | 1000 | boolin | NULL | 2436 | NULL | NULL | NULL | NULL | c | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 17 | 17 | bytea | 11 | 10 | -1 | false | b | U | false | true | , | 0 | - | 0 | 1001 | byteain | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 19 | 19 | name | 11 | 10 | 64 | false | b | S | false | true | , | 0 | raw_array_subscript_handler | 0 | 1003 | namein | NULL | 0 | NULL | NULL | NULL | NULL | c | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 20 | 20 | int8 | 11 | 10 | 8 | true | b | N | false | true | , | 0 | - | 0 | 1016 | int8in | NULL | 2408 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 21 | 21 | int2 | 11 | 10 | 2 | true | b | N | false | true | , | 0 | - | 0 | 1005 | int2in | NULL | 0 | NULL | NULL | NULL | NULL | s | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 23 | 23 | int4 | 11 | 10 | 4 | true | b | N | false | true | , | 0 | - | 0 | 1007 | int4in | NULL | 2406 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 25 | 25 | text | 11 | 10 | -1 | false | b | S | true | true | , | 0 | - | 0 | 1009 | textin | NULL | 2414 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 26 | 26 | oid | 11 | 10 | 4 | true | b | N | true | true | , | 0 | - | 0 | 1028 | oidin | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 27 | 27 | tid | 11 | 10 | 6 | false | b | U | false | true | , | 0 | - | 0 | 1010 | tidin | NULL | 0 | NULL | NULL | NULL | NULL | s | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 700 | 700 | float4 | 11 | 10 | 4 | true | b | N | false | true | , | 0 | - | 0 | 1021 | float4in | NULL | 2424 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 701 | 701 | float8 | 11 | 10 | 8 | true | b | N | true | true | , | 0 | - | 0 | 1022 | float8in | NULL | 2426 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 790 | 790 | money | 11 | 10 | 8 | true | b | N | false | true | , | 0 | - | 0 | 791 | cash_in | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 791 | 791 | _money | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 790 | 0 | _moneyin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 869 | 869 | inet | 11 | 10 | -1 | false | b | I | true | true | , | 0 | - | 0 | 1041 | inetin | NULL | 0 | NULL | NULL | NULL | NULL | i | m | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1000 | 1000 | _bool | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 16 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1001 | 1001 | _bytea | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 17 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1003 | 1003 | _name | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 19 | 0 | _namein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1005 | 1005 | _int2 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 21 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1007 | 1007 | _int4 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 23 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1009 | 1009 | _text | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 25 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1010 | 1010 | _tid | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 27 | 0 | _tidin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1014 | 1014 | _bpchar | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1042 | 0 | _bpcharin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1015 | 1015 | _varchar | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1043 | 0 | _varcharin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1016 | 1016 | _int8 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 20 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1021 | 1021 | _float4 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 700 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1022 | 1022 | _float8 | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 701 | 0 | array_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1028 | 1028 | _oid | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 26 | 0 | _oidin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1033 | 1033 | aclitem | 11 | 10 | 12 | false | b | U | false | true | , | 0 | - | 0 | 1034 | aclitemin | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1034 | 1034 | _aclitem | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1033 | 0 | _aclitemin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1041 | 1041 | _inet | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 869 | 0 | _inetin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1042 | 1042 | bpchar | 11 | 10 | -1 | false | b | S | false | true | , | 0 | - | 0 | 1014 | bpcharin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1043 | 1043 | varchar | 11 | 10 | -1 | false | b | S | false | true | , | 0 | - | 0 | 1015 | varcharin | NULL | 2432 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1082 | 1082 | date | 11 | 10 | 4 | true | b | D | false | true | , | 0 | - | 0 | 1182 | date_in | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1083 | 1083 | time | 11 | 10 | 8 | true | b | D | false | true | , | 0 | - | 0 | 1183 | time_in | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1114 | 1114 | timestamp | 11 | 10 | 8 | true | b | D | false | true | , | 0 | - | 0 | 1115 | timestamp_in | NULL | 2474 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1115 | 1115 | _timestamp | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1114 | 0 | _timestampin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1182 | 1182 | _date | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1082 | 0 | _datein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1183 | 1183 | _time | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1083 | 0 | _timein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1184 | 1184 | timestamptz | 11 | 10 | 8 | true | b | D | true | true | , | 0 | - | 0 | 1185 | timestamptz_in | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1185 | 1185 | _timestamptz | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1184 | 0 | _timestamptzin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1186 | 1186 | interval | 11 | 10 | 16 | false | b | T | true | true | , | 0 | - | 0 | 1187 | intervalin | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1187 | 1187 | _interval | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1186 | 0 | _intervalin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1231 | 1231 | _numeric | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1700 | 0 | _numericin | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1266 | 1266 | timetz | 11 | 10 | 12 | false | b | D | false | true | , | 0 | - | 0 | 1270 | timetz_in | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1270 | 1270 | _timetz | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 1266 | 0 | _timetzin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 1700 | 1700 | numeric | 11 | 10 | -1 | false | b | N | false | true | , | 0 | - | 0 | 1231 | numericin | NULL | 2460 | NULL | NULL | NULL | NULL | i | m | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 2249 | 2249 | record | 11 | 10 | -1 | false | p | P | false | true | , | 0 | - | 0 | 2287 | recordin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 2277 | 2277 | anyarray | 11 | 10 | -1 | false | p | P | false | true | , | 0 | - | 0 | 0 | anyarrayin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 2283 | 2283 | anyelement | 11 | 10 | 4 | true | p | P | false | true | , | 0 | - | 0 | 0 | anyelementin | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 2287 | 2287 | _record | 11 | 10 | -1 | false | p | P | false | true | , | 0 | array_subscript_handler | 2249 | 0 | _recordin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3220 | 3220 | pg_lsn | 11 | 10 | 8 | true | b | U | false | true | , | 0 | - | 0 | 3221 | pg_lsnin | NULL | 0 | NULL | NULL | NULL | NULL | d | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3221 | 3221 | _pg_lsn | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3220 | 0 | _pg_lsnin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3500 | 3500 | anyenum | 11 | 10 | 4 | true | p | P | false | true | , | 0 | - | 0 | 0 | anyenumin | NULL | 0 | NULL | NULL | NULL | NULL | i | p | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3831 | 3831 | anyrange | 11 | 10 | -1 | false | p | P | false | true | , | 0 | - | 0 | 0 | anyrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3904 | 3904 | int4range | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3905 | int4rangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3905 | 3905 | _int4range | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3904 | 0 | _int4rangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3906 | 3906 | numrange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3907 | numrangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3907 | 3907 | _numrange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3906 | 0 | _numrangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3908 | 3908 | tsrange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3909 | tsrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3909 | 3909 | _tsrange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3908 | 0 | _tsrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3910 | 3910 | tstzrange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3911 | tstzrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3911 | 3911 | _tstzrange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3910 | 0 | _tstzrangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3912 | 3912 | daterange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3913 | daterangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3913 | 3913 | _daterange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3912 | 0 | _daterangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3926 | 3926 | int8range | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 3927 | int8rangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 3927 | 3927 | _int8range | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 3926 | 0 | _int8rangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 4451 | 4451 | int4multirange | 11 | 10 | -1 | false | r | R | false | true | , | 0 | - | 0 | 6150 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 4532 | 4532 | nummultirange | 11 | 10 | -1 | false | m | R | false | true | , | 0 | - | 0 | 6151 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 4533 | 4533 | tsmultirange | 11 | 10 | -1 | false | m | R | false | true | , | 0 | - | 0 | 6152 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 4535 | 4535 | datemultirange | 11 | 10 | -1 | false | m | R | false | true | , | 0 | - | 0 | 6155 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 4536 | 4536 | int8multirange | 11 | 10 | -1 | false | m | R | false | true | , | 0 | - | 0 | 6157 | multirange_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 6150 | 6150 | _int4multirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4451 | 0 | _int4multirangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 6151 | 6151 | _nummultirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4532 | 0 | _nummultirangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 6152 | 6152 | _tsmultirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4533 | 0 | _tsmultirangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 6155 | 6155 | _datemultirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4535 | 0 | _datemultirangein | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 6157 | 6157 | _int8multirange | 11 | 10 | -1 | false | b | A | false | true | , | 0 | array_subscript_handler | 4536 | 0 | _int8multirangein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 10015 | 10015 | pg_am | 11 | 10 | -1 | false | c | C | false | true | , | 2601 | - | 0 | 10014 | pg_amin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 10021 | 10021 | pg_language | 11 | 10 | -1 | false | c | C | false | true | , | 2612 | - | 0 | 10020 | pg_languagein | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 10039 | 10039 | pg_event_trigger | 11 | 10 | -1 | false | c | C | false | true | , | 3466 | - | 0 | 10038 | pg_event_triggerin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 10043 | 10043 | pg_cast | 11 | 10 | -1 | false | c | C | false | true | , | 2605 | - | 0 | 10042 | pg_castin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 10074 | 10074 | pg_extension | 11 | 10 | -1 | false | c | C | false | true | , | 3079 | - | 0 | 10073 | pg_extensionin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 10076 | 10076 | pg_foreign_data_wrapper | 11 | 10 | -1 | false | c | C | false | true | , | 2328 | - | 0 | 10075 | pg_foreign_data_wrapperin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 10078 | 10078 | pg_foreign_server | 11 | 10 | -1 | false | c | C | false | true | , | 1417 | - | 0 | 10077 | pg_foreign_serverin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 12003 | 12003 | pg_constraint | 11 | 10 | -1 | false | c | C | false | true | , | 2606 | - | 0 | 12002 | pg_constraintin | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 12047 | 12047 | pg_namespace | 11 | 10 | -1 | false | c | C | false | true | , | 2615 | - | 0 | 12046 | record_in | NULL | 0 | NULL | NULL | NULL | NULL | d | x | false | 0 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | NULL | NULL | +| 13408 | 13408 | character_data | 13000 | 10 | -1 | false | d | S | false | true | , | 0 | - | 0 | 0 | character_datain | NULL | 0 | NULL | NULL | NULL | NULL | i | x | false | 1043 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | character varying | NULL | +| 13410 | 13410 | sql_identifier | 13000 | 10 | 64 | false | d | S | false | true | , | 0 | - | 0 | 0 | sql_identifierin | NULL | 0 | NULL | NULL | NULL | NULL | c | p | false | 19 | -1 | NULL | NULL | NULL | NULL | NULL | 1 | NULL | name | NULL | ++-------+-------+-------------------------+--------------+----------+--------+----------+---------+-------------+---------------+--------------+----------+----------+-----------------------------+---------+----------+---------------------------+-----------+------------+---------+----------+-----------+------------+----------+------------+------------+-------------+-----------+----------+--------------+---------------+------------+--------+------+---------+-------------------+-------------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_auth_members.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_auth_members.snap new file mode 100644 index 0000000000000..1cb6afdb6b478 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_auth_members.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_auth_members\n ORDER BY roleid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++--------+--------+---------+--------------+ +| roleid | member | grantor | admin_option | ++--------+--------+---------+--------------+ ++--------+--------+---------+--------------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_available_extension_versions.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_available_extension_versions.snap new file mode 100644 index 0000000000000..bf78b04acb23a --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_available_extension_versions.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_available_extension_versions\n ORDER BY name\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++------+---------+-----------+-----------+---------+-------------+--------+----------+---------+ +| name | version | installed | superuser | trusted | relocatable | schema | requires | comment | ++------+---------+-----------+-----------+---------+-------------+--------+----------+---------+ ++------+---------+-----------+-----------+---------+-------------+--------+----------+---------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_cast.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_cast.snap new file mode 100644 index 0000000000000..5b622a37ed51d --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_cast.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_cast\n ORDER BY oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++-----+------------+------------+----------+-------------+------------+------+ +| oid | castsource | casttarget | castfunc | castcontext | castmethod | xmin | ++-----+------------+------------+----------+-------------+------------+------+ ++-----+------------+------------+----------+-------------+------------+------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_event_trigger.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_event_trigger.snap new file mode 100644 index 0000000000000..584f314b8c0be --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_event_trigger.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_event_trigger\n ORDER BY oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++-----+---------+----------+----------+---------+------------+---------+------+ +| oid | evtname | evtevent | evtowner | evtfoid | evtenabled | evttags | xmin | ++-----+---------+----------+----------+---------+------------+---------+------+ ++-----+---------+----------+----------+---------+------------+---------+------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_data_wrapper.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_data_wrapper.snap new file mode 100644 index 0000000000000..ab262c65738a9 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_data_wrapper.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_foreign_data_wrapper\n ORDER BY oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++-----+---------+----------+------------+--------------+--------+------------+------+ +| oid | fdwname | fdwowner | fdwhandler | fdwvalidator | fdwacl | fdwoptions | xmin | ++-----+---------+----------+------------+--------------+--------+------------+------+ ++-----+---------+----------+------------+--------------+--------+------------+------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_server.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_server.snap new file mode 100644 index 0000000000000..74c903a01289a --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_server.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_foreign_server\n ORDER BY oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++-----+---------+----------+--------+---------+------------+--------+------------+------+ +| oid | srvname | srvowner | srvfdw | srvtype | srvversion | srvacl | srvoptions | xmin | ++-----+---------+----------+--------+---------+------------+--------+------------+------+ ++-----+---------+----------+--------+---------+------------+--------+------------+------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_table.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_table.snap new file mode 100644 index 0000000000000..28ac58f0f5a53 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_foreign_table.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_foreign_table\n ORDER BY ftrelid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++---------+----------+-----------+ +| ftrelid | ftserver | ftoptions | ++---------+----------+-----------+ ++---------+----------+-----------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_language.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_language.snap new file mode 100644 index 0000000000000..5a7734b79c6d8 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_language.snap @@ -0,0 +1,11 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_language\n ORDER BY oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++-----+----------+----------+---------+--------------+---------------+-----------+--------------+--------+------+ +| oid | lanname | lanowner | lanispl | lanpltrusted | lanplcallfoid | laninline | lanvalidator | lanacl | xmin | ++-----+----------+----------+---------+--------------+---------------+-----------+--------------+--------+------+ +| 12 | internal | 10 | false | false | 0 | 0 | 2246 | NULL | 1 | +| 13 | c | 10 | false | false | 0 | 0 | 2247 | NULL | 1 | +| 14 | sql | 10 | false | true | 0 | 0 | 2248 | NULL | 1 | ++-----+----------+----------+---------+--------------+---------------+-----------+--------------+--------+------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_locks.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_locks.snap new file mode 100644 index 0000000000000..bbb997da62f5d --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_locks.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_locks\n ORDER BY locktype, database, relation\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++----------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+-----+------+---------+----------+-----------+ +| locktype | database | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | pid | mode | granted | fastpath | waitstart | ++----------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+-----+------+---------+----------+-----------+ ++----------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+-----+------+---------+----------+-----------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_operator.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_operator.snap new file mode 100644 index 0000000000000..a917145a7bbfd --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_operator.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_operator\n ORDER BY oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++-----+---------+--------------+----------+---------+-------------+------------+---------+----------+-----------+--------+-----------+---------+---------+---------+------+ +| oid | oprname | oprnamespace | oprowner | oprkind | oprcanmerge | oprcanhash | oprleft | oprright | oprresult | oprcom | oprnegate | oprcode | oprrest | oprjoin | xmin | ++-----+---------+--------------+----------+---------+-------------+------------+---------+----------+-----------+--------+-----------+---------+---------+---------+------+ ++-----+---------+--------------+----------+---------+-------------+------------+---------+----------+-----------+--------+-----------+---------+---------+---------+------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_rewrite.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_rewrite.snap new file mode 100644 index 0000000000000..7fcc28ec25f61 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_rewrite.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_rewrite\n ORDER BY oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++-----+----------+----------+---------+------------+------------+---------+-----------+------+ +| oid | rulename | ev_class | ev_type | ev_enabled | is_instead | ev_qual | ev_action | xmin | ++-----+----------+----------+---------+------------+------------+---------+-----------+------+ ++-----+----------+----------+---------+------------+------------+---------+-----------+------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_tablespace.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_tablespace.snap new file mode 100644 index 0000000000000..7e828250df7ba --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_tablespace.snap @@ -0,0 +1,10 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_tablespace\n ORDER BY oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++------+------------+----------+--------+------------+------+ +| oid | spcname | spcowner | spcacl | spcoptions | xmin | ++------+------------+----------+--------+------------+------+ +| 1663 | pg_default | 10 | NULL | NULL | 1 | +| 1664 | pg_global | 10 | NULL | NULL | 1 | ++------+------------+----------+--------+------------+------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_timezone_abbrevs.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_timezone_abbrevs.snap new file mode 100644 index 0000000000000..835a8c9d093d3 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_timezone_abbrevs.snap @@ -0,0 +1,9 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_timezone_abbrevs\n ORDER BY abbrev\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++--------+------------------------------------------------+--------+ +| abbrev | utc_offset | is_dst | ++--------+------------------------------------------------+--------+ +| UTC | 0 years 0 mons 0 days 0 hours 0 mins 0.00 secs | false | ++--------+------------------------------------------------+--------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_timezone_names.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_timezone_names.snap new file mode 100644 index 0000000000000..511595f0fbb0f --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_timezone_names.snap @@ -0,0 +1,9 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_timezone_names\n ORDER BY name\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++------+--------+------------------------------------------------+--------+ +| name | abbrev | utc_offset | is_dst | ++------+--------+------------------------------------------------+--------+ +| UTC | UTC | 0 years 0 mons 0 days 0 hours 0 mins 0.00 secs | false | ++------+--------+------------------------------------------------+--------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_user_mapping.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_user_mapping.snap new file mode 100644 index 0000000000000..c34ee9e33e48b --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_introspection__pg_user_mapping.snap @@ -0,0 +1,8 @@ +--- +source: cubesql/src/compile/test/test_introspection.rs +expression: "execute_query(r#\"\n SELECT *\n FROM pg_user_mapping\n ORDER BY oid\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++-----+--------+----------+-----------+ +| oid | umuser | umserver | umoptions | ++-----+--------+----------+-----------+ ++-----+--------+----------+-----------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__age_xid.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__age_xid.snap new file mode 100644 index 0000000000000..5b0081dc8cc60 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__age_xid.snap @@ -0,0 +1,9 @@ +--- +source: cubesql/src/compile/test/test_udfs.rs +expression: "execute_query(r#\"SELECT AGE(0::xid) AS age;\"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++------------+ +| age | ++------------+ +| 2147483647 | ++------------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__format_type.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__format_type.snap index e8e8fceeaf283..53d7c42a1ac4f 100644 --- a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__format_type.snap +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__format_type.snap @@ -83,6 +83,20 @@ expression: "execute_query(\"\n SELECT\n t.oid | 6152 | _tsmultirange | tsmultirange(20)[] | tsmultirange(5)[] | tsmultirange(4)[] | tsmultirange(0)[] | tsmultirange[] | tsmultirange[] | tsmultirange(5)[] | | 6155 | _datemultirange | datemultirange(20)[] | datemultirange(5)[] | datemultirange(4)[] | datemultirange(0)[] | datemultirange[] | datemultirange[] | datemultirange(5)[] | | 6157 | _int8multirange | int8multirange(20)[] | int8multirange(5)[] | int8multirange(4)[] | int8multirange(0)[] | int8multirange[] | int8multirange[] | int8multirange(5)[] | +| 10014 | _pg_am | pg_am(20)[] | pg_am(5)[] | pg_am(4)[] | pg_am(0)[] | pg_am[] | pg_am[] | pg_am(5)[] | +| 10015 | pg_am | pg_am(20) | pg_am(5) | pg_am(4) | pg_am(0) | pg_am | pg_am | pg_am(5) | +| 10020 | _pg_language | pg_language(20)[] | pg_language(5)[] | pg_language(4)[] | pg_language(0)[] | pg_language[] | pg_language[] | pg_language(5)[] | +| 10021 | pg_language | pg_language(20) | pg_language(5) | pg_language(4) | pg_language(0) | pg_language | pg_language | pg_language(5) | +| 10038 | _pg_event_trigger | pg_event_trigger(20)[] | pg_event_trigger(5)[] | pg_event_trigger(4)[] | pg_event_trigger(0)[] | pg_event_trigger[] | pg_event_trigger[] | pg_event_trigger(5)[] | +| 10039 | pg_event_trigger | pg_event_trigger(20) | pg_event_trigger(5) | pg_event_trigger(4) | pg_event_trigger(0) | pg_event_trigger | pg_event_trigger | pg_event_trigger(5) | +| 10042 | _pg_cast | pg_cast(20)[] | pg_cast(5)[] | pg_cast(4)[] | pg_cast(0)[] | pg_cast[] | pg_cast[] | pg_cast(5)[] | +| 10043 | pg_cast | pg_cast(20) | pg_cast(5) | pg_cast(4) | pg_cast(0) | pg_cast | pg_cast | pg_cast(5) | +| 10073 | _pg_extension | pg_extension(20)[] | pg_extension(5)[] | pg_extension(4)[] | pg_extension(0)[] | pg_extension[] | pg_extension[] | pg_extension(5)[] | +| 10074 | pg_extension | pg_extension(20) | pg_extension(5) | pg_extension(4) | pg_extension(0) | pg_extension | pg_extension | pg_extension(5) | +| 10075 | _pg_foreign_data_wrapper | pg_foreign_data_wrapper(20)[] | pg_foreign_data_wrapper(5)[] | pg_foreign_data_wrapper(4)[] | pg_foreign_data_wrapper(0)[] | pg_foreign_data_wrapper[] | pg_foreign_data_wrapper[] | pg_foreign_data_wrapper(5)[] | +| 10076 | pg_foreign_data_wrapper | pg_foreign_data_wrapper(20) | pg_foreign_data_wrapper(5) | pg_foreign_data_wrapper(4) | pg_foreign_data_wrapper(0) | pg_foreign_data_wrapper | pg_foreign_data_wrapper | pg_foreign_data_wrapper(5) | +| 10077 | _pg_foreign_server | pg_foreign_server(20)[] | pg_foreign_server(5)[] | pg_foreign_server(4)[] | pg_foreign_server(0)[] | pg_foreign_server[] | pg_foreign_server[] | pg_foreign_server(5)[] | +| 10078 | pg_foreign_server | pg_foreign_server(20) | pg_foreign_server(5) | pg_foreign_server(4) | pg_foreign_server(0) | pg_foreign_server | pg_foreign_server | pg_foreign_server(5) | | 12002 | _pg_constraint | pg_constraint(20)[] | pg_constraint(5)[] | pg_constraint(4)[] | pg_constraint(0)[] | pg_constraint[] | pg_constraint[] | pg_constraint(5)[] | | 12003 | pg_constraint | pg_constraint(20) | pg_constraint(5) | pg_constraint(4) | pg_constraint(0) | pg_constraint | pg_constraint | pg_constraint(5) | | 12046 | _pg_namespace | pg_namespace(20)[] | pg_namespace(5)[] | pg_namespace(4)[] | pg_namespace(0)[] | pg_namespace[] | pg_namespace[] | pg_namespace(5)[] | diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_datetime_precision_types.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_datetime_precision_types.snap index 73700366ed59c..c565aa3057f77 100644 --- a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_datetime_precision_types.snap +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_datetime_precision_types.snap @@ -83,6 +83,20 @@ expression: "execute_query(\"\n SELECT t.oid, information_schema. | 6152 | NULL | | 6155 | NULL | | 6157 | NULL | +| 10014 | NULL | +| 10015 | NULL | +| 10020 | NULL | +| 10021 | NULL | +| 10038 | NULL | +| 10039 | NULL | +| 10042 | NULL | +| 10043 | NULL | +| 10073 | NULL | +| 10074 | NULL | +| 10075 | NULL | +| 10076 | NULL | +| 10077 | NULL | +| 10078 | NULL | | 12002 | NULL | | 12003 | NULL | | 12046 | NULL | diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_is_in_recovery.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_is_in_recovery.snap new file mode 100644 index 0000000000000..25a85365996f1 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_is_in_recovery.snap @@ -0,0 +1,9 @@ +--- +source: cubesql/src/compile/test/test_udfs.rs +expression: "execute_query(r#\"SELECT pg_is_in_recovery();\"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++-------------------+ +| pg_is_in_recovery | ++-------------------+ +| false | ++-------------------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_numeric_precision_types.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_numeric_precision_types.snap index 168341b356205..e0d84c5b694e5 100644 --- a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_numeric_precision_types.snap +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_numeric_precision_types.snap @@ -83,6 +83,20 @@ expression: "execute_query(\"\n SELECT t.oid, information_schema. | 6152 | NULL | | 6155 | NULL | | 6157 | NULL | +| 10014 | NULL | +| 10015 | NULL | +| 10020 | NULL | +| 10021 | NULL | +| 10038 | NULL | +| 10039 | NULL | +| 10042 | NULL | +| 10043 | NULL | +| 10073 | NULL | +| 10074 | NULL | +| 10075 | NULL | +| 10076 | NULL | +| 10077 | NULL | +| 10078 | NULL | | 12002 | NULL | | 12003 | NULL | | 12046 | NULL | diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_numeric_scale_types.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_numeric_scale_types.snap index 1cfbd9427e1ac..4a30ff5cca488 100644 --- a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_numeric_scale_types.snap +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_numeric_scale_types.snap @@ -83,6 +83,20 @@ expression: "execute_query(\"\n SELECT t.oid, information_schema. | 6152 | NULL | | 6155 | NULL | | 6157 | NULL | +| 10014 | NULL | +| 10015 | NULL | +| 10020 | NULL | +| 10021 | NULL | +| 10038 | NULL | +| 10039 | NULL | +| 10042 | NULL | +| 10043 | NULL | +| 10073 | NULL | +| 10074 | NULL | +| 10075 | NULL | +| 10076 | NULL | +| 10077 | NULL | +| 10078 | NULL | | 12002 | NULL | | 12003 | NULL | | 12046 | NULL | diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_tablespace_location.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_tablespace_location.snap new file mode 100644 index 0000000000000..3764a57b14574 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_tablespace_location.snap @@ -0,0 +1,9 @@ +--- +source: cubesql/src/compile/test/test_udfs.rs +expression: "execute_query(r#\"SELECT pg_tablespace_location(18000::xid) AS pg_tablespace_location;\"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++------------------------+ +| pg_tablespace_location | ++------------------------+ +| | ++------------------------+ diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_type_is_visible.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_type_is_visible.snap index f2f0b0738c8c2..88906808961b9 100644 --- a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_type_is_visible.snap +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__pg_type_is_visible.snap @@ -83,6 +83,20 @@ expression: "execute_query(\"\n SELECT t.oid, t.typname, n.nspnam | 6152 | _tsmultirange | pg_catalog | true | | 6155 | _datemultirange | pg_catalog | true | | 6157 | _int8multirange | pg_catalog | true | +| 10014 | _pg_am | pg_catalog | true | +| 10015 | pg_am | pg_catalog | true | +| 10020 | _pg_language | pg_catalog | true | +| 10021 | pg_language | pg_catalog | true | +| 10038 | _pg_event_trigger | pg_catalog | true | +| 10039 | pg_event_trigger | pg_catalog | true | +| 10042 | _pg_cast | pg_catalog | true | +| 10043 | pg_cast | pg_catalog | true | +| 10073 | _pg_extension | pg_catalog | true | +| 10074 | pg_extension | pg_catalog | true | +| 10075 | _pg_foreign_data_wrapper | pg_catalog | true | +| 10076 | pg_foreign_data_wrapper | pg_catalog | true | +| 10077 | _pg_foreign_server | pg_catalog | true | +| 10078 | pg_foreign_server | pg_catalog | true | | 12002 | _pg_constraint | pg_catalog | true | | 12003 | pg_constraint | pg_catalog | true | | 12046 | _pg_namespace | pg_catalog | true | diff --git a/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__txid_current.snap b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__txid_current.snap new file mode 100644 index 0000000000000..76bc6add2a3d8 --- /dev/null +++ b/rust/cubesql/cubesql/src/compile/test/snapshots/cubesql__compile__test__test_udfs__txid_current.snap @@ -0,0 +1,9 @@ +--- +source: cubesql/src/compile/test/test_udfs.rs +expression: "execute_query(r#\"SELECT txid_current();\"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?" +--- ++--------------+ +| txid_current | ++--------------+ +| 1 | ++--------------+ diff --git a/rust/cubesql/cubesql/src/compile/test/test_introspection.rs b/rust/cubesql/cubesql/src/compile/test/test_introspection.rs index cafc287b5e2f5..0b17967fc7c05 100644 --- a/rust/cubesql/cubesql/src/compile/test/test_introspection.rs +++ b/rust/cubesql/cubesql/src/compile/test/test_introspection.rs @@ -3356,3 +3356,288 @@ order by "table-schema" asc, "table-name" asc, "database-position" asc ); Ok(()) } + +#[tokio::test] +async fn test_pg_auth_members() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_auth_members", + execute_query( + r#" + SELECT * + FROM pg_auth_members + ORDER BY roleid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_available_extension_versions() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_available_extension_versions", + execute_query( + r#" + SELECT * + FROM pg_available_extension_versions + ORDER BY name + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_cast() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_cast", + execute_query( + r#" + SELECT * + FROM pg_cast + ORDER BY oid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_event_trigger() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_event_trigger", + execute_query( + r#" + SELECT * + FROM pg_event_trigger + ORDER BY oid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_foreign_data_wrapper() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_foreign_data_wrapper", + execute_query( + r#" + SELECT * + FROM pg_foreign_data_wrapper + ORDER BY oid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_foreign_server() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_foreign_server", + execute_query( + r#" + SELECT * + FROM pg_foreign_server + ORDER BY oid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_foreign_table() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_foreign_table", + execute_query( + r#" + SELECT * + FROM pg_foreign_table + ORDER BY ftrelid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_language() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_language", + execute_query( + r#" + SELECT * + FROM pg_language + ORDER BY oid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_locks() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_locks", + execute_query( + r#" + SELECT * + FROM pg_locks + ORDER BY locktype, database, relation + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_operator() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_operator", + execute_query( + r#" + SELECT * + FROM pg_operator + ORDER BY oid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_rewrite() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_rewrite", + execute_query( + r#" + SELECT * + FROM pg_rewrite + ORDER BY oid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_tablespace() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_tablespace", + execute_query( + r#" + SELECT * + FROM pg_tablespace + ORDER BY oid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_timezone_abbrevs() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_timezone_abbrevs", + execute_query( + r#" + SELECT * + FROM pg_timezone_abbrevs + ORDER BY abbrev + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_timezone_names() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_timezone_names", + execute_query( + r#" + SELECT * + FROM pg_timezone_names + ORDER BY name + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_user_mapping() -> Result<(), CubeError> { + insta::assert_snapshot!( + "pg_user_mapping", + execute_query( + r#" + SELECT * + FROM pg_user_mapping + ORDER BY oid + "# + .to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} diff --git a/rust/cubesql/cubesql/src/compile/test/test_udfs.rs b/rust/cubesql/cubesql/src/compile/test/test_udfs.rs index 37e884adef88b..a2e41efa3c856 100644 --- a/rust/cubesql/cubesql/src/compile/test/test_udfs.rs +++ b/rust/cubesql/cubesql/src/compile/test/test_udfs.rs @@ -1327,3 +1327,67 @@ async fn test_age() -> Result<(), CubeError> { Ok(()) } + +#[tokio::test] +async fn test_age_xid() -> Result<(), CubeError> { + init_testing_logger(); + + insta::assert_snapshot!( + "age_xid", + execute_query( + r#"SELECT AGE(0::xid) AS age;"#.to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_txid_current() -> Result<(), CubeError> { + init_testing_logger(); + + insta::assert_snapshot!( + "txid_current", + execute_query( + r#"SELECT txid_current();"#.to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_is_in_recovery() -> Result<(), CubeError> { + init_testing_logger(); + + insta::assert_snapshot!( + "pg_is_in_recovery", + execute_query( + r#"SELECT pg_is_in_recovery();"#.to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} + +#[tokio::test] +async fn test_pg_tablespace_location() -> Result<(), CubeError> { + init_testing_logger(); + + insta::assert_snapshot!( + "pg_tablespace_location", + execute_query( + r#"SELECT pg_tablespace_location(18000::xid) AS pg_tablespace_location;"#.to_string(), + DatabaseProtocol::PostgreSQL + ) + .await? + ); + + Ok(()) +} diff --git a/rust/cubesql/cubesql/src/sql/statement.rs b/rust/cubesql/cubesql/src/sql/statement.rs index aec18178e24e5..e12a6ad9ecb74 100644 --- a/rust/cubesql/cubesql/src/sql/statement.rs +++ b/rust/cubesql/cubesql/src/sql/statement.rs @@ -715,6 +715,11 @@ impl<'ast> Visitor<'ast, ConnectionError> for CastReplacer { *expr = *cast_expr.clone(); } + "xid" => { + self.visit_expr(&mut *cast_expr)?; + + *data_type = ast::DataType::UnsignedInt(None); + } "int2" => { self.visit_expr(&mut *cast_expr)?; @@ -767,17 +772,22 @@ impl<'ast> Visitor<'ast, ConnectionError> for CastReplacer { }) } } + "\"char\"" => { + self.visit_expr(&mut *cast_expr)?; + + *data_type = ast::DataType::Text; + } // TODO: _ => (), }, ast::DataType::Regclass => match &**cast_expr { Expr::Value(val) => { let str_val = self.parse_value_to_str(&val); - if str_val.is_none() { + let Some(str_val) = str_val else { return Ok(()); - } + }; + let str_val = str_val.strip_prefix("pg_catalog.").unwrap_or(&str_val); - let str_val = str_val.unwrap(); for typ in PgType::get_all() { if typ.typname == str_val { *expr = Expr::Value(Value::Number(typ.typrelid.to_string(), false)); diff --git a/rust/cubesql/pg-srv/src/pg_type.rs b/rust/cubesql/pg-srv/src/pg_type.rs index 9bf97de13d508..9a89bde9b5a46 100644 --- a/rust/cubesql/pg-srv/src/pg_type.rs +++ b/rust/cubesql/pg-srv/src/pg_type.rs @@ -1921,6 +1921,328 @@ define_pg_types![ typreceive_oid: 0, }, + ARRAYPGAM (10014) { + typname: "_pg_am", + regtype: "pg_am[]", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "b", + typcategory: "A", + typisprefered: false, + typisdefined: true, + typrelid: 0, + typsubscript: "array_subscript_handler", + typelem: 10015, + typarray: 0, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "array_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + PGAM (10015) { + typname: "pg_am", + regtype: "pg_am", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "c", + typcategory: "C", + typisprefered: false, + typisdefined: true, + typrelid: 2601, + typsubscript: "-", + typelem: 0, + typarray: 10014, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "record_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + ARRAYPGLANGUAGE (10020) { + typname: "_pg_language", + regtype: "pg_language[]", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "b", + typcategory: "A", + typisprefered: false, + typisdefined: true, + typrelid: 0, + typsubscript: "array_subscript_handler", + typelem: 10021, + typarray: 0, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "array_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + PGLANGUAGE (10021) { + typname: "pg_language", + regtype: "pg_language", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "c", + typcategory: "C", + typisprefered: false, + typisdefined: true, + typrelid: 2612, + typsubscript: "-", + typelem: 0, + typarray: 10020, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "record_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + ARRAYPGEVENTTRIGGER (10038) { + typname: "_pg_event_trigger", + regtype: "pg_event_trigger[]", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "b", + typcategory: "A", + typisprefered: false, + typisdefined: true, + typrelid: 0, + typsubscript: "array_subscript_handler", + typelem: 10039, + typarray: 0, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "array_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + PGEVENTTRIGGER (10039) { + typname: "pg_event_trigger", + regtype: "pg_event_trigger", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "c", + typcategory: "C", + typisprefered: false, + typisdefined: true, + typrelid: 3466, + typsubscript: "-", + typelem: 0, + typarray: 10038, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "record_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + ARRAYPGCAST (10042) { + typname: "_pg_cast", + regtype: "pg_cast[]", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "b", + typcategory: "A", + typisprefered: false, + typisdefined: true, + typrelid: 0, + typsubscript: "array_subscript_handler", + typelem: 10043, + typarray: 0, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "array_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + PGCAST (10043) { + typname: "pg_cast", + regtype: "pg_cast", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "c", + typcategory: "C", + typisprefered: false, + typisdefined: true, + typrelid: 2605, + typsubscript: "-", + typelem: 0, + typarray: 10042, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "record_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + ARRAYPGEXTENSION (10073) { + typname: "_pg_extension", + regtype: "pg_extension[]", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "b", + typcategory: "A", + typisprefered: false, + typisdefined: true, + typrelid: 0, + typsubscript: "array_subscript_handler", + typelem: 10074, + typarray: 0, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "array_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + PGEXTENSION (10074) { + typname: "pg_extension", + regtype: "pg_extension", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "c", + typcategory: "C", + typisprefered: false, + typisdefined: true, + typrelid: 3079, + typsubscript: "-", + typelem: 0, + typarray: 10073, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "record_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + ARRAYPGFOREIGNDATAWRAPPER (10075) { + typname: "_pg_foreign_data_wrapper", + regtype: "pg_foreign_data_wrapper[]", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "b", + typcategory: "A", + typisprefered: false, + typisdefined: true, + typrelid: 0, + typsubscript: "array_subscript_handler", + typelem: 10076, + typarray: 0, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "array_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + PGFOREIGNDATAWRAPPER (10076) { + typname: "pg_foreign_data_wrapper", + regtype: "pg_foreign_data_wrapper", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "c", + typcategory: "C", + typisprefered: false, + typisdefined: true, + typrelid: 2328, + typsubscript: "-", + typelem: 0, + typarray: 10075, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "record_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + ARRAYPGFOREIGNSERVER (10077) { + typname: "_pg_foreign_server", + regtype: "pg_foreign_server[]", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "b", + typcategory: "A", + typisprefered: false, + typisdefined: true, + typrelid: 0, + typsubscript: "array_subscript_handler", + typelem: 10078, + typarray: 0, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "array_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + + PGFOREIGNSERVER (10078) { + typname: "pg_foreign_server", + regtype: "pg_foreign_server", + typnamespace: 11, + typowner: 10, + typlen: -1, + typbyval: false, + typtype: "c", + typcategory: "C", + typisprefered: false, + typisdefined: true, + typrelid: 1417, + typsubscript: "-", + typelem: 0, + typarray: 10077, + typalign: "d", + typstorage: "x", + typbasetype: 0, + typreceive: "record_recv", + // TODO: Get from pg_proc + typreceive_oid: 0, + }, + ARRAYPGCONSTRAINT (12002) { typname: "_pg_constraint", regtype: "pg_constraint[]", diff --git a/rust/cubesqlplanner/Cargo.lock b/rust/cubesqlplanner/Cargo.lock index 39d04db2a9904..7a0f6784719b7 100644 --- a/rust/cubesqlplanner/Cargo.lock +++ b/rust/cubesqlplanner/Cargo.lock @@ -664,7 +664,7 @@ dependencies = [ [[package]] name = "cube-ext" version = "1.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "arrow", "chrono", @@ -777,7 +777,7 @@ dependencies = [ [[package]] name = "datafusion" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -810,7 +810,7 @@ dependencies = [ [[package]] name = "datafusion-common" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "arrow", "ordered-float 2.10.1", @@ -821,7 +821,7 @@ dependencies = [ [[package]] name = "datafusion-data-access" version = "1.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "async-trait", "chrono", @@ -834,7 +834,7 @@ dependencies = [ [[package]] name = "datafusion-expr" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" version = "7.0.0" -source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6#7803f7e1cb8fa3d7b25451de35b8765e1ce4a3f6" +source = "git+https://github.com/cube-js/arrow-datafusion.git?rev=016c22f74b82f241fc01abd205020cb52b6c911e#016c22f74b82f241fc01abd205020cb52b6c911e" dependencies = [ "ahash 0.7.8", "arrow", @@ -2871,7 +2871,7 @@ dependencies = [ [[package]] name = "sqlparser" version = "0.16.0" -source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=34f22de680caa5fe586def5b336d56efe43c8cc4#34f22de680caa5fe586def5b336d56efe43c8cc4" +source = "git+https://github.com/cube-js/sqlparser-rs.git?rev=e14d5bf45367edd8679cbc15ccee56693da8e4fb#e14d5bf45367edd8679cbc15ccee56693da8e4fb" dependencies = [ "log", ] From 80c281f330b16fd27a7b61d9ff030ce4fcf92b13 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Tue, 29 Jul 2025 18:05:16 +0200 Subject: [PATCH 3/5] feat(clickhouse-driver): Upgrade @clickhouse/client from 1.7.0 to 1.12.0 (#9829) --- packages/cubejs-clickhouse-driver/package.json | 2 +- packages/cubejs-schema-compiler/package.json | 2 +- yarn.lock | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/cubejs-clickhouse-driver/package.json b/packages/cubejs-clickhouse-driver/package.json index 6cd3ddb9892fe..fc7c52c4405d3 100644 --- a/packages/cubejs-clickhouse-driver/package.json +++ b/packages/cubejs-clickhouse-driver/package.json @@ -27,7 +27,7 @@ "integration:clickhouse": "jest dist/test" }, "dependencies": { - "@clickhouse/client": "^1.7.0", + "@clickhouse/client": "^1.12.0", "@cubejs-backend/base-driver": "1.3.44", "@cubejs-backend/shared": "1.3.44", "moment": "^2.24.0", diff --git a/packages/cubejs-schema-compiler/package.json b/packages/cubejs-schema-compiler/package.json index c95e3bf099a15..173a23df92cc2 100644 --- a/packages/cubejs-schema-compiler/package.json +++ b/packages/cubejs-schema-compiler/package.json @@ -59,7 +59,7 @@ "yaml": "^2.7.1" }, "devDependencies": { - "@clickhouse/client": "^1.7.0", + "@clickhouse/client": "^1.12.0", "@cubejs-backend/linter": "1.3.44", "@cubejs-backend/query-orchestrator": "1.3.44", "@types/babel__code-frame": "^7.0.6", diff --git a/yarn.lock b/yarn.lock index 4a85bba90af51..e574aef82b9e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2316,17 +2316,17 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@clickhouse/client-common@1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@clickhouse/client-common/-/client-common-1.7.0.tgz#4d0315158d275ea8d55ed8e04d69871832f4d8ba" - integrity sha512-RkHYf23/wyv/6C0KcVD4nRX4JAn/Y+9AZBQPlrSId2JwXsmAnjDkkKpuPLwZPNVH6J3BkW+y8bQCEk3VHQzArw== +"@clickhouse/client-common@1.12.0": + version "1.12.0" + resolved "https://registry.yarnpkg.com/@clickhouse/client-common/-/client-common-1.12.0.tgz#62da883cde96c95de68b8729345e5f99a04d0330" + integrity sha512-cyI4n7u9jK30d9q1q0ceQ7IwJ/MtTs5HxoQfc8yHpN+ok5wqaU2jAtq5hpa1z7C7sS1pDy/ZOFmOzg1v1F683g== -"@clickhouse/client@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@clickhouse/client/-/client-1.7.0.tgz#a6b7b72db825162b1f54c2fe383f349dbf437fbd" - integrity sha512-2aESIFRbSPWEZIU++sXt1RYWgEKZH75C3jyXLcRBeafMDjq7bKV2AX1X9n9xscN+Y4VvnkBzkjFxcbuqFSBk6w== +"@clickhouse/client@^1.12.0": + version "1.12.0" + resolved "https://registry.yarnpkg.com/@clickhouse/client/-/client-1.12.0.tgz#784fdf10641c6a92971423d50bcd0edb044781b1" + integrity sha512-vJUSX8THhTzlVn0WxPukVjOgNRaSoY02ubQkB0LpqNoHFxXuF5jQZZAYvGZWpBGbYQ/4gfPrqu8g4TX5UKeNxA== dependencies: - "@clickhouse/client-common" "1.7.0" + "@clickhouse/client-common" "1.12.0" "@codemirror/highlight@^0.19.0": version "0.19.6" From c2363c471efaede477c628728be592ed5f7284a2 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Tue, 29 Jul 2025 18:11:43 +0200 Subject: [PATCH 4/5] v1.3.45 --- CHANGELOG.md | 13 ++++ lerna.json | 2 +- packages/cubejs-api-gateway/CHANGELOG.md | 6 ++ packages/cubejs-api-gateway/package.json | 8 +-- packages/cubejs-athena-driver/CHANGELOG.md | 4 ++ packages/cubejs-athena-driver/package.json | 10 ++-- packages/cubejs-backend-cloud/CHANGELOG.md | 4 ++ packages/cubejs-backend-cloud/package.json | 6 +- packages/cubejs-backend-maven/CHANGELOG.md | 4 ++ packages/cubejs-backend-maven/package.json | 6 +- packages/cubejs-backend-native/CHANGELOG.md | 6 ++ packages/cubejs-backend-native/package.json | 8 +-- packages/cubejs-backend-shared/CHANGELOG.md | 6 ++ packages/cubejs-backend-shared/package.json | 4 +- packages/cubejs-base-driver/CHANGELOG.md | 4 ++ packages/cubejs-base-driver/package.json | 6 +- packages/cubejs-bigquery-driver/CHANGELOG.md | 4 ++ packages/cubejs-bigquery-driver/package.json | 8 +-- packages/cubejs-cli/CHANGELOG.md | 4 ++ packages/cubejs-cli/package.json | 12 ++-- .../cubejs-clickhouse-driver/CHANGELOG.md | 6 ++ .../cubejs-clickhouse-driver/package.json | 10 ++-- packages/cubejs-client-core/CHANGELOG.md | 4 ++ packages/cubejs-client-core/package.json | 4 +- packages/cubejs-client-dx/CHANGELOG.md | 4 ++ packages/cubejs-client-dx/package.json | 2 +- packages/cubejs-client-ngx/CHANGELOG.md | 4 ++ packages/cubejs-client-ngx/package.json | 2 +- packages/cubejs-client-react/CHANGELOG.md | 4 ++ packages/cubejs-client-react/package.json | 4 +- packages/cubejs-client-vue/CHANGELOG.md | 4 ++ packages/cubejs-client-vue/package.json | 4 +- packages/cubejs-client-vue3/CHANGELOG.md | 4 ++ packages/cubejs-client-vue3/package.json | 4 +- .../cubejs-client-ws-transport/CHANGELOG.md | 4 ++ .../cubejs-client-ws-transport/package.json | 6 +- packages/cubejs-crate-driver/CHANGELOG.md | 4 ++ packages/cubejs-crate-driver/package.json | 10 ++-- packages/cubejs-cubestore-driver/CHANGELOG.md | 4 ++ packages/cubejs-cubestore-driver/package.json | 12 ++-- .../CHANGELOG.md | 4 ++ .../package.json | 12 ++-- .../cubejs-dbt-schema-extension/CHANGELOG.md | 4 ++ .../cubejs-dbt-schema-extension/package.json | 8 +-- packages/cubejs-docker/CHANGELOG.md | 4 ++ packages/cubejs-docker/package.json | 60 +++++++++---------- packages/cubejs-dremio-driver/CHANGELOG.md | 4 ++ packages/cubejs-dremio-driver/package.json | 12 ++-- packages/cubejs-druid-driver/CHANGELOG.md | 4 ++ packages/cubejs-druid-driver/package.json | 10 ++-- packages/cubejs-duckdb-driver/CHANGELOG.md | 4 ++ packages/cubejs-duckdb-driver/package.json | 12 ++-- .../cubejs-elasticsearch-driver/CHANGELOG.md | 4 ++ .../cubejs-elasticsearch-driver/package.json | 8 +-- packages/cubejs-firebolt-driver/CHANGELOG.md | 4 ++ packages/cubejs-firebolt-driver/package.json | 12 ++-- packages/cubejs-hive-driver/CHANGELOG.md | 4 ++ packages/cubejs-hive-driver/package.json | 8 +-- packages/cubejs-jdbc-driver/CHANGELOG.md | 4 ++ packages/cubejs-jdbc-driver/package.json | 8 +-- packages/cubejs-ksql-driver/CHANGELOG.md | 4 ++ packages/cubejs-ksql-driver/package.json | 10 ++-- packages/cubejs-linter/CHANGELOG.md | 4 ++ packages/cubejs-linter/package.json | 2 +- .../cubejs-materialize-driver/CHANGELOG.md | 4 ++ .../cubejs-materialize-driver/package.json | 12 ++-- packages/cubejs-mongobi-driver/CHANGELOG.md | 4 ++ packages/cubejs-mongobi-driver/package.json | 8 +-- packages/cubejs-mssql-driver/CHANGELOG.md | 4 ++ packages/cubejs-mssql-driver/package.json | 6 +- .../CHANGELOG.md | 4 ++ .../package.json | 8 +-- packages/cubejs-mysql-driver/CHANGELOG.md | 4 ++ packages/cubejs-mysql-driver/package.json | 10 ++-- packages/cubejs-oracle-driver/CHANGELOG.md | 4 ++ packages/cubejs-oracle-driver/package.json | 4 +- packages/cubejs-pinot-driver/CHANGELOG.md | 4 ++ packages/cubejs-pinot-driver/package.json | 10 ++-- packages/cubejs-playground/CHANGELOG.md | 4 ++ packages/cubejs-playground/package.json | 6 +- packages/cubejs-postgres-driver/CHANGELOG.md | 4 ++ packages/cubejs-postgres-driver/package.json | 10 ++-- packages/cubejs-prestodb-driver/CHANGELOG.md | 6 ++ packages/cubejs-prestodb-driver/package.json | 8 +-- .../cubejs-query-orchestrator/CHANGELOG.md | 6 ++ .../cubejs-query-orchestrator/package.json | 10 ++-- packages/cubejs-questdb-driver/CHANGELOG.md | 4 ++ packages/cubejs-questdb-driver/package.json | 12 ++-- packages/cubejs-redshift-driver/CHANGELOG.md | 4 ++ packages/cubejs-redshift-driver/package.json | 10 ++-- packages/cubejs-schema-compiler/CHANGELOG.md | 6 ++ packages/cubejs-schema-compiler/package.json | 10 ++-- packages/cubejs-server-core/CHANGELOG.md | 4 ++ packages/cubejs-server-core/package.json | 22 +++---- packages/cubejs-server/CHANGELOG.md | 4 ++ packages/cubejs-server/package.json | 14 ++--- packages/cubejs-snowflake-driver/CHANGELOG.md | 4 ++ packages/cubejs-snowflake-driver/package.json | 8 +-- packages/cubejs-sqlite-driver/CHANGELOG.md | 4 ++ packages/cubejs-sqlite-driver/package.json | 8 +-- packages/cubejs-templates/CHANGELOG.md | 4 ++ packages/cubejs-templates/package.json | 6 +- packages/cubejs-testing-drivers/CHANGELOG.md | 4 ++ packages/cubejs-testing-drivers/package.json | 36 +++++------ packages/cubejs-testing-shared/CHANGELOG.md | 4 ++ packages/cubejs-testing-shared/package.json | 10 ++-- packages/cubejs-testing/CHANGELOG.md | 4 ++ packages/cubejs-testing/package.json | 22 +++---- packages/cubejs-trino-driver/CHANGELOG.md | 4 ++ packages/cubejs-trino-driver/package.json | 12 ++-- packages/cubejs-vertica-driver/CHANGELOG.md | 4 ++ packages/cubejs-vertica-driver/package.json | 12 ++-- rust/cubesql/CHANGELOG.md | 6 ++ rust/cubesql/package.json | 2 +- rust/cubestore/CHANGELOG.md | 4 ++ rust/cubestore/package.json | 6 +- 116 files changed, 543 insertions(+), 286 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 318391e4b3468..5122b8ae86ad2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +### Bug Fixes + +- **api-gateway:** Fix member sql extraction in meta?extended ([#9826](https://github.com/cube-js/cube/issues/9826)) ([4647ea3](https://github.com/cube-js/cube/commit/4647ea3fb23e5d3b5cfd8b06555c3d6e47e55076)) +- **prestodb/trino-driver:** Specify correct timeouts for query execution ([#9827](https://github.com/cube-js/cube/issues/9827)) ([394eb84](https://github.com/cube-js/cube/commit/394eb84910160e86e4634df6bcc78c7ac803803b)) + +### Features + +- **clickhouse-driver:** Upgrade @clickhouse/client from 1.7.0 to 1.12.0 ([#9829](https://github.com/cube-js/cube/issues/9829)) ([80c281f](https://github.com/cube-js/cube/commit/80c281f330b16fd27a7b61d9ff030ce4fcf92b13)) +- **cubesql:** Improve DataGrip compatibility ([#9825](https://github.com/cube-js/cube/issues/9825)) ([18b09ee](https://github.com/cube-js/cube/commit/18b09ee5408bd82d28eb06f6f23e7cab29a2ce54)) +- **query-ochestrator:** Reduce number of cache set for used flag ([#9828](https://github.com/cube-js/cube/issues/9828)) ([b9ff371](https://github.com/cube-js/cube/commit/b9ff3714ecdbe058f941ee79a3e6e6e0687e1005)) + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) ### Bug Fixes diff --git a/lerna.json b/lerna.json index e6d4d269505f1..67396a47afecb 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.3.44", + "version": "1.3.45", "npmClient": "yarn", "command": { "bootstrap": { diff --git a/packages/cubejs-api-gateway/CHANGELOG.md b/packages/cubejs-api-gateway/CHANGELOG.md index 509c40a92530c..ffab75c6e341d 100644 --- a/packages/cubejs-api-gateway/CHANGELOG.md +++ b/packages/cubejs-api-gateway/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +### Bug Fixes + +- **api-gateway:** Fix member sql extraction in meta?extended ([#9826](https://github.com/cube-js/cube/issues/9826)) ([4647ea3](https://github.com/cube-js/cube/commit/4647ea3fb23e5d3b5cfd8b06555c3d6e47e55076)) + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/api-gateway diff --git a/packages/cubejs-api-gateway/package.json b/packages/cubejs-api-gateway/package.json index 830a4b877e3c3..685ce498ca88a 100644 --- a/packages/cubejs-api-gateway/package.json +++ b/packages/cubejs-api-gateway/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/api-gateway", "description": "Cube.js API Gateway", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,8 +27,8 @@ "dist/src/*" ], "dependencies": { - "@cubejs-backend/native": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/native": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@ungap/structured-clone": "^0.3.4", "assert-never": "^1.4.0", "body-parser": "^1.19.0", @@ -51,7 +51,7 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/express": "^4.17.21", "@types/jest": "^29", "@types/jsonwebtoken": "^9.0.2", diff --git a/packages/cubejs-athena-driver/CHANGELOG.md b/packages/cubejs-athena-driver/CHANGELOG.md index c4579394b7036..0cdb74ea73629 100644 --- a/packages/cubejs-athena-driver/CHANGELOG.md +++ b/packages/cubejs-athena-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/athena-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/athena-driver diff --git a/packages/cubejs-athena-driver/package.json b/packages/cubejs-athena-driver/package.json index 7dd351488919a..491cefcd137ff 100644 --- a/packages/cubejs-athena-driver/package.json +++ b/packages/cubejs-athena-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/athena-driver", "description": "Cube.js Athena database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -29,13 +29,13 @@ "types": "dist/src/index.d.ts", "dependencies": { "@aws-sdk/client-athena": "^3.22.0", - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "sqlstring": "^2.3.1" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "@types/ramda": "^0.27.40", "typescript": "~5.2.2" }, diff --git a/packages/cubejs-backend-cloud/CHANGELOG.md b/packages/cubejs-backend-cloud/CHANGELOG.md index de35efded54b8..149846671549b 100644 --- a/packages/cubejs-backend-cloud/CHANGELOG.md +++ b/packages/cubejs-backend-cloud/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/cloud + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/cloud diff --git a/packages/cubejs-backend-cloud/package.json b/packages/cubejs-backend-cloud/package.json index d79622cc36425..048fe0538a703 100644 --- a/packages/cubejs-backend-cloud/package.json +++ b/packages/cubejs-backend-cloud/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/cloud", - "version": "1.3.44", + "version": "1.3.45", "description": "Cube Cloud package", "main": "dist/src/index.js", "typings": "dist/src/index.d.ts", @@ -25,7 +25,7 @@ "devDependencies": { "@babel/core": "^7.24.5", "@babel/preset-env": "^7.24.5", - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/fs-extra": "^9.0.8", "@types/jest": "^29", "jest": "^29", @@ -33,7 +33,7 @@ }, "dependencies": { "@cubejs-backend/dotenv": "^9.0.2", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/shared": "1.3.45", "chokidar": "^3.5.1", "env-var": "^6.3.0", "form-data": "^4.0.0", diff --git a/packages/cubejs-backend-maven/CHANGELOG.md b/packages/cubejs-backend-maven/CHANGELOG.md index 17a54294731db..b9ee4c1409451 100644 --- a/packages/cubejs-backend-maven/CHANGELOG.md +++ b/packages/cubejs-backend-maven/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/maven + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/maven diff --git a/packages/cubejs-backend-maven/package.json b/packages/cubejs-backend-maven/package.json index 1328d51b1dff4..6da0d5e361dcf 100644 --- a/packages/cubejs-backend-maven/package.json +++ b/packages/cubejs-backend-maven/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/maven", "description": "Cube.js Maven Wrapper for java dependencies downloading", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "license": "Apache-2.0", "repository": { "type": "git", @@ -31,12 +31,12 @@ "dist/src/*" ], "dependencies": { - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/shared": "1.3.45", "source-map-support": "^0.5.19", "xmlbuilder2": "^2.4.0" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "@types/node": "^20", "jest": "^29", diff --git a/packages/cubejs-backend-native/CHANGELOG.md b/packages/cubejs-backend-native/CHANGELOG.md index be8488c40c163..d087f1324417f 100644 --- a/packages/cubejs-backend-native/CHANGELOG.md +++ b/packages/cubejs-backend-native/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +### Features + +- **cubesql:** Improve DataGrip compatibility ([#9825](https://github.com/cube-js/cube/issues/9825)) ([18b09ee](https://github.com/cube-js/cube/commit/18b09ee5408bd82d28eb06f6f23e7cab29a2ce54)) + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/native diff --git a/packages/cubejs-backend-native/package.json b/packages/cubejs-backend-native/package.json index be7857b533531..eb89ae349d399 100644 --- a/packages/cubejs-backend-native/package.json +++ b/packages/cubejs-backend-native/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/native", - "version": "1.3.44", + "version": "1.3.45", "author": "Cube Dev, Inc.", "description": "Native module for Cube.js (binding to Rust codebase)", "main": "dist/js/index.js", @@ -34,7 +34,7 @@ "dist/js" ], "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "@types/node": "^20", "cargo-cp-artifact": "^0.1.9", @@ -44,8 +44,8 @@ "uuid": "^8.3.2" }, "dependencies": { - "@cubejs-backend/cubesql": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/cubesql": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@cubejs-infra/post-installer": "^0.0.7" }, "resources": { diff --git a/packages/cubejs-backend-shared/CHANGELOG.md b/packages/cubejs-backend-shared/CHANGELOG.md index cb55b572cdbf7..dfb078ca5cb81 100644 --- a/packages/cubejs-backend-shared/CHANGELOG.md +++ b/packages/cubejs-backend-shared/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +### Features + +- **query-ochestrator:** Reduce number of cache set for used flag ([#9828](https://github.com/cube-js/cube/issues/9828)) ([b9ff371](https://github.com/cube-js/cube/commit/b9ff3714ecdbe058f941ee79a3e6e6e0687e1005)) + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/shared diff --git a/packages/cubejs-backend-shared/package.json b/packages/cubejs-backend-shared/package.json index 4f4bab83e8e75..106a0d38dbd01 100644 --- a/packages/cubejs-backend-shared/package.json +++ b/packages/cubejs-backend-shared/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/shared", - "version": "1.3.44", + "version": "1.3.45", "description": "Shared code for Cube.js backend packages", "main": "dist/src/index.js", "typings": "dist/src/index.d.ts", @@ -22,7 +22,7 @@ "author": "Cube Dev, Inc.", "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/bytes": "^3.1.5", "@types/cli-progress": "^3.9.1", "@types/decompress": "^4.2.7", diff --git a/packages/cubejs-base-driver/CHANGELOG.md b/packages/cubejs-base-driver/CHANGELOG.md index 015325e936c02..f0f82acfbefd1 100644 --- a/packages/cubejs-base-driver/CHANGELOG.md +++ b/packages/cubejs-base-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/base-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) ### Bug Fixes diff --git a/packages/cubejs-base-driver/package.json b/packages/cubejs-base-driver/package.json index 6d682e1b2eaed..cb0a1e278964c 100644 --- a/packages/cubejs-base-driver/package.json +++ b/packages/cubejs-base-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/base-driver", "description": "Cube.js Base Driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -33,11 +33,11 @@ "@aws-sdk/s3-request-presigner": "^3.49.0", "@azure/identity": "^4.4.1", "@azure/storage-blob": "^12.9.0", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/shared": "1.3.45", "@google-cloud/storage": "^7.13.0" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "@types/node": "^20", "jest": "^29", diff --git a/packages/cubejs-bigquery-driver/CHANGELOG.md b/packages/cubejs-bigquery-driver/CHANGELOG.md index 3d62b6b5dba7f..242a1b2819a31 100644 --- a/packages/cubejs-bigquery-driver/CHANGELOG.md +++ b/packages/cubejs-bigquery-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/bigquery-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/bigquery-driver diff --git a/packages/cubejs-bigquery-driver/package.json b/packages/cubejs-bigquery-driver/package.json index 962d5bee2c3ab..3d2885ef9b753 100644 --- a/packages/cubejs-bigquery-driver/package.json +++ b/packages/cubejs-bigquery-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/bigquery-driver", "description": "Cube.js BigQuery database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -28,15 +28,15 @@ "main": "index.js", "types": "dist/src/index.d.ts", "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", "@cubejs-backend/dotenv": "^9.0.2", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/shared": "1.3.45", "@google-cloud/bigquery": "^7.7.0", "@google-cloud/storage": "^7.13.0", "ramda": "^0.27.2" }, "devDependencies": { - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/testing-shared": "1.3.45", "@types/big.js": "^6.2.2", "@types/dedent": "^0.7.0", "@types/jest": "^29", diff --git a/packages/cubejs-cli/CHANGELOG.md b/packages/cubejs-cli/CHANGELOG.md index 6ca3183f66568..3ab3fe9e5a28e 100644 --- a/packages/cubejs-cli/CHANGELOG.md +++ b/packages/cubejs-cli/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package cubejs-cli + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package cubejs-cli diff --git a/packages/cubejs-cli/package.json b/packages/cubejs-cli/package.json index 824d063d68ed2..5ba114d3dbe84 100644 --- a/packages/cubejs-cli/package.json +++ b/packages/cubejs-cli/package.json @@ -2,7 +2,7 @@ "name": "cubejs-cli", "description": "Cube.js Command Line Interface", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -30,10 +30,10 @@ "LICENSE" ], "dependencies": { - "@cubejs-backend/cloud": "1.3.44", + "@cubejs-backend/cloud": "1.3.45", "@cubejs-backend/dotenv": "^9.0.2", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "chalk": "^2.4.2", "cli-progress": "^3.10", "commander": "^2.19.0", @@ -50,8 +50,8 @@ "colors": "1.4.0" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/server": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/server": "1.3.45", "@oclif/command": "^1.8.0", "@types/cli-progress": "^3.8.0", "@types/cross-spawn": "^6.0.2", diff --git a/packages/cubejs-clickhouse-driver/CHANGELOG.md b/packages/cubejs-clickhouse-driver/CHANGELOG.md index c216f4058510f..13407e15f96dc 100644 --- a/packages/cubejs-clickhouse-driver/CHANGELOG.md +++ b/packages/cubejs-clickhouse-driver/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +### Features + +- **clickhouse-driver:** Upgrade @clickhouse/client from 1.7.0 to 1.12.0 ([#9829](https://github.com/cube-js/cube/issues/9829)) ([80c281f](https://github.com/cube-js/cube/commit/80c281f330b16fd27a7b61d9ff030ce4fcf92b13)) + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/clickhouse-driver diff --git a/packages/cubejs-clickhouse-driver/package.json b/packages/cubejs-clickhouse-driver/package.json index fc7c52c4405d3..8c9058913bf59 100644 --- a/packages/cubejs-clickhouse-driver/package.json +++ b/packages/cubejs-clickhouse-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/clickhouse-driver", "description": "Cube.js ClickHouse database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -28,16 +28,16 @@ }, "dependencies": { "@clickhouse/client": "^1.12.0", - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "moment": "^2.24.0", "sqlstring": "^2.3.1", "uuid": "^8.3.2" }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "@types/jest": "^29", "jest": "^29", "typescript": "~5.2.2" diff --git a/packages/cubejs-client-core/CHANGELOG.md b/packages/cubejs-client-core/CHANGELOG.md index 70d6495506ae9..f026cc2b08d7f 100644 --- a/packages/cubejs-client-core/CHANGELOG.md +++ b/packages/cubejs-client-core/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-client/core + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-client/core diff --git a/packages/cubejs-client-core/package.json b/packages/cubejs-client-core/package.json index 54b7b475e672e..696a99663e065 100644 --- a/packages/cubejs-client-core/package.json +++ b/packages/cubejs-client-core/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-client/core", - "version": "1.3.44", + "version": "1.3.45", "engines": {}, "repository": { "type": "git", @@ -38,7 +38,7 @@ ], "license": "MIT", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "@types/moment-range": "^4.0.0", "@types/ramda": "^0.27.34", diff --git a/packages/cubejs-client-dx/CHANGELOG.md b/packages/cubejs-client-dx/CHANGELOG.md index 46981c5102a9d..ab0be8120e7ea 100644 --- a/packages/cubejs-client-dx/CHANGELOG.md +++ b/packages/cubejs-client-dx/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-client/dx + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-client/dx diff --git a/packages/cubejs-client-dx/package.json b/packages/cubejs-client-dx/package.json index 42de7cd220e0f..0b710f68fa5c7 100644 --- a/packages/cubejs-client-dx/package.json +++ b/packages/cubejs-client-dx/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-client/dx", - "version": "1.3.44", + "version": "1.3.45", "engines": {}, "repository": { "type": "git", diff --git a/packages/cubejs-client-ngx/CHANGELOG.md b/packages/cubejs-client-ngx/CHANGELOG.md index f077859191c1e..816cdf823f9c0 100644 --- a/packages/cubejs-client-ngx/CHANGELOG.md +++ b/packages/cubejs-client-ngx/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-client/ngx + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-client/ngx diff --git a/packages/cubejs-client-ngx/package.json b/packages/cubejs-client-ngx/package.json index 004286566b8c0..943fdba7a9570 100644 --- a/packages/cubejs-client-ngx/package.json +++ b/packages/cubejs-client-ngx/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-client/ngx", - "version": "1.3.44", + "version": "1.3.45", "author": "Cube Dev, Inc.", "engines": {}, "repository": { diff --git a/packages/cubejs-client-react/CHANGELOG.md b/packages/cubejs-client-react/CHANGELOG.md index d85f122220e59..e083b59040c48 100644 --- a/packages/cubejs-client-react/CHANGELOG.md +++ b/packages/cubejs-client-react/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-client/react + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-client/react diff --git a/packages/cubejs-client-react/package.json b/packages/cubejs-client-react/package.json index 1cc0083775ea3..45cb212b23312 100644 --- a/packages/cubejs-client-react/package.json +++ b/packages/cubejs-client-react/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-client/react", - "version": "1.3.44", + "version": "1.3.45", "author": "Cube Dev, Inc.", "license": "MIT", "engines": {}, @@ -24,7 +24,7 @@ ], "dependencies": { "@babel/runtime": "^7.1.2", - "@cubejs-client/core": "1.3.44", + "@cubejs-client/core": "1.3.45", "core-js": "^3.6.5", "ramda": "^0.27.2" }, diff --git a/packages/cubejs-client-vue/CHANGELOG.md b/packages/cubejs-client-vue/CHANGELOG.md index 6204dce9cb18f..1e3852a14cc86 100644 --- a/packages/cubejs-client-vue/CHANGELOG.md +++ b/packages/cubejs-client-vue/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube.js/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-client/vue + ## [1.3.44](https://github.com/cube-js/cube.js/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-client/vue diff --git a/packages/cubejs-client-vue/package.json b/packages/cubejs-client-vue/package.json index a7407f0fbf892..6bad5d8331b88 100644 --- a/packages/cubejs-client-vue/package.json +++ b/packages/cubejs-client-vue/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-client/vue", - "version": "1.3.44", + "version": "1.3.45", "engines": {}, "repository": { "type": "git", @@ -28,7 +28,7 @@ "src" ], "dependencies": { - "@cubejs-client/core": "1.3.44", + "@cubejs-client/core": "1.3.45", "core-js": "^3.6.5", "ramda": "^0.27.2" }, diff --git a/packages/cubejs-client-vue3/CHANGELOG.md b/packages/cubejs-client-vue3/CHANGELOG.md index a0d13aa5914b5..dd6bfbd1f94e5 100644 --- a/packages/cubejs-client-vue3/CHANGELOG.md +++ b/packages/cubejs-client-vue3/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube.js/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-client/vue3 + ## [1.3.44](https://github.com/cube-js/cube.js/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-client/vue3 diff --git a/packages/cubejs-client-vue3/package.json b/packages/cubejs-client-vue3/package.json index 1088e61ad7619..0afc815e272c2 100644 --- a/packages/cubejs-client-vue3/package.json +++ b/packages/cubejs-client-vue3/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-client/vue3", - "version": "1.3.44", + "version": "1.3.45", "engines": {}, "repository": { "type": "git", @@ -28,7 +28,7 @@ "src" ], "dependencies": { - "@cubejs-client/core": "1.3.44", + "@cubejs-client/core": "1.3.45", "@vue/compiler-sfc": "^3.0.11", "core-js": "^3.6.5", "flush-promises": "^1.0.2", diff --git a/packages/cubejs-client-ws-transport/CHANGELOG.md b/packages/cubejs-client-ws-transport/CHANGELOG.md index 5680381839baa..6e819ec8dc126 100644 --- a/packages/cubejs-client-ws-transport/CHANGELOG.md +++ b/packages/cubejs-client-ws-transport/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-client/ws-transport + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-client/ws-transport diff --git a/packages/cubejs-client-ws-transport/package.json b/packages/cubejs-client-ws-transport/package.json index 2faa357c0063f..2b7f2b0a7da4c 100644 --- a/packages/cubejs-client-ws-transport/package.json +++ b/packages/cubejs-client-ws-transport/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-client/ws-transport", - "version": "1.3.44", + "version": "1.3.45", "engines": {}, "repository": { "type": "git", @@ -20,7 +20,7 @@ }, "dependencies": { "@babel/runtime": "^7.1.2", - "@cubejs-client/core": "1.3.44", + "@cubejs-client/core": "1.3.45", "core-js": "^3.6.5", "isomorphic-ws": "^4.0.1", "ws": "^7.3.1" @@ -33,7 +33,7 @@ "@babel/core": "^7.3.3", "@babel/preset-env": "^7.3.1", "@babel/preset-typescript": "^7.12.1", - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/ws": "^7.2.9", "typescript": "~5.2.2" }, diff --git a/packages/cubejs-crate-driver/CHANGELOG.md b/packages/cubejs-crate-driver/CHANGELOG.md index 718305e886002..03da16af324a3 100644 --- a/packages/cubejs-crate-driver/CHANGELOG.md +++ b/packages/cubejs-crate-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/crate-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/crate-driver diff --git a/packages/cubejs-crate-driver/package.json b/packages/cubejs-crate-driver/package.json index 92333eb6aa317..f9d65c6f37304 100644 --- a/packages/cubejs-crate-driver/package.json +++ b/packages/cubejs-crate-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/crate-driver", "description": "Cube.js Crate database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -28,14 +28,14 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/postgres-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/postgres-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "pg": "^8.7.1" }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "testcontainers": "^10.28.0", "typescript": "~5.2.2" }, diff --git a/packages/cubejs-cubestore-driver/CHANGELOG.md b/packages/cubejs-cubestore-driver/CHANGELOG.md index bae8a17c031c2..7713f052e596c 100644 --- a/packages/cubejs-cubestore-driver/CHANGELOG.md +++ b/packages/cubejs-cubestore-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/cubestore-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/cubestore-driver diff --git a/packages/cubejs-cubestore-driver/package.json b/packages/cubejs-cubestore-driver/package.json index b4ef2eea555f4..b9bae0d691a26 100644 --- a/packages/cubejs-cubestore-driver/package.json +++ b/packages/cubejs-cubestore-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/cubestore-driver", "description": "Cube Store driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -26,10 +26,10 @@ "lint:fix": "eslint --fix src/*.ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/cubestore": "1.3.44", - "@cubejs-backend/native": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/cubestore": "1.3.45", + "@cubejs-backend/native": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "csv-write-stream": "^2.0.0", "flatbuffers": "23.3.3", "fs-extra": "^9.1.0", @@ -41,7 +41,7 @@ "ws": "^7.4.3" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/csv-write-stream": "^2.0.0", "@types/jest": "^29", "@types/node": "^20", diff --git a/packages/cubejs-databricks-jdbc-driver/CHANGELOG.md b/packages/cubejs-databricks-jdbc-driver/CHANGELOG.md index 966140f5a1203..c0198cf0ceee0 100644 --- a/packages/cubejs-databricks-jdbc-driver/CHANGELOG.md +++ b/packages/cubejs-databricks-jdbc-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/databricks-jdbc-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/databricks-jdbc-driver diff --git a/packages/cubejs-databricks-jdbc-driver/package.json b/packages/cubejs-databricks-jdbc-driver/package.json index 0f7867b2dc09e..a590902160dec 100644 --- a/packages/cubejs-databricks-jdbc-driver/package.json +++ b/packages/cubejs-databricks-jdbc-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/databricks-jdbc-driver", "description": "Cube.js Databricks database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "license": "Apache-2.0", "repository": { "type": "git", @@ -30,17 +30,17 @@ "bin" ], "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/jdbc-driver": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/jdbc-driver": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "node-fetch": "^2.6.1", "ramda": "^0.27.2", "source-map-support": "^0.5.19", "uuid": "^8.3.2" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "@types/node": "^20", "@types/ramda": "^0.27.34", diff --git a/packages/cubejs-dbt-schema-extension/CHANGELOG.md b/packages/cubejs-dbt-schema-extension/CHANGELOG.md index de472362b0b15..5bd024d7e402c 100644 --- a/packages/cubejs-dbt-schema-extension/CHANGELOG.md +++ b/packages/cubejs-dbt-schema-extension/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/dbt-schema-extension + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/dbt-schema-extension diff --git a/packages/cubejs-dbt-schema-extension/package.json b/packages/cubejs-dbt-schema-extension/package.json index 5470a9c5d9dbb..84e9cba86e385 100644 --- a/packages/cubejs-dbt-schema-extension/package.json +++ b/packages/cubejs-dbt-schema-extension/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/dbt-schema-extension", "description": "Cube.js dbt Schema Extension", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -25,14 +25,14 @@ "lint:fix": "eslint --fix src/* --ext .ts,.js" }, "dependencies": { - "@cubejs-backend/schema-compiler": "1.3.44", + "@cubejs-backend/schema-compiler": "1.3.45", "fs-extra": "^9.1.0", "inflection": "^1.12.0", "node-fetch": "^2.6.1" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing": "1.3.45", "@types/jest": "^29", "jest": "^29", "stream-to-array": "^2.3.0", diff --git a/packages/cubejs-docker/CHANGELOG.md b/packages/cubejs-docker/CHANGELOG.md index a1d55dbd5df89..d53c77ce81312 100644 --- a/packages/cubejs-docker/CHANGELOG.md +++ b/packages/cubejs-docker/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/docker + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/docker diff --git a/packages/cubejs-docker/package.json b/packages/cubejs-docker/package.json index 4454d4a5c587c..92bb5db630dc3 100644 --- a/packages/cubejs-docker/package.json +++ b/packages/cubejs-docker/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/docker", - "version": "1.3.44", + "version": "1.3.45", "description": "Cube.js In Docker (virtual package)", "author": "Cube Dev, Inc.", "license": "Apache-2.0", @@ -9,35 +9,35 @@ "node": "^14.0.0 || ^16.0.0 || >=17.0.0" }, "dependencies": { - "@cubejs-backend/athena-driver": "1.3.44", - "@cubejs-backend/bigquery-driver": "1.3.44", - "@cubejs-backend/clickhouse-driver": "1.3.44", - "@cubejs-backend/crate-driver": "1.3.44", - "@cubejs-backend/databricks-jdbc-driver": "1.3.44", - "@cubejs-backend/dbt-schema-extension": "1.3.44", - "@cubejs-backend/dremio-driver": "1.3.44", - "@cubejs-backend/druid-driver": "1.3.44", - "@cubejs-backend/duckdb-driver": "1.3.44", - "@cubejs-backend/elasticsearch-driver": "1.3.44", - "@cubejs-backend/firebolt-driver": "1.3.44", - "@cubejs-backend/hive-driver": "1.3.44", - "@cubejs-backend/ksql-driver": "1.3.44", - "@cubejs-backend/materialize-driver": "1.3.44", - "@cubejs-backend/mongobi-driver": "1.3.44", - "@cubejs-backend/mssql-driver": "1.3.44", - "@cubejs-backend/mysql-driver": "1.3.44", - "@cubejs-backend/oracle-driver": "1.3.44", - "@cubejs-backend/pinot-driver": "1.3.44", - "@cubejs-backend/postgres-driver": "1.3.44", - "@cubejs-backend/prestodb-driver": "1.3.44", - "@cubejs-backend/questdb-driver": "1.3.44", - "@cubejs-backend/redshift-driver": "1.3.44", - "@cubejs-backend/server": "1.3.44", - "@cubejs-backend/snowflake-driver": "1.3.44", - "@cubejs-backend/sqlite-driver": "1.3.44", - "@cubejs-backend/trino-driver": "1.3.44", - "@cubejs-backend/vertica-driver": "1.3.44", - "cubejs-cli": "1.3.44", + "@cubejs-backend/athena-driver": "1.3.45", + "@cubejs-backend/bigquery-driver": "1.3.45", + "@cubejs-backend/clickhouse-driver": "1.3.45", + "@cubejs-backend/crate-driver": "1.3.45", + "@cubejs-backend/databricks-jdbc-driver": "1.3.45", + "@cubejs-backend/dbt-schema-extension": "1.3.45", + "@cubejs-backend/dremio-driver": "1.3.45", + "@cubejs-backend/druid-driver": "1.3.45", + "@cubejs-backend/duckdb-driver": "1.3.45", + "@cubejs-backend/elasticsearch-driver": "1.3.45", + "@cubejs-backend/firebolt-driver": "1.3.45", + "@cubejs-backend/hive-driver": "1.3.45", + "@cubejs-backend/ksql-driver": "1.3.45", + "@cubejs-backend/materialize-driver": "1.3.45", + "@cubejs-backend/mongobi-driver": "1.3.45", + "@cubejs-backend/mssql-driver": "1.3.45", + "@cubejs-backend/mysql-driver": "1.3.45", + "@cubejs-backend/oracle-driver": "1.3.45", + "@cubejs-backend/pinot-driver": "1.3.45", + "@cubejs-backend/postgres-driver": "1.3.45", + "@cubejs-backend/prestodb-driver": "1.3.45", + "@cubejs-backend/questdb-driver": "1.3.45", + "@cubejs-backend/redshift-driver": "1.3.45", + "@cubejs-backend/server": "1.3.45", + "@cubejs-backend/snowflake-driver": "1.3.45", + "@cubejs-backend/sqlite-driver": "1.3.45", + "@cubejs-backend/trino-driver": "1.3.45", + "@cubejs-backend/vertica-driver": "1.3.45", + "cubejs-cli": "1.3.45", "typescript": "~5.2.2" }, "resolutions": { diff --git a/packages/cubejs-dremio-driver/CHANGELOG.md b/packages/cubejs-dremio-driver/CHANGELOG.md index f9015e5c9ca32..a468375f4b58c 100644 --- a/packages/cubejs-dremio-driver/CHANGELOG.md +++ b/packages/cubejs-dremio-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/dremio-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/dremio-driver diff --git a/packages/cubejs-dremio-driver/package.json b/packages/cubejs-dremio-driver/package.json index 7c1a298b4265c..a34ae4920a743 100644 --- a/packages/cubejs-dremio-driver/package.json +++ b/packages/cubejs-dremio-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/dremio-driver", "description": "Cube.js Dremio driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -22,15 +22,15 @@ "lint:fix": "eslint driver/*.js" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "axios": "^1.8.3", "sqlstring": "^2.3.1" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "jest": "^29" }, "license": "Apache-2.0", diff --git a/packages/cubejs-druid-driver/CHANGELOG.md b/packages/cubejs-druid-driver/CHANGELOG.md index e1bb2d367f12d..9034f4693bf39 100644 --- a/packages/cubejs-druid-driver/CHANGELOG.md +++ b/packages/cubejs-druid-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/druid-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/druid-driver diff --git a/packages/cubejs-druid-driver/package.json b/packages/cubejs-druid-driver/package.json index 66a09b30f32d7..a226edd989135 100644 --- a/packages/cubejs-druid-driver/package.json +++ b/packages/cubejs-druid-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/druid-driver", "description": "Cube.js Druid database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "license": "Apache-2.0", "repository": { "type": "git", @@ -28,13 +28,13 @@ "dist/src/*" ], "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "axios": "^1.8.3" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "@types/node": "^20", "jest": "^29", diff --git a/packages/cubejs-duckdb-driver/CHANGELOG.md b/packages/cubejs-duckdb-driver/CHANGELOG.md index 3c5ae31fe7e87..cc651f39d8c5e 100644 --- a/packages/cubejs-duckdb-driver/CHANGELOG.md +++ b/packages/cubejs-duckdb-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/duckdb-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/duckdb-driver diff --git a/packages/cubejs-duckdb-driver/package.json b/packages/cubejs-duckdb-driver/package.json index abeb1011c556a..fea4b380572ab 100644 --- a/packages/cubejs-duckdb-driver/package.json +++ b/packages/cubejs-duckdb-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/duckdb-driver", "description": "Cube DuckDB database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,15 +27,15 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "duckdb": "^1.3.1" }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "@types/jest": "^29", "@types/node": "^20", "jest": "^29", diff --git a/packages/cubejs-elasticsearch-driver/CHANGELOG.md b/packages/cubejs-elasticsearch-driver/CHANGELOG.md index 0648607f002e5..e61a24f71b871 100644 --- a/packages/cubejs-elasticsearch-driver/CHANGELOG.md +++ b/packages/cubejs-elasticsearch-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/elasticsearch-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/elasticsearch-driver diff --git a/packages/cubejs-elasticsearch-driver/package.json b/packages/cubejs-elasticsearch-driver/package.json index f3751381ec964..a72a085af87b4 100644 --- a/packages/cubejs-elasticsearch-driver/package.json +++ b/packages/cubejs-elasticsearch-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/elasticsearch-driver", "description": "Cube.js elasticsearch database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -23,14 +23,14 @@ "driver" ], "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@elastic/elasticsearch": "7.12.0", "sqlstring": "^2.3.1" }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "jest": "^29", "testcontainers": "^10.28.0" diff --git a/packages/cubejs-firebolt-driver/CHANGELOG.md b/packages/cubejs-firebolt-driver/CHANGELOG.md index 27b0495282d0c..5396cf92077b9 100644 --- a/packages/cubejs-firebolt-driver/CHANGELOG.md +++ b/packages/cubejs-firebolt-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/firebolt-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/firebolt-driver diff --git a/packages/cubejs-firebolt-driver/package.json b/packages/cubejs-firebolt-driver/package.json index 2c540cfae9472..7b21e6d4137cb 100644 --- a/packages/cubejs-firebolt-driver/package.json +++ b/packages/cubejs-firebolt-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/firebolt-driver", "description": "Cube.js Firebolt database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -28,15 +28,15 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "firebolt-sdk": "1.10.0" }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "typescript": "~5.2.2" }, "publishConfig": { diff --git a/packages/cubejs-hive-driver/CHANGELOG.md b/packages/cubejs-hive-driver/CHANGELOG.md index dbef652f739b7..e03a03e9804f1 100644 --- a/packages/cubejs-hive-driver/CHANGELOG.md +++ b/packages/cubejs-hive-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/hive-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/hive-driver diff --git a/packages/cubejs-hive-driver/package.json b/packages/cubejs-hive-driver/package.json index 0a7cd2097bb94..fdec72a740acc 100644 --- a/packages/cubejs-hive-driver/package.json +++ b/packages/cubejs-hive-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/hive-driver", "description": "Cube.js Hive database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -17,8 +17,8 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "generic-pool": "^3.8.2", "jshs2": "^0.4.4", "sasl-plain": "^0.1.0", @@ -28,7 +28,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44" + "@cubejs-backend/linter": "1.3.45" }, "publishConfig": { "access": "public" diff --git a/packages/cubejs-jdbc-driver/CHANGELOG.md b/packages/cubejs-jdbc-driver/CHANGELOG.md index b68de7adc1c6c..1bd7ab275846d 100644 --- a/packages/cubejs-jdbc-driver/CHANGELOG.md +++ b/packages/cubejs-jdbc-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/jdbc-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/jdbc-driver diff --git a/packages/cubejs-jdbc-driver/package.json b/packages/cubejs-jdbc-driver/package.json index 6fd750c6f998b..a2287df8413f5 100644 --- a/packages/cubejs-jdbc-driver/package.json +++ b/packages/cubejs-jdbc-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/jdbc-driver", "description": "Cube.js JDBC database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -25,9 +25,9 @@ "index.js" ], "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", "@cubejs-backend/node-java-maven": "^0.1.3", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/shared": "1.3.45", "generic-pool": "^3.9.0", "sqlstring": "^2.3.0" }, @@ -43,7 +43,7 @@ "testEnvironment": "node" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/node": "^20", "@types/sqlstring": "^2.3.0", "typescript": "~5.2.2" diff --git a/packages/cubejs-ksql-driver/CHANGELOG.md b/packages/cubejs-ksql-driver/CHANGELOG.md index 187d631b20299..a28499cbe3477 100644 --- a/packages/cubejs-ksql-driver/CHANGELOG.md +++ b/packages/cubejs-ksql-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/ksql-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/ksql-driver diff --git a/packages/cubejs-ksql-driver/package.json b/packages/cubejs-ksql-driver/package.json index 4bb4093fb9095..c5f8c0c39d81e 100644 --- a/packages/cubejs-ksql-driver/package.json +++ b/packages/cubejs-ksql-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/ksql-driver", "description": "Cube.js ksql database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -25,9 +25,9 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "async-mutex": "0.3.2", "axios": "^1.8.3", "kafkajs": "^2.2.3", @@ -41,7 +41,7 @@ "extends": "../cubejs-linter" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "typescript": "~5.2.2" } } diff --git a/packages/cubejs-linter/CHANGELOG.md b/packages/cubejs-linter/CHANGELOG.md index 82ab74a2351b1..d67e387a0cefc 100644 --- a/packages/cubejs-linter/CHANGELOG.md +++ b/packages/cubejs-linter/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/linter + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/linter diff --git a/packages/cubejs-linter/package.json b/packages/cubejs-linter/package.json index 0fdc00ac17bf6..2aa0ffe461e4f 100644 --- a/packages/cubejs-linter/package.json +++ b/packages/cubejs-linter/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/linter", "description": "Cube.js ESLint (virtual package) for linting code", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", diff --git a/packages/cubejs-materialize-driver/CHANGELOG.md b/packages/cubejs-materialize-driver/CHANGELOG.md index 6f1ca2ad115bf..338bc1cc8f649 100644 --- a/packages/cubejs-materialize-driver/CHANGELOG.md +++ b/packages/cubejs-materialize-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/materialize-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/materialize-driver diff --git a/packages/cubejs-materialize-driver/package.json b/packages/cubejs-materialize-driver/package.json index 08c8187ff3dc8..e34dfef7cfcc5 100644 --- a/packages/cubejs-materialize-driver/package.json +++ b/packages/cubejs-materialize-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/materialize-driver", "description": "Cube.js Materialize database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,17 +27,17 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/postgres-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/postgres-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@types/pg": "^8.6.0", "pg": "^8.6.0", "semver": "^7.6.3" }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing": "1.3.45", "typescript": "~5.2.2" }, "publishConfig": { diff --git a/packages/cubejs-mongobi-driver/CHANGELOG.md b/packages/cubejs-mongobi-driver/CHANGELOG.md index 860f330fa94f3..3c72c8facdad6 100644 --- a/packages/cubejs-mongobi-driver/CHANGELOG.md +++ b/packages/cubejs-mongobi-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/mongobi-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/mongobi-driver diff --git a/packages/cubejs-mongobi-driver/package.json b/packages/cubejs-mongobi-driver/package.json index b7ec37e1599c5..8d7b4761104df 100644 --- a/packages/cubejs-mongobi-driver/package.json +++ b/packages/cubejs-mongobi-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/mongobi-driver", "description": "Cube.js MongoBI driver", "author": "krunalsabnis@gmail.com", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,8 +27,8 @@ "integration:mongobi": "jest dist/test" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@types/node": "^20", "generic-pool": "^3.9.0", "moment": "^2.29.1", @@ -39,7 +39,7 @@ "access": "public" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "testcontainers": "^10.28.0", "typescript": "~5.2.2" }, diff --git a/packages/cubejs-mssql-driver/CHANGELOG.md b/packages/cubejs-mssql-driver/CHANGELOG.md index 43d66fc22811d..ae9e35b3e8f16 100644 --- a/packages/cubejs-mssql-driver/CHANGELOG.md +++ b/packages/cubejs-mssql-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/mssql-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/mssql-driver diff --git a/packages/cubejs-mssql-driver/package.json b/packages/cubejs-mssql-driver/package.json index a1a43391940ab..2a43a20268dac 100644 --- a/packages/cubejs-mssql-driver/package.json +++ b/packages/cubejs-mssql-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/mssql-driver", "description": "Cube.js MS SQL database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -25,8 +25,8 @@ "lint:fix": "eslint --fix src/* --ext .ts,.js" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "mssql": "^11.0.1" }, "devDependencies": { diff --git a/packages/cubejs-mysql-aurora-serverless-driver/CHANGELOG.md b/packages/cubejs-mysql-aurora-serverless-driver/CHANGELOG.md index c3362219c9a87..f5e09e5765af3 100644 --- a/packages/cubejs-mysql-aurora-serverless-driver/CHANGELOG.md +++ b/packages/cubejs-mysql-aurora-serverless-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/mysql-aurora-serverless-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/mysql-aurora-serverless-driver diff --git a/packages/cubejs-mysql-aurora-serverless-driver/package.json b/packages/cubejs-mysql-aurora-serverless-driver/package.json index 7a18447497782..5b285a4e27dd7 100644 --- a/packages/cubejs-mysql-aurora-serverless-driver/package.json +++ b/packages/cubejs-mysql-aurora-serverless-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/mysql-aurora-serverless-driver", "description": "Cube.js Aurora Serverless Mysql database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -21,14 +21,14 @@ "lint": "eslint driver/*.js test/*.js" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@types/mysql": "^2.15.15", "aws-sdk": "^2.787.0", "data-api-client": "^1.1.0" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/data-api-client": "^1.2.1", "@types/jest": "^29", "jest": "^29", diff --git a/packages/cubejs-mysql-driver/CHANGELOG.md b/packages/cubejs-mysql-driver/CHANGELOG.md index 01f7b3e82372d..3ed1c9b24fa97 100644 --- a/packages/cubejs-mysql-driver/CHANGELOG.md +++ b/packages/cubejs-mysql-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/mysql-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/mysql-driver diff --git a/packages/cubejs-mysql-driver/package.json b/packages/cubejs-mysql-driver/package.json index 1c5d5f16acc2a..fe1a2253ddfc1 100644 --- a/packages/cubejs-mysql-driver/package.json +++ b/packages/cubejs-mysql-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/mysql-driver", "description": "Cube.js Mysql database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,14 +27,14 @@ "lint:fix": "eslint --fix src/* test/* --ext .ts,.js" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "generic-pool": "^3.9.0", "mysql": "^2.18.1" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "@types/jest": "^29", "@types/mysql": "^2.15.21", "jest": "^29", diff --git a/packages/cubejs-oracle-driver/CHANGELOG.md b/packages/cubejs-oracle-driver/CHANGELOG.md index 5c45d1d9fdbbd..bc8b2b66e7338 100644 --- a/packages/cubejs-oracle-driver/CHANGELOG.md +++ b/packages/cubejs-oracle-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/oracle-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/oracle-driver diff --git a/packages/cubejs-oracle-driver/package.json b/packages/cubejs-oracle-driver/package.json index 6be0ea0415d24..229dbdcfdd662 100644 --- a/packages/cubejs-oracle-driver/package.json +++ b/packages/cubejs-oracle-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/oracle-driver", "description": "Cube.js oracle database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -13,7 +13,7 @@ }, "main": "driver/OracleDriver.js", "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", "ramda": "^0.27.0" }, "optionalDependencies": { diff --git a/packages/cubejs-pinot-driver/CHANGELOG.md b/packages/cubejs-pinot-driver/CHANGELOG.md index 11c83fd53448b..dad2aca8680cc 100644 --- a/packages/cubejs-pinot-driver/CHANGELOG.md +++ b/packages/cubejs-pinot-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/pinot-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/pinot-driver diff --git a/packages/cubejs-pinot-driver/package.json b/packages/cubejs-pinot-driver/package.json index 98c806b011c91..5e5703747fc2f 100644 --- a/packages/cubejs-pinot-driver/package.json +++ b/packages/cubejs-pinot-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/pinot-driver", "description": "Cube.js Pinot database driver", "author": "Julian Ronsse, InTheMemory, Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,9 +27,9 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "node-fetch": "^2.6.1", "ramda": "^0.27.2", "sqlstring": "^2.3.3" @@ -39,7 +39,7 @@ "access": "public" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "jest": "^29", "should": "^13.2.3", diff --git a/packages/cubejs-playground/CHANGELOG.md b/packages/cubejs-playground/CHANGELOG.md index 19bfa5605b413..3cb94b709e05c 100644 --- a/packages/cubejs-playground/CHANGELOG.md +++ b/packages/cubejs-playground/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-client/playground + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-client/playground diff --git a/packages/cubejs-playground/package.json b/packages/cubejs-playground/package.json index 1dfbc9280de97..d30efe3462b04 100644 --- a/packages/cubejs-playground/package.json +++ b/packages/cubejs-playground/package.json @@ -1,7 +1,7 @@ { "name": "@cubejs-client/playground", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "engines": {}, "repository": { "type": "git", @@ -68,8 +68,8 @@ "@ant-design/compatible": "^1.0.1", "@ant-design/icons": "^5.3.5", "@cube-dev/ui-kit": "0.52.3", - "@cubejs-client/core": "1.3.44", - "@cubejs-client/react": "1.3.44", + "@cubejs-client/core": "1.3.45", + "@cubejs-client/react": "1.3.45", "@types/flexsearch": "^0.7.3", "@types/node": "^20", "@types/react": "^18.3.4", diff --git a/packages/cubejs-postgres-driver/CHANGELOG.md b/packages/cubejs-postgres-driver/CHANGELOG.md index 4c9405b3e60e2..b2d1ddbad87af 100644 --- a/packages/cubejs-postgres-driver/CHANGELOG.md +++ b/packages/cubejs-postgres-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/postgres-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/postgres-driver diff --git a/packages/cubejs-postgres-driver/package.json b/packages/cubejs-postgres-driver/package.json index db7d3f1b08c50..8f6b7b8ac4379 100644 --- a/packages/cubejs-postgres-driver/package.json +++ b/packages/cubejs-postgres-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/postgres-driver", "description": "Cube.js Postgres database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,8 +27,8 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@types/pg": "^8.6.0", "@types/pg-query-stream": "^1.0.3", "moment": "^2.24.0", @@ -37,8 +37,8 @@ }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "testcontainers": "^10.28.0", "typescript": "~5.2.2" }, diff --git a/packages/cubejs-prestodb-driver/CHANGELOG.md b/packages/cubejs-prestodb-driver/CHANGELOG.md index bc913f63ae310..cf938f7ce64a9 100644 --- a/packages/cubejs-prestodb-driver/CHANGELOG.md +++ b/packages/cubejs-prestodb-driver/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +### Bug Fixes + +- **prestodb/trino-driver:** Specify correct timeouts for query execution ([#9827](https://github.com/cube-js/cube/issues/9827)) ([394eb84](https://github.com/cube-js/cube/commit/394eb84910160e86e4634df6bcc78c7ac803803b)) + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/prestodb-driver diff --git a/packages/cubejs-prestodb-driver/package.json b/packages/cubejs-prestodb-driver/package.json index d1c583db1ea2e..49b941669c477 100644 --- a/packages/cubejs-prestodb-driver/package.json +++ b/packages/cubejs-prestodb-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/prestodb-driver", "description": "Cube.js Presto database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,8 +27,8 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "presto-client": "^1.1.0", "ramda": "^0.27.0", "sqlstring": "^2.3.1" @@ -38,7 +38,7 @@ "access": "public" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "jest": "^29", "should": "^13.2.3", diff --git a/packages/cubejs-query-orchestrator/CHANGELOG.md b/packages/cubejs-query-orchestrator/CHANGELOG.md index 1ed37967aba9e..94a42d5c7b0c4 100644 --- a/packages/cubejs-query-orchestrator/CHANGELOG.md +++ b/packages/cubejs-query-orchestrator/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +### Features + +- **query-ochestrator:** Reduce number of cache set for used flag ([#9828](https://github.com/cube-js/cube/issues/9828)) ([b9ff371](https://github.com/cube-js/cube/commit/b9ff3714ecdbe058f941ee79a3e6e6e0687e1005)) + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) ### Bug Fixes diff --git a/packages/cubejs-query-orchestrator/package.json b/packages/cubejs-query-orchestrator/package.json index 89b3e0b246eb0..b227a310eeeb8 100644 --- a/packages/cubejs-query-orchestrator/package.json +++ b/packages/cubejs-query-orchestrator/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/query-orchestrator", "description": "Cube.js Query Orchestrator and Cache", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -29,15 +29,15 @@ "dist/src/*" ], "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/cubestore-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/cubestore-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "csv-write-stream": "^2.0.0", "lru-cache": "^11.1.0", "ramda": "^0.27.2" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "@types/node": "^20", "@types/ramda": "^0.27.32", diff --git a/packages/cubejs-questdb-driver/CHANGELOG.md b/packages/cubejs-questdb-driver/CHANGELOG.md index 0d902583ce30e..59d1dc5ea92ba 100644 --- a/packages/cubejs-questdb-driver/CHANGELOG.md +++ b/packages/cubejs-questdb-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/questdb-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/questdb-driver diff --git a/packages/cubejs-questdb-driver/package.json b/packages/cubejs-questdb-driver/package.json index 34147f7854c6b..8dc47b85af15a 100644 --- a/packages/cubejs-questdb-driver/package.json +++ b/packages/cubejs-questdb-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/questdb-driver", "description": "Cube.js QuestDB database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,9 +27,9 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@types/pg": "^8.6.0", "moment": "^2.24.0", "pg": "^8.7.0", @@ -37,8 +37,8 @@ }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "testcontainers": "^10.28.0", "typescript": "~5.2.2" }, diff --git a/packages/cubejs-redshift-driver/CHANGELOG.md b/packages/cubejs-redshift-driver/CHANGELOG.md index 1385742b938b7..91eeff47f3e81 100644 --- a/packages/cubejs-redshift-driver/CHANGELOG.md +++ b/packages/cubejs-redshift-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/redshift-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/redshift-driver diff --git a/packages/cubejs-redshift-driver/package.json b/packages/cubejs-redshift-driver/package.json index 7a190931d5efb..8e88b2451bda6 100644 --- a/packages/cubejs-redshift-driver/package.json +++ b/packages/cubejs-redshift-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/redshift-driver", "description": "Cube.js Redshift database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -25,13 +25,13 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/postgres-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44" + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/postgres-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45" }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "typescript": "~5.2.2" }, "publishConfig": { diff --git a/packages/cubejs-schema-compiler/CHANGELOG.md b/packages/cubejs-schema-compiler/CHANGELOG.md index a9ce4602379ae..d46dbcc4f5425 100644 --- a/packages/cubejs-schema-compiler/CHANGELOG.md +++ b/packages/cubejs-schema-compiler/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +### Features + +- **clickhouse-driver:** Upgrade @clickhouse/client from 1.7.0 to 1.12.0 ([#9829](https://github.com/cube-js/cube/issues/9829)) ([80c281f](https://github.com/cube-js/cube/commit/80c281f330b16fd27a7b61d9ff030ce4fcf92b13)) + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/schema-compiler diff --git a/packages/cubejs-schema-compiler/package.json b/packages/cubejs-schema-compiler/package.json index 173a23df92cc2..6417a244ec75d 100644 --- a/packages/cubejs-schema-compiler/package.json +++ b/packages/cubejs-schema-compiler/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/schema-compiler", "description": "Cube schema compiler", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -40,8 +40,8 @@ "@babel/standalone": "^7.24", "@babel/traverse": "^7.24", "@babel/types": "^7.24", - "@cubejs-backend/native": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/native": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "antlr4ts": "0.5.0-alpha.4", "camelcase": "^6.2.0", "cron-parser": "^4.9.0", @@ -60,8 +60,8 @@ }, "devDependencies": { "@clickhouse/client": "^1.12.0", - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/query-orchestrator": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/query-orchestrator": "1.3.45", "@types/babel__code-frame": "^7.0.6", "@types/babel__generator": "^7.6.8", "@types/babel__traverse": "^7.20.5", diff --git a/packages/cubejs-server-core/CHANGELOG.md b/packages/cubejs-server-core/CHANGELOG.md index 07d0a72df4be8..03f695f0dac1c 100644 --- a/packages/cubejs-server-core/CHANGELOG.md +++ b/packages/cubejs-server-core/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/server-core + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/server-core diff --git a/packages/cubejs-server-core/package.json b/packages/cubejs-server-core/package.json index aec1c7e62c2e2..23ccec007af11 100644 --- a/packages/cubejs-server-core/package.json +++ b/packages/cubejs-server-core/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/server-core", "description": "Cube.js base component to wire all backend components together", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -29,14 +29,14 @@ "unit": "jest --runInBand --forceExit --coverage dist/test" }, "dependencies": { - "@cubejs-backend/api-gateway": "1.3.44", - "@cubejs-backend/cloud": "1.3.44", + "@cubejs-backend/api-gateway": "1.3.45", + "@cubejs-backend/cloud": "1.3.45", "@cubejs-backend/dotenv": "^9.0.2", - "@cubejs-backend/native": "1.3.44", - "@cubejs-backend/query-orchestrator": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", - "@cubejs-backend/templates": "1.3.44", + "@cubejs-backend/native": "1.3.45", + "@cubejs-backend/query-orchestrator": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", + "@cubejs-backend/templates": "1.3.45", "codesandbox-import-utils": "^2.1.12", "cross-spawn": "^7.0.1", "fs-extra": "^8.1.0", @@ -59,9 +59,9 @@ "ws": "^7.5.3" }, "devDependencies": { - "@cubejs-backend/cubestore-driver": "1.3.44", - "@cubejs-backend/linter": "1.3.44", - "@cubejs-client/playground": "1.3.44", + "@cubejs-backend/cubestore-driver": "1.3.45", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-client/playground": "1.3.45", "@types/cross-spawn": "^6.0.2", "@types/express": "^4.17.21", "@types/fs-extra": "^9.0.8", diff --git a/packages/cubejs-server/CHANGELOG.md b/packages/cubejs-server/CHANGELOG.md index 997cc32a05cf6..e32f662fcefb7 100644 --- a/packages/cubejs-server/CHANGELOG.md +++ b/packages/cubejs-server/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/server + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/server diff --git a/packages/cubejs-server/package.json b/packages/cubejs-server/package.json index 451570ab3a7c3..6349c116e6f3e 100644 --- a/packages/cubejs-server/package.json +++ b/packages/cubejs-server/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/server", "description": "Cube.js all-in-one server", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "types": "index.d.ts", "repository": { "type": "git", @@ -40,11 +40,11 @@ "jest:shapshot": "jest --updateSnapshot test" }, "dependencies": { - "@cubejs-backend/cubestore-driver": "1.3.44", + "@cubejs-backend/cubestore-driver": "1.3.45", "@cubejs-backend/dotenv": "^9.0.2", - "@cubejs-backend/native": "1.3.44", - "@cubejs-backend/server-core": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/native": "1.3.45", + "@cubejs-backend/server-core": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@oclif/color": "^1.0.0", "@oclif/command": "^1.8.13", "@oclif/config": "^1.18.2", @@ -61,8 +61,8 @@ "ws": "^7.1.2" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/query-orchestrator": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/query-orchestrator": "1.3.45", "@oclif/dev-cli": "^1.23.1", "@types/body-parser": "^1.19.0", "@types/cors": "^2.8.8", diff --git a/packages/cubejs-snowflake-driver/CHANGELOG.md b/packages/cubejs-snowflake-driver/CHANGELOG.md index eb52092a81829..e89bb8c5cbcb2 100644 --- a/packages/cubejs-snowflake-driver/CHANGELOG.md +++ b/packages/cubejs-snowflake-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/snowflake-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/snowflake-driver diff --git a/packages/cubejs-snowflake-driver/package.json b/packages/cubejs-snowflake-driver/package.json index 46b808eb6586a..17275a9b51ae5 100644 --- a/packages/cubejs-snowflake-driver/package.json +++ b/packages/cubejs-snowflake-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/snowflake-driver", "description": "Cube.js Snowflake database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -25,8 +25,8 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "date-fns-timezone": "^0.1.4", "snowflake-sdk": "^2.0.3" }, @@ -38,7 +38,7 @@ "extends": "../cubejs-linter" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "typescript": "~5.2.2" } } diff --git a/packages/cubejs-sqlite-driver/CHANGELOG.md b/packages/cubejs-sqlite-driver/CHANGELOG.md index 6f17933d8a3f5..9a9a69ea16a61 100644 --- a/packages/cubejs-sqlite-driver/CHANGELOG.md +++ b/packages/cubejs-sqlite-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/sqlite-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/sqlite-driver diff --git a/packages/cubejs-sqlite-driver/package.json b/packages/cubejs-sqlite-driver/package.json index ef33729474594..e0528174666ab 100644 --- a/packages/cubejs-sqlite-driver/package.json +++ b/packages/cubejs-sqlite-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/sqlite-driver", "description": "Cube.js Sqlite database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -17,13 +17,13 @@ "lint": "eslint **/*.js" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "sqlite3": "^5.1.7" }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44" + "@cubejs-backend/linter": "1.3.45" }, "publishConfig": { "access": "public" diff --git a/packages/cubejs-templates/CHANGELOG.md b/packages/cubejs-templates/CHANGELOG.md index 2409781e8adff..52c2bd5563976 100644 --- a/packages/cubejs-templates/CHANGELOG.md +++ b/packages/cubejs-templates/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/templates + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/templates diff --git a/packages/cubejs-templates/package.json b/packages/cubejs-templates/package.json index 8e9a78f384842..ccffc7260be3d 100644 --- a/packages/cubejs-templates/package.json +++ b/packages/cubejs-templates/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/templates", - "version": "1.3.44", + "version": "1.3.45", "description": "Cube.js Templates helpers", "author": "Cube Dev, Inc.", "license": "Apache-2.0", @@ -26,7 +26,7 @@ "extends": "../cubejs-linter" }, "dependencies": { - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/shared": "1.3.45", "cross-spawn": "^7.0.3", "decompress": "^4.2.1", "decompress-targz": "^4.1.1", @@ -36,7 +36,7 @@ "source-map-support": "^0.5.19" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "typescript": "~5.2.2" } } diff --git a/packages/cubejs-testing-drivers/CHANGELOG.md b/packages/cubejs-testing-drivers/CHANGELOG.md index fc0cb7994aee0..136005a107d2a 100644 --- a/packages/cubejs-testing-drivers/CHANGELOG.md +++ b/packages/cubejs-testing-drivers/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/testing-drivers + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/testing-drivers diff --git a/packages/cubejs-testing-drivers/package.json b/packages/cubejs-testing-drivers/package.json index 89750b984f58e..e5c761b14274c 100644 --- a/packages/cubejs-testing-drivers/package.json +++ b/packages/cubejs-testing-drivers/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/testing-drivers", - "version": "1.3.44", + "version": "1.3.45", "description": "Cube.js drivers test suite", "author": "Cube Dev, Inc.", "license": "MIT", @@ -66,24 +66,24 @@ "dist/src" ], "dependencies": { - "@cubejs-backend/athena-driver": "1.3.44", - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/bigquery-driver": "1.3.44", - "@cubejs-backend/clickhouse-driver": "1.3.44", - "@cubejs-backend/cubestore-driver": "1.3.44", - "@cubejs-backend/databricks-jdbc-driver": "1.3.44", + "@cubejs-backend/athena-driver": "1.3.45", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/bigquery-driver": "1.3.45", + "@cubejs-backend/clickhouse-driver": "1.3.45", + "@cubejs-backend/cubestore-driver": "1.3.45", + "@cubejs-backend/databricks-jdbc-driver": "1.3.45", "@cubejs-backend/dotenv": "^9.0.2", - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/mssql-driver": "1.3.44", - "@cubejs-backend/mysql-driver": "1.3.44", - "@cubejs-backend/postgres-driver": "1.3.44", - "@cubejs-backend/query-orchestrator": "1.3.44", - "@cubejs-backend/server-core": "1.3.44", - "@cubejs-backend/shared": "1.3.44", - "@cubejs-backend/snowflake-driver": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", - "@cubejs-client/core": "1.3.44", - "@cubejs-client/ws-transport": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/mssql-driver": "1.3.45", + "@cubejs-backend/mysql-driver": "1.3.45", + "@cubejs-backend/postgres-driver": "1.3.45", + "@cubejs-backend/query-orchestrator": "1.3.45", + "@cubejs-backend/server-core": "1.3.45", + "@cubejs-backend/shared": "1.3.45", + "@cubejs-backend/snowflake-driver": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", + "@cubejs-client/core": "1.3.45", + "@cubejs-client/ws-transport": "1.3.45", "@jest/globals": "^29", "@types/jest": "^29", "@types/node": "^20", diff --git a/packages/cubejs-testing-shared/CHANGELOG.md b/packages/cubejs-testing-shared/CHANGELOG.md index e35f77c6cb054..09dbcb1307117 100644 --- a/packages/cubejs-testing-shared/CHANGELOG.md +++ b/packages/cubejs-testing-shared/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/testing-shared + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/testing-shared diff --git a/packages/cubejs-testing-shared/package.json b/packages/cubejs-testing-shared/package.json index 2e0c1872307f7..7cd298afa1786 100644 --- a/packages/cubejs-testing-shared/package.json +++ b/packages/cubejs-testing-shared/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/testing-shared", - "version": "1.3.44", + "version": "1.3.45", "description": "Cube.js Testing Helpers", "author": "Cube Dev, Inc.", "license": "Apache-2.0", @@ -21,16 +21,16 @@ ], "dependencies": { "@cubejs-backend/dotenv": "^9.0.2", - "@cubejs-backend/query-orchestrator": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/query-orchestrator": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "@testcontainers/kafka": "~10.28.0", "dedent": "^0.7.0", "node-fetch": "^2.6.7", "testcontainers": "^10.28.0" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@jest/globals": "^29", "@types/dedent": "^0.7.0", "@types/jest": "^29", diff --git a/packages/cubejs-testing/CHANGELOG.md b/packages/cubejs-testing/CHANGELOG.md index d9c7ba032e1e3..0f655c285cc95 100644 --- a/packages/cubejs-testing/CHANGELOG.md +++ b/packages/cubejs-testing/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/testing + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/testing diff --git a/packages/cubejs-testing/package.json b/packages/cubejs-testing/package.json index 9b067b9aa5ea3..cd218c8b049d6 100644 --- a/packages/cubejs-testing/package.json +++ b/packages/cubejs-testing/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/testing", - "version": "1.3.44", + "version": "1.3.45", "description": "Cube.js e2e tests", "author": "Cube Dev, Inc.", "license": "Apache-2.0", @@ -94,15 +94,15 @@ "birdbox-fixtures" ], "dependencies": { - "@cubejs-backend/cubestore-driver": "1.3.44", + "@cubejs-backend/cubestore-driver": "1.3.45", "@cubejs-backend/dotenv": "^9.0.2", - "@cubejs-backend/ksql-driver": "1.3.44", - "@cubejs-backend/postgres-driver": "1.3.44", - "@cubejs-backend/query-orchestrator": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", - "@cubejs-client/ws-transport": "1.3.44", + "@cubejs-backend/ksql-driver": "1.3.45", + "@cubejs-backend/postgres-driver": "1.3.45", + "@cubejs-backend/query-orchestrator": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", + "@cubejs-client/ws-transport": "1.3.45", "dedent": "^0.7.0", "fs-extra": "^8.1.0", "http-proxy": "^1.18.1", @@ -113,8 +113,8 @@ }, "devDependencies": { "@4tw/cypress-drag-drop": "^1.6.0", - "@cubejs-backend/linter": "1.3.44", - "@cubejs-client/core": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-client/core": "1.3.45", "@jest/globals": "^29", "@types/dedent": "^0.7.0", "@types/http-proxy": "^1.17.5", diff --git a/packages/cubejs-trino-driver/CHANGELOG.md b/packages/cubejs-trino-driver/CHANGELOG.md index 71b3b894fd25e..588b165d16a16 100644 --- a/packages/cubejs-trino-driver/CHANGELOG.md +++ b/packages/cubejs-trino-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/trino-driver + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/trino-driver diff --git a/packages/cubejs-trino-driver/package.json b/packages/cubejs-trino-driver/package.json index db9e69e09c880..a6394d36e8410 100644 --- a/packages/cubejs-trino-driver/package.json +++ b/packages/cubejs-trino-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/trino-driver", "description": "Cube.js Trino database driver", "author": "Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", @@ -27,10 +27,10 @@ "lint:fix": "eslint --fix src/* --ext .ts" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/prestodb-driver": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/prestodb-driver": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", + "@cubejs-backend/shared": "1.3.45", "node-fetch": "^2.6.1", "presto-client": "^1.1.0", "sqlstring": "^2.3.1" @@ -40,7 +40,7 @@ "access": "public" }, "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^29", "jest": "^29", "testcontainers": "^10.28.0", diff --git a/packages/cubejs-vertica-driver/CHANGELOG.md b/packages/cubejs-vertica-driver/CHANGELOG.md index 2754f3e53722b..a1a80fd303c04 100644 --- a/packages/cubejs-vertica-driver/CHANGELOG.md +++ b/packages/cubejs-vertica-driver/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube.js/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/vertica-driver + ## [1.3.44](https://github.com/cube-js/cube.js/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/vertica-driver diff --git a/packages/cubejs-vertica-driver/package.json b/packages/cubejs-vertica-driver/package.json index 57e46753643cc..faa81d16928e5 100644 --- a/packages/cubejs-vertica-driver/package.json +++ b/packages/cubejs-vertica-driver/package.json @@ -2,7 +2,7 @@ "name": "@cubejs-backend/vertica-driver", "description": "Cube.js Vertica database driver", "author": "Eduard Karacharov, Tim Brown, Cube Dev, Inc.", - "version": "1.3.44", + "version": "1.3.45", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.js.git", @@ -19,15 +19,15 @@ "lint:fix": "eslint --fix **/*.js" }, "dependencies": { - "@cubejs-backend/base-driver": "1.3.44", - "@cubejs-backend/query-orchestrator": "1.3.44", - "@cubejs-backend/schema-compiler": "1.3.44", + "@cubejs-backend/base-driver": "1.3.45", + "@cubejs-backend/query-orchestrator": "1.3.45", + "@cubejs-backend/schema-compiler": "1.3.45", "vertica-nodejs": "^1.0.3" }, "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", - "@cubejs-backend/testing-shared": "1.3.44", + "@cubejs-backend/linter": "1.3.45", + "@cubejs-backend/testing-shared": "1.3.45", "@types/jest": "^29", "jest": "^29", "testcontainers": "^10.28.0" diff --git a/rust/cubesql/CHANGELOG.md b/rust/cubesql/CHANGELOG.md index 09b54ff88dd86..773090de570e2 100644 --- a/rust/cubesql/CHANGELOG.md +++ b/rust/cubesql/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +### Features + +- **cubesql:** Improve DataGrip compatibility ([#9825](https://github.com/cube-js/cube/issues/9825)) ([18b09ee](https://github.com/cube-js/cube/commit/18b09ee5408bd82d28eb06f6f23e7cab29a2ce54)) + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/cubesql diff --git a/rust/cubesql/package.json b/rust/cubesql/package.json index 0067c2311c535..f4beced767dbc 100644 --- a/rust/cubesql/package.json +++ b/rust/cubesql/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/cubesql", - "version": "1.3.44", + "version": "1.3.45", "description": "SQL API for Cube as proxy over MySQL protocol.", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" diff --git a/rust/cubestore/CHANGELOG.md b/rust/cubestore/CHANGELOG.md index 7483e41161706..e05101141b691 100644 --- a/rust/cubestore/CHANGELOG.md +++ b/rust/cubestore/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.45](https://github.com/cube-js/cube/compare/v1.3.44...v1.3.45) (2025-07-29) + +**Note:** Version bump only for package @cubejs-backend/cubestore + ## [1.3.44](https://github.com/cube-js/cube/compare/v1.3.43...v1.3.44) (2025-07-28) **Note:** Version bump only for package @cubejs-backend/cubestore diff --git a/rust/cubestore/package.json b/rust/cubestore/package.json index ccdef5dadf1f3..c512d6b57470c 100644 --- a/rust/cubestore/package.json +++ b/rust/cubestore/package.json @@ -1,6 +1,6 @@ { "name": "@cubejs-backend/cubestore", - "version": "1.3.44", + "version": "1.3.45", "description": "Cube.js pre-aggregation storage layer.", "main": "dist/src/index.js", "typings": "dist/src/index.d.ts", @@ -27,7 +27,7 @@ "author": "Cube Dev, Inc.", "license": "Apache-2.0", "devDependencies": { - "@cubejs-backend/linter": "1.3.44", + "@cubejs-backend/linter": "1.3.45", "@types/jest": "^27", "@types/node": "^18", "jest": "^27", @@ -37,7 +37,7 @@ "access": "public" }, "dependencies": { - "@cubejs-backend/shared": "1.3.44", + "@cubejs-backend/shared": "1.3.45", "@octokit/core": "^3.2.5", "source-map-support": "^0.5.19" }, From 8fd6dcc2ec69fa37f79d22c78d2a9e50160d62df Mon Sep 17 00:00:00 2001 From: Mike Nitsenko Date: Tue, 29 Jul 2025 21:48:46 +0500 Subject: [PATCH 5/5] feat: add datasource schema read methods (#9818) --- .../src/orchestrator/QueryCache.ts | 36 +- .../src/orchestrator/QueryOrchestrator.ts | 133 ++++- .../test/unit/QueryOrchestrator.test.js | 457 ++++++++++++++++++ 3 files changed, 622 insertions(+), 4 deletions(-) diff --git a/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts b/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts index f3b6fbccce462..9159cdc855713 100644 --- a/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts +++ b/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts @@ -18,7 +18,7 @@ import { LocalCacheDriver } from './LocalCacheDriver'; import { DriverFactory, DriverFactoryByDataSource } from './DriverFactory'; import { LoadPreAggregationResult, PreAggregationDescription } from './PreAggregations'; import { getCacheHash } from './utils'; -import { CacheAndQueryDriverType } from './QueryOrchestrator'; +import { CacheAndQueryDriverType, MetadataOperationType } from './QueryOrchestrator'; type QueryOptions = { external?: boolean; @@ -563,8 +563,36 @@ export class QueryCache { ): QueryQueue { const queue: any = new QueryQueue(redisPrefix, { queryHandlers: { + metadata: async (req, _setCancelHandle) => { + const client = await clientFactory(); + const { operation } = req; + const params = req.params || {}; + + switch (operation) { + case MetadataOperationType.GET_SCHEMAS: + queue.logger('Getting datasource schemas', { dataSource: req.dataSource, requestId: req.requestId }); + return client.getSchemas(); + case MetadataOperationType.GET_TABLES_FOR_SCHEMAS: + queue.logger('Getting tables for schemas', { + dataSource: req.dataSource, + schemaCount: params.schemas?.length || 0, + requestId: req.requestId + }); + return client.getTablesForSpecificSchemas(params.schemas); + case MetadataOperationType.GET_COLUMNS_FOR_TABLES: + queue.logger('Getting columns for tables', { + dataSource: req.dataSource, + tableCount: params.tables?.length || 0, + requestId: req.requestId + }); + return client.getColumnsForSpecificTables(params.tables); + default: + throw new Error(`Unknown metadata operation: ${operation}`); + } + }, query: async (req, setCancelHandle) => { const client = await clientFactory(); + const resultPromise = executeFn(client, req); let handle; if (resultPromise.cancel) { @@ -632,6 +660,12 @@ export class QueryCache { })); }, cancelHandlers: { + metadata: async (req) => { + if (req.cancelHandler && queue.handles[req.cancelHandler]) { + await queue.handles[req.cancelHandler].cancel(); + delete queue.handles[req.cancelHandler]; + } + }, query: async (req) => { if (req.cancelHandler && queue.handles[req.cancelHandler]) { await queue.handles[req.cancelHandler].cancel(); diff --git a/packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts b/packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts index 0e60da3dc32e9..98b9696ffe414 100644 --- a/packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts +++ b/packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts @@ -2,9 +2,14 @@ import * as stream from 'stream'; import R from 'ramda'; import { getEnv } from '@cubejs-backend/shared'; import { CubeStoreDriver } from '@cubejs-backend/cubestore-driver'; - -import { QueryKey } from '@cubejs-backend/base-driver'; -import { QueryCache, QueryBody, TempTable, PreAggTableToTempTable } from './QueryCache'; +import { + QuerySchemasResult, + QueryTablesResult, + QueryColumnsResult, + QueryKey +} from '@cubejs-backend/base-driver'; + +import { QueryCache, QueryBody, TempTable, PreAggTableToTempTable, QueryWithParams, CacheKey } from './QueryCache'; import { PreAggregations, PreAggregationDescription, getLastUpdatedAtTimestamp } from './PreAggregations'; import { DriverFactory, DriverFactoryByDataSource } from './DriverFactory'; import { QueryStream } from './QueryStream'; @@ -17,6 +22,12 @@ export enum DriverType { Cache = 'cache', } +export enum MetadataOperationType { + GET_SCHEMAS = 'GET_SCHEMAS', + GET_TABLES_FOR_SCHEMAS = 'GET_TABLES_FOR_SCHEMAS', + GET_COLUMNS_FOR_TABLES = 'GET_COLUMNS_FOR_TABLES' +} + export interface QueryOrchestratorOptions { externalDriverFactory?: DriverFactory; cacheAndQueueDriver?: CacheAndQueryDriverType; @@ -428,4 +439,120 @@ export class QueryOrchestrator { public async updateRefreshEndReached() { return this.preAggregations.updateRefreshEndReached(); } + + private createMetadataQuery(operation: string, params: Record): QueryWithParams { + return [ + `METADATA:${operation}`, + // TODO (@MikeNitsenko): Metadata queries need object params like [{ schema, table }] + // but QueryWithParams expects string[]. This forces JSON.stringify workaround. + [JSON.stringify(params)], + { external: false, renewalThreshold: 24 * 60 * 60 } + ]; + } + + private async queryDataSourceMetadata( + operation: MetadataOperationType, + params: Record, + dataSource: string = 'default', + options: { + requestId?: string; + forceRefresh?: boolean; + renewalThreshold?: number; + expiration?: number; + } = {} + ): Promise { + const { + requestId, + forceRefresh = false, + renewalThreshold = 24 * 60 * 60, + expiration = 7 * 24 * 60 * 60, + } = options; + + const metadataQuery = this.createMetadataQuery(operation, params); + const cacheKey: CacheKey = [metadataQuery, dataSource]; + + const renewalKey = forceRefresh ? undefined : [ + `METADATA_RENEWAL:${operation}`, + dataSource, + Math.floor(Date.now() / (renewalThreshold * 1000)) + ]; + + return this.queryCache.cacheQueryResult( + metadataQuery, + [], + cacheKey, + expiration, + { + renewalThreshold, + renewalKey, + forceNoCache: forceRefresh, + requestId, + dataSource, + useInMemory: true, + waitForRenew: true, + } + ); + } + + /** + * Query the data source for available schemas. + */ + public async queryDataSourceSchemas( + dataSource: string = 'default', + options: { + requestId?: string; + forceRefresh?: boolean; + renewalThreshold?: number; + expiration?: number; + } = {} + ): Promise { + return this.queryDataSourceMetadata( + MetadataOperationType.GET_SCHEMAS, + {}, + dataSource, + options + ); + } + + /** + * Query the data source for tables within the specified schemas. + */ + public async queryTablesForSchemas( + schemas: QuerySchemasResult[], + dataSource: string = 'default', + options: { + requestId?: string; + forceRefresh?: boolean; + renewalThreshold?: number; + expiration?: number; + } = {} + ): Promise { + return this.queryDataSourceMetadata( + MetadataOperationType.GET_TABLES_FOR_SCHEMAS, + { schemas }, + dataSource, + options + ); + } + + /** + * Query the data source for columns within the specified tables. + */ + public async queryColumnsForTables( + tables: QueryTablesResult[], + dataSource: string = 'default', + options: { + requestId?: string; + forceRefresh?: boolean; + renewalThreshold?: number; + expiration?: number; + } = {} + ): Promise { + return this.queryDataSourceMetadata( + MetadataOperationType.GET_COLUMNS_FOR_TABLES, + { tables }, + dataSource, + options + ); + } } diff --git a/packages/cubejs-query-orchestrator/test/unit/QueryOrchestrator.test.js b/packages/cubejs-query-orchestrator/test/unit/QueryOrchestrator.test.js index eb6954ad5bdea..08196c142739d 100644 --- a/packages/cubejs-query-orchestrator/test/unit/QueryOrchestrator.test.js +++ b/packages/cubejs-query-orchestrator/test/unit/QueryOrchestrator.test.js @@ -24,6 +24,38 @@ class MockDriver { query(query) { this.executedQueries.push(query); + + // Handle metadata operations - check if query is an array with metadata operation + if (Array.isArray(query) && query.length > 0 && typeof query[0] === 'string') { + const operation = query[0]; + if (operation === 'METADATA:GET_SCHEMAS') { + return this.getSchemas(); + } else if (operation === 'METADATA:GET_TABLES_FOR_SCHEMAS') { + // Parse parameters from the query array + let params = {}; + try { + params = query[1] && query[1].length > 0 ? JSON.parse(query[1][0]) : {}; + } catch (error) { + console.warn('Failed to parse JSON parameters for METADATA:GET_TABLES_FOR_SCHEMAS:', error); + } + return this.getTablesForSpecificSchemas(params.schemas || []); + } else if (operation === 'METADATA:GET_COLUMNS_FOR_TABLES') { + // Parse parameters from the query array + let params = {}; + try { + params = query[1] && query[1].length > 0 ? JSON.parse(query[1][0]) : {}; + } catch (error) { + console.warn('Failed to parse JSON parameters for METADATA:GET_COLUMNS_FOR_TABLES:', error); + } + return this.getColumnsForSpecificTables(params.tables || []); + } + } + + // Handle regular SQL queries - ensure query is a string + if (typeof query !== 'string') { + return Promise.resolve([]); + } + let promise = Promise.resolve([query]); if (query.match('orders_too_big')) { promise = promise.then((res) => new Promise(resolve => setTimeout(() => resolve(res), 3000))); @@ -1769,4 +1801,429 @@ describe('QueryOrchestrator', () => { } // expect(mockDriver.tables).toContainEqual(expect.stringMatching(/orders_delay/)); }); + + describe('Data Source Metadata Methods', () => { + let metadataOrchestrator; + let metadataMockDriver; + + beforeEach(() => { + metadataMockDriver = new MockDriver(); + + // Mock metadata methods + metadataMockDriver.getSchemas = jest.fn().mockResolvedValue([ + { schema_name: 'public' }, + { schema_name: 'analytics' }, + { schema_name: 'staging' } + ]); + + metadataMockDriver.getTablesForSpecificSchemas = jest.fn().mockImplementation((schemas) => { + const tables = []; + schemas.forEach(schema => { + if (schema.schema_name === 'public') { + tables.push( + { schema_name: 'public', table_name: 'users' }, + { schema_name: 'public', table_name: 'orders' }, + { schema_name: 'public', table_name: 'products' } + ); + } else if (schema.schema_name === 'analytics') { + tables.push( + { schema_name: 'analytics', table_name: 'user_metrics' }, + { schema_name: 'analytics', table_name: 'sales_summary' } + ); + } + }); + return Promise.resolve(tables); + }); + + metadataMockDriver.getColumnsForSpecificTables = jest.fn().mockImplementation((tables) => { + const columns = []; + tables.forEach(table => { + if (table.table_name === 'users') { + columns.push( + { + schema_name: 'public', + table_name: 'users', + column_name: 'id', + data_type: 'integer', + attributes: ['PRIMARY_KEY'] + }, + { + schema_name: 'public', + table_name: 'users', + column_name: 'name', + data_type: 'varchar', + attributes: [] + }, + { + schema_name: 'public', + table_name: 'users', + column_name: 'email', + data_type: 'varchar', + attributes: ['UNIQUE'] + } + ); + } else if (table.table_name === 'orders') { + columns.push( + { + schema_name: 'public', + table_name: 'orders', + column_name: 'id', + data_type: 'integer', + attributes: ['PRIMARY_KEY'] + }, + { + schema_name: 'public', + table_name: 'orders', + column_name: 'user_id', + data_type: 'integer', + attributes: [], + foreign_keys: [{ target_table: 'users', target_column: 'id' }] + }, + { + schema_name: 'public', + table_name: 'orders', + column_name: 'total', + data_type: 'decimal', + attributes: [] + } + ); + } + }); + return Promise.resolve(columns); + }); + + const driverFactory = () => metadataMockDriver; + + metadataOrchestrator = new QueryOrchestrator( + 'ORCHESTRATOR_TEST_METADATA', + driverFactory, + console.log, + { + cacheAndQueueDriver: 'memory', + continueWaitTimeout: 5, + queryCacheOptions: { + queueOptions: () => ({ + concurrency: 2, + processUid: 'metadata_test', + }), + }, + preAggregationsOptions: { + queueOptions: () => ({ + concurrency: 2, + processUid: 'metadata_test', + }), + }, + } + ); + + jest.clearAllMocks(); + + if (metadataOrchestrator && metadataOrchestrator.queryCache && metadataOrchestrator.queryCache.memoryCache) { + metadataOrchestrator.queryCache.memoryCache.clear(); + } + + if (metadataOrchestrator && metadataOrchestrator.queryCache && metadataOrchestrator.queryCache.getCacheDriver()) { + const cacheDriver = metadataOrchestrator.queryCache.getCacheDriver(); + if (cacheDriver.store) { + Object.keys(cacheDriver.store).forEach(key => delete cacheDriver.store[key]); + } + } + }); + + afterEach(async () => { + await metadataOrchestrator.cleanup(); + }); + + describe('queryDataSourceSchemas', () => { + test('should query and cache schemas for default datasource', async () => { + const result = await metadataOrchestrator.queryDataSourceSchemas(); + + expect(result).toEqual([ + { schema_name: 'public' }, + { schema_name: 'analytics' }, + { schema_name: 'staging' } + ]); + }); + + test('should query schemas for specific datasource', async () => { + const result = await metadataOrchestrator.queryDataSourceSchemas('custom'); + + expect(result).toEqual([ + { schema_name: 'public' }, + { schema_name: 'analytics' }, + { schema_name: 'staging' } + ]); + }); + + test('should use cache on second call', async () => { + // First call + await metadataOrchestrator.queryDataSourceSchemas(); + // Second call should use cache + const result = await metadataOrchestrator.queryDataSourceSchemas(); + + expect(result).toEqual([ + { schema_name: 'public' }, + { schema_name: 'analytics' }, + { schema_name: 'staging' } + ]); + }); + + test('should force refresh when requested', async () => { + // First call + await metadataOrchestrator.queryDataSourceSchemas(); + // Second call with forceRefresh + const result = await metadataOrchestrator.queryDataSourceSchemas('default', { forceRefresh: true }); + + expect(result).toEqual([ + { schema_name: 'public' }, + { schema_name: 'analytics' }, + { schema_name: 'staging' } + ]); + }); + + test('should pass requestId option', async () => { + const requestId = 'test-request-123'; + await metadataOrchestrator.queryDataSourceSchemas('default', { requestId }); + + expect(metadataMockDriver.getSchemas).toHaveBeenCalledTimes(1); + }); + }); + + describe('queryTablesForSchemas', () => { + test('should query tables for given schemas', async () => { + const schemas = [ + { schema_name: 'public' }, + { schema_name: 'analytics' } + ]; + + const result = await metadataOrchestrator.queryTablesForSchemas(schemas); + + expect(result).toEqual([ + { schema_name: 'public', table_name: 'users' }, + { schema_name: 'public', table_name: 'orders' }, + { schema_name: 'public', table_name: 'products' }, + { schema_name: 'analytics', table_name: 'user_metrics' }, + { schema_name: 'analytics', table_name: 'sales_summary' } + ]); + expect(metadataMockDriver.getTablesForSpecificSchemas).toHaveBeenCalledWith(schemas); + }); + + test('should cache results based on schema list', async () => { + const schemas = [{ schema_name: 'public' }]; + + // First call - will execute and store in cache + await metadataOrchestrator.queryTablesForSchemas(schemas); + + // Add a delay to ensure the first query has completed and cached its result + await new Promise(resolve => setTimeout(resolve, 100)); + + // Clear the mock calls + metadataMockDriver.getTablesForSpecificSchemas.mockClear(); + + // Create equivalent but different object instance + // Our hash function should handle this correctly + const schemas2 = [{ schema_name: 'public' }]; + + // Second call should use cache + const result = await metadataOrchestrator.queryTablesForSchemas(schemas2); + + expect(result).toEqual([ + { schema_name: 'public', table_name: 'users' }, + { schema_name: 'public', table_name: 'orders' }, + { schema_name: 'public', table_name: 'products' } + ]); + + // Verify driver wasn't called again + expect(metadataMockDriver.getTablesForSpecificSchemas).not.toHaveBeenCalled(); + }); + + test('should handle empty schema list', async () => { + const result = await metadataOrchestrator.queryTablesForSchemas([]); + + expect(result).toEqual([]); + expect(metadataMockDriver.getTablesForSpecificSchemas).toHaveBeenCalledWith([]); + }); + + test('should force refresh when requested', async () => { + const schemas = [{ schema_name: 'public' }]; + + await metadataOrchestrator.queryTablesForSchemas(schemas); + await metadataOrchestrator.queryTablesForSchemas(schemas, 'default', { forceRefresh: true }); + + expect(metadataMockDriver.getTablesForSpecificSchemas).toHaveBeenCalledTimes(2); + }); + }); + + describe('queryColumnsForTables', () => { + test('should query columns for given tables', async () => { + const tables = [ + { schema_name: 'public', table_name: 'users' }, + { schema_name: 'public', table_name: 'orders' } + ]; + + const result = await metadataOrchestrator.queryColumnsForTables(tables); + + expect(result).toEqual([ + { + schema_name: 'public', + table_name: 'users', + column_name: 'id', + data_type: 'integer', + attributes: ['PRIMARY_KEY'] + }, + { + schema_name: 'public', + table_name: 'users', + column_name: 'name', + data_type: 'varchar', + attributes: [] + }, + { + schema_name: 'public', + table_name: 'users', + column_name: 'email', + data_type: 'varchar', + attributes: ['UNIQUE'] + }, + { + schema_name: 'public', + table_name: 'orders', + column_name: 'id', + data_type: 'integer', + attributes: ['PRIMARY_KEY'] + }, + { + schema_name: 'public', + table_name: 'orders', + column_name: 'user_id', + data_type: 'integer', + attributes: [], + foreign_keys: [{ target_table: 'users', target_column: 'id' }] + }, + { + schema_name: 'public', + table_name: 'orders', + column_name: 'total', + data_type: 'decimal', + attributes: [] + } + ]); + expect(metadataMockDriver.getColumnsForSpecificTables).toHaveBeenCalledWith(tables); + }); + + test('should cache results based on table list', async () => { + const tables = [{ schema_name: 'public', table_name: 'users' }]; + + // First call - will execute and store in cache + await metadataOrchestrator.queryColumnsForTables(tables); + + // Add a delay to ensure the first query has completed and cached its result + await new Promise(resolve => setTimeout(resolve, 100)); + + // Clear the mock calls + metadataMockDriver.getColumnsForSpecificTables.mockClear(); + + // Create equivalent but different object instance + // Our hash function should handle this correctly + const tables2 = [{ schema_name: 'public', table_name: 'users' }]; + + // Second call should use cache + const result = await metadataOrchestrator.queryColumnsForTables(tables2); + + expect(result).toEqual([ + { + schema_name: 'public', + table_name: 'users', + column_name: 'id', + data_type: 'integer', + attributes: ['PRIMARY_KEY'] + }, + { + schema_name: 'public', + table_name: 'users', + column_name: 'name', + data_type: 'varchar', + attributes: [] + }, + { + schema_name: 'public', + table_name: 'users', + column_name: 'email', + data_type: 'varchar', + attributes: ['UNIQUE'] + } + ]); + + // Verify driver wasn't called again + expect(metadataMockDriver.getColumnsForSpecificTables).not.toHaveBeenCalled(); + }); + + test('should handle empty table list', async () => { + const result = await metadataOrchestrator.queryColumnsForTables([]); + + expect(result).toEqual([]); + expect(metadataMockDriver.getColumnsForSpecificTables).toHaveBeenCalledWith([]); + }); + + test('should force refresh when requested', async () => { + const tables = [{ schema_name: 'public', table_name: 'users' }]; + + await metadataOrchestrator.queryColumnsForTables(tables); + await metadataOrchestrator.queryColumnsForTables(tables, 'default', { forceRefresh: true }); + + expect(metadataMockDriver.getColumnsForSpecificTables).toHaveBeenCalledTimes(2); + }); + }); + + describe('Integration Tests', () => { + test('should handle full metadata workflow', async () => { + // Query schemas + const schemas = await metadataOrchestrator.queryDataSourceSchemas(); + expect(schemas).toHaveLength(3); + + // Query tables for specific schemas + const publicSchema = schemas.filter(s => s.schema_name === 'public'); + const tables = await metadataOrchestrator.queryTablesForSchemas(publicSchema); + expect(tables).toHaveLength(3); + + // Query columns for specific tables + const userTable = tables.filter(t => t.table_name === 'users'); + const columns = await metadataOrchestrator.queryColumnsForTables(userTable); + expect(columns).toHaveLength(3); + expect(columns[0].column_name).toBe('id'); + expect(columns[0].data_type).toBe('integer'); + expect(columns[0].attributes).toContain('PRIMARY_KEY'); + }); + + test('should handle concurrent metadata requests', async () => { + const schemas = [{ schema_name: 'public' }]; + + // Make concurrent requests + const promises = [ + metadataOrchestrator.queryDataSourceSchemas(), + metadataOrchestrator.queryDataSourceSchemas(), + metadataOrchestrator.queryTablesForSchemas(schemas), + metadataOrchestrator.queryTablesForSchemas(schemas) + ]; + + const results = await Promise.all(promises); + + // All requests should return the same data + expect(results[0]).toEqual(results[1]); + expect(results[2]).toEqual(results[3]); + }); + + test('should handle error scenarios gracefully', async () => { + // Mock driver error + metadataMockDriver.getSchemas.mockRejectedValueOnce(new Error('Database connection failed')); + + await expect(metadataOrchestrator.queryDataSourceSchemas('default', { forceRefresh: true })).rejects.toThrow('Database connection failed'); + + // Should retry on next call + metadataMockDriver.getSchemas.mockResolvedValueOnce([{ schema_name: 'recovered' }]); + const result = await metadataOrchestrator.queryDataSourceSchemas('default', { forceRefresh: true }); + expect(result).toEqual([{ schema_name: 'recovered' }]); + }); + }); + }); });