mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-27 00:19:58 +00:00
refactor: cleanup datafusion-pg-catalog dependencies (#7025)
* refactor: cleanup datafusion-pg-catalog dependencies Signed-off-by: Ning Sun <sunning@greptime.com> * chore: toml format * feat: update upstream --------- Signed-off-by: Ning Sun <sunning@greptime.com>
This commit is contained in:
91
Cargo.lock
generated
91
Cargo.lock
generated
@@ -479,20 +479,6 @@ dependencies = [
|
|||||||
"arrow-select",
|
"arrow-select",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "arrow-pg"
|
|
||||||
version = "0.5.0"
|
|
||||||
source = "git+https://github.com/datafusion-contrib/datafusion-postgres?rev=412dad6b88ca83d11498338896044319ddac676c#412dad6b88ca83d11498338896044319ddac676c"
|
|
||||||
dependencies = [
|
|
||||||
"bytes",
|
|
||||||
"chrono",
|
|
||||||
"datafusion",
|
|
||||||
"futures",
|
|
||||||
"pgwire",
|
|
||||||
"postgres-types",
|
|
||||||
"rust_decimal",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arrow-row"
|
name = "arrow-row"
|
||||||
version = "56.1.0"
|
version = "56.1.0"
|
||||||
@@ -1465,7 +1451,7 @@ dependencies = [
|
|||||||
"common-workload",
|
"common-workload",
|
||||||
"dashmap",
|
"dashmap",
|
||||||
"datafusion",
|
"datafusion",
|
||||||
"datafusion-postgres",
|
"datafusion-pg-catalog",
|
||||||
"datatypes",
|
"datatypes",
|
||||||
"futures",
|
"futures",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@@ -2197,8 +2183,8 @@ dependencies = [
|
|||||||
"datafusion-common",
|
"datafusion-common",
|
||||||
"datafusion-expr",
|
"datafusion-expr",
|
||||||
"datafusion-functions-aggregate-common",
|
"datafusion-functions-aggregate-common",
|
||||||
|
"datafusion-pg-catalog",
|
||||||
"datafusion-physical-expr",
|
"datafusion-physical-expr",
|
||||||
"datafusion-postgres",
|
|
||||||
"datatypes",
|
"datatypes",
|
||||||
"derive_more",
|
"derive_more",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -3727,6 +3713,19 @@ dependencies = [
|
|||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "datafusion-pg-catalog"
|
||||||
|
version = "0.9.0"
|
||||||
|
source = "git+https://github.com/datafusion-contrib/datafusion-postgres?rev=3d1b7c7d5b82dd49bafc2803259365e633f654fa#3d1b7c7d5b82dd49bafc2803259365e633f654fa"
|
||||||
|
dependencies = [
|
||||||
|
"async-trait",
|
||||||
|
"datafusion",
|
||||||
|
"futures",
|
||||||
|
"log",
|
||||||
|
"postgres-types",
|
||||||
|
"tokio",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "datafusion-physical-expr"
|
name = "datafusion-physical-expr"
|
||||||
version = "49.0.0"
|
version = "49.0.0"
|
||||||
@@ -3810,28 +3809,6 @@ dependencies = [
|
|||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "datafusion-postgres"
|
|
||||||
version = "0.9.0"
|
|
||||||
source = "git+https://github.com/datafusion-contrib/datafusion-postgres?rev=412dad6b88ca83d11498338896044319ddac676c#412dad6b88ca83d11498338896044319ddac676c"
|
|
||||||
dependencies = [
|
|
||||||
"arrow-pg",
|
|
||||||
"async-trait",
|
|
||||||
"bytes",
|
|
||||||
"chrono",
|
|
||||||
"datafusion",
|
|
||||||
"futures",
|
|
||||||
"getset",
|
|
||||||
"log",
|
|
||||||
"pgwire",
|
|
||||||
"postgres-types",
|
|
||||||
"rust_decimal",
|
|
||||||
"rustls-pemfile",
|
|
||||||
"rustls-pki-types",
|
|
||||||
"tokio",
|
|
||||||
"tokio-rustls",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "datafusion-pruning"
|
name = "datafusion-pruning"
|
||||||
version = "49.0.0"
|
version = "49.0.0"
|
||||||
@@ -5314,18 +5291,6 @@ dependencies = [
|
|||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "getset"
|
|
||||||
version = "0.1.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9cf0fc11e47561d47397154977bc219f4cf809b2974facc3ccb3b89e2436f912"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro-error2",
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 2.0.104",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gimli"
|
name = "gimli"
|
||||||
version = "0.31.1"
|
version = "0.31.1"
|
||||||
@@ -9216,7 +9181,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "ddf403a6ee31cf7f2217b2bd8447cb13dbb6c268d7e81501bc78a4d3daafd294"
|
checksum = "ddf403a6ee31cf7f2217b2bd8447cb13dbb6c268d7e81501bc78a4d3daafd294"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"base64 0.22.1",
|
|
||||||
"bytes",
|
"bytes",
|
||||||
"chrono",
|
"chrono",
|
||||||
"derive-new",
|
"derive-new",
|
||||||
@@ -9229,12 +9193,10 @@ dependencies = [
|
|||||||
"ring",
|
"ring",
|
||||||
"rust_decimal",
|
"rust_decimal",
|
||||||
"rustls-pki-types",
|
"rustls-pki-types",
|
||||||
"stringprep",
|
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-rustls",
|
"tokio-rustls",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"x509-certificate 0.24.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -11601,7 +11563,7 @@ dependencies = [
|
|||||||
"datafusion",
|
"datafusion",
|
||||||
"datafusion-common",
|
"datafusion-common",
|
||||||
"datafusion-expr",
|
"datafusion-expr",
|
||||||
"datafusion-postgres",
|
"datafusion-pg-catalog",
|
||||||
"datatypes",
|
"datatypes",
|
||||||
"derive_builder 0.20.2",
|
"derive_builder 0.20.2",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -13421,7 +13383,7 @@ dependencies = [
|
|||||||
"tokio",
|
"tokio",
|
||||||
"tokio-postgres",
|
"tokio-postgres",
|
||||||
"tokio-rustls",
|
"tokio-rustls",
|
||||||
"x509-certificate 0.23.1",
|
"x509-certificate",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -15062,25 +15024,6 @@ dependencies = [
|
|||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "x509-certificate"
|
|
||||||
version = "0.24.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e57b9f8bcae7c1f36479821ae826d75050c60ce55146fd86d3553ed2573e2762"
|
|
||||||
dependencies = [
|
|
||||||
"bcder",
|
|
||||||
"bytes",
|
|
||||||
"chrono",
|
|
||||||
"der",
|
|
||||||
"hex",
|
|
||||||
"pem",
|
|
||||||
"ring",
|
|
||||||
"signature",
|
|
||||||
"spki",
|
|
||||||
"thiserror 1.0.69",
|
|
||||||
"zeroize",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xattr"
|
name = "xattr"
|
||||||
version = "1.5.1"
|
version = "1.5.1"
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ datafusion-functions = "49"
|
|||||||
datafusion-functions-aggregate-common = "49"
|
datafusion-functions-aggregate-common = "49"
|
||||||
datafusion-optimizer = "49"
|
datafusion-optimizer = "49"
|
||||||
datafusion-orc = { git = "https://github.com/GreptimeTeam/datafusion-orc", rev = "a0a5f902158f153119316eaeec868cff3fc8a99d" }
|
datafusion-orc = { git = "https://github.com/GreptimeTeam/datafusion-orc", rev = "a0a5f902158f153119316eaeec868cff3fc8a99d" }
|
||||||
|
datafusion-pg-catalog = { git = "https://github.com/datafusion-contrib/datafusion-postgres", rev = "3d1b7c7d5b82dd49bafc2803259365e633f654fa" }
|
||||||
datafusion-physical-expr = "49"
|
datafusion-physical-expr = "49"
|
||||||
datafusion-physical-plan = "49"
|
datafusion-physical-plan = "49"
|
||||||
datafusion-postgres = { git = "https://github.com/datafusion-contrib/datafusion-postgres", rev = "412dad6b88ca83d11498338896044319ddac676c" }
|
|
||||||
datafusion-sql = "49"
|
datafusion-sql = "49"
|
||||||
datafusion-substrait = "49"
|
datafusion-substrait = "49"
|
||||||
deadpool = "0.12"
|
deadpool = "0.12"
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ common-version.workspace = true
|
|||||||
common-workload.workspace = true
|
common-workload.workspace = true
|
||||||
dashmap.workspace = true
|
dashmap.workspace = true
|
||||||
datafusion.workspace = true
|
datafusion.workspace = true
|
||||||
datafusion-postgres.workspace = true
|
datafusion-pg-catalog.workspace = true
|
||||||
datatypes.workspace = true
|
datatypes.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
futures-util.workspace = true
|
futures-util.workspace = true
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ use datafusion::datasource::TableType;
|
|||||||
use datafusion::error::DataFusionError;
|
use datafusion::error::DataFusionError;
|
||||||
use datafusion::execution::TaskContext;
|
use datafusion::execution::TaskContext;
|
||||||
use datafusion::physical_plan::stream::RecordBatchStreamAdapter as DfRecordBatchStreamAdapter;
|
use datafusion::physical_plan::stream::RecordBatchStreamAdapter as DfRecordBatchStreamAdapter;
|
||||||
use datafusion_postgres::pg_catalog::catalog_info::CatalogInfo;
|
use datafusion_pg_catalog::pg_catalog::catalog_info::CatalogInfo;
|
||||||
use datafusion_postgres::pg_catalog::{
|
use datafusion_pg_catalog::pg_catalog::{
|
||||||
PgCatalogSchemaProvider, PgCatalogStaticTables, PgCatalogTable,
|
PG_CATALOG_TABLES, PgCatalogSchemaProvider, PgCatalogStaticTables, PgCatalogTable,
|
||||||
};
|
};
|
||||||
use snafu::ResultExt;
|
use snafu::ResultExt;
|
||||||
use store_api::storage::ScanRequest;
|
use store_api::storage::ScanRequest;
|
||||||
@@ -74,7 +74,7 @@ impl PGCatalogProvider {
|
|||||||
|
|
||||||
let mut table_ids = HashMap::new();
|
let mut table_ids = HashMap::new();
|
||||||
let mut table_id = PG_CATALOG_TABLE_ID_START;
|
let mut table_id = PG_CATALOG_TABLE_ID_START;
|
||||||
for name in datafusion_postgres::pg_catalog::PG_CATALOG_TABLES {
|
for name in PG_CATALOG_TABLES {
|
||||||
table_ids.insert(*name, table_id);
|
table_ids.insert(*name, table_id);
|
||||||
table_id += 1;
|
table_id += 1;
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,7 @@ impl PGCatalogProvider {
|
|||||||
// Must follow the same security rules as [`InformationSchemaProvider::build_tables`].
|
// Must follow the same security rules as [`InformationSchemaProvider::build_tables`].
|
||||||
let mut tables = HashMap::new();
|
let mut tables = HashMap::new();
|
||||||
// It's safe to unwrap here because we are sure that the constants have been handle correctly inside system_table.
|
// It's safe to unwrap here because we are sure that the constants have been handle correctly inside system_table.
|
||||||
for name in datafusion_postgres::pg_catalog::PG_CATALOG_TABLES {
|
for name in PG_CATALOG_TABLES {
|
||||||
if let Some(table) = self.build_table(name) {
|
if let Some(table) = self.build_table(name) {
|
||||||
tables.insert(name.to_string(), table);
|
tables.insert(name.to_string(), table);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ datafusion.workspace = true
|
|||||||
datafusion-common.workspace = true
|
datafusion-common.workspace = true
|
||||||
datafusion-expr.workspace = true
|
datafusion-expr.workspace = true
|
||||||
datafusion-functions-aggregate-common.workspace = true
|
datafusion-functions-aggregate-common.workspace = true
|
||||||
|
datafusion-pg-catalog.workspace = true
|
||||||
datafusion-physical-expr.workspace = true
|
datafusion-physical-expr.workspace = true
|
||||||
datafusion-postgres.workspace = true
|
|
||||||
datatypes.workspace = true
|
datatypes.workspace = true
|
||||||
derive_more = { version = "1", default-features = false, features = ["display"] }
|
derive_more = { version = "1", default-features = false, features = ["display"] }
|
||||||
geo = { version = "0.29", optional = true }
|
geo = { version = "0.29", optional = true }
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ use datafusion::catalog::TableFunction;
|
|||||||
use datafusion::common::ScalarValue;
|
use datafusion::common::ScalarValue;
|
||||||
use datafusion::common::utils::SingleRowListArrayBuilder;
|
use datafusion::common::utils::SingleRowListArrayBuilder;
|
||||||
use datafusion_expr::{ColumnarValue, ScalarFunctionArgs, Signature, Volatility};
|
use datafusion_expr::{ColumnarValue, ScalarFunctionArgs, Signature, Volatility};
|
||||||
use datafusion_postgres::pg_catalog::{self, PgCatalogStaticTables};
|
use datafusion_pg_catalog::pg_catalog::{self, PgCatalogStaticTables};
|
||||||
use datatypes::arrow::datatypes::{DataType, Field};
|
use datatypes::arrow::datatypes::{DataType, Field};
|
||||||
use derive_more::Display;
|
use derive_more::Display;
|
||||||
use version::PGVersionFunction;
|
use version::PGVersionFunction;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ dashmap.workspace = true
|
|||||||
datafusion.workspace = true
|
datafusion.workspace = true
|
||||||
datafusion-common.workspace = true
|
datafusion-common.workspace = true
|
||||||
datafusion-expr.workspace = true
|
datafusion-expr.workspace = true
|
||||||
datafusion-postgres.workspace = true
|
datafusion-pg-catalog.workspace = true
|
||||||
datatypes.workspace = true
|
datatypes.workspace = true
|
||||||
derive_builder.workspace = true
|
derive_builder.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ use common_recordbatch::RecordBatch;
|
|||||||
use common_recordbatch::error::Result as RecordBatchResult;
|
use common_recordbatch::error::Result as RecordBatchResult;
|
||||||
use common_telemetry::{debug, tracing};
|
use common_telemetry::{debug, tracing};
|
||||||
use datafusion_common::ParamValues;
|
use datafusion_common::ParamValues;
|
||||||
use datafusion_postgres::sql::PostgresCompatibilityParser;
|
use datafusion_pg_catalog::sql::PostgresCompatibilityParser;
|
||||||
use datatypes::prelude::ConcreteDataType;
|
use datatypes::prelude::ConcreteDataType;
|
||||||
use datatypes::schema::SchemaRef;
|
use datatypes::schema::SchemaRef;
|
||||||
use futures::{Sink, SinkExt, Stream, StreamExt, future, stream};
|
use futures::{Sink, SinkExt, Stream, StreamExt, future, stream};
|
||||||
|
|||||||
Reference in New Issue
Block a user