refactor(zip): simplify archive extraction path (#3290)

* refactor(zip): simplify archive extraction path

* build(deps): align datafusion and http updates

* fix(test): restore pre-commit compatibility
This commit is contained in:
houseme
2026-06-09 04:03:02 +08:00
committed by GitHub
parent 6413df4b7f
commit 9354b939ca
9 changed files with 2105 additions and 1041 deletions
@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::any::Any;
use std::borrow::Cow;
use std::fmt::Display;
use std::sync::Arc;
@@ -78,10 +77,6 @@ impl TableSourceAdapter {
#[async_trait]
impl TableSource for TableSourceAdapter {
fn as_any(&self) -> &dyn Any {
self
}
fn schema(&self) -> SchemaRef {
self.table_handle.schema()
}
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::{any::Any, fmt, sync::Arc};
use std::{fmt, sync::Arc};
use async_trait::async_trait;
use datafusion::{
@@ -88,8 +88,7 @@ impl ParquetSelectTable {
fn partitioned_file(&self) -> PartitionedFile {
let file = PartitionedFile::new(self.object_path.clone(), self.object_size);
if let Some(access_plan) = self.access_plan.as_ref() {
let extensions: Arc<dyn Any + Send + Sync> = access_plan.clone();
file.with_extensions(extensions)
file.with_extension(access_plan.as_ref().clone())
} else {
file
}
@@ -98,10 +97,6 @@ impl ParquetSelectTable {
#[async_trait]
impl TableProvider for ParquetSelectTable {
fn as_any(&self) -> &dyn Any {
self
}
fn schema(&self) -> SchemaRef {
Arc::clone(&self.schema)
}
+9 -1
View File
@@ -19,7 +19,7 @@ use datafusion::arrow::datatypes::DataType;
use datafusion::common::Result as DFResult;
use datafusion::datasource::TableProvider;
use datafusion::logical_expr::var_provider::is_system_variables;
use datafusion::logical_expr::{AggregateUDF, ScalarUDF, TableSource, WindowUDF};
use datafusion::logical_expr::{AggregateUDF, HigherOrderUDF, ScalarUDF, TableSource, WindowUDF};
use datafusion::variable::VarType;
use datafusion::{
config::ConfigOptions,
@@ -95,6 +95,10 @@ impl ContextProvider for MetadataProvider {
self.func_manager.udaf(name).ok()
}
fn get_higher_order_meta(&self, _name: &str) -> Option<Arc<HigherOrderUDF>> {
None
}
fn get_variable_type(&self, variable_names: &[String]) -> Option<DataType> {
if variable_names.is_empty() {
return None;
@@ -130,6 +134,10 @@ impl ContextProvider for MetadataProvider {
self.func_manager.udfs()
}
fn higher_order_function_names(&self) -> Vec<String> {
Vec::new()
}
fn udaf_names(&self) -> Vec<String> {
self.func_manager.udafs()
}