mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-19 14:30:43 +00:00
chore: upgrade DataFusion family, again (#7578)
* chore: upgrade DataFusion family Signed-off-by: luofucong <luofc@foxmail.com> * chore: switch to released version of datafusion-pg-catalog --------- Signed-off-by: luofucong <luofc@foxmail.com> Co-authored-by: Ning Sun <sunning@greptime.com> Co-authored-by: Ning Sun <sunng@protonmail.com>
This commit is contained in:
@@ -178,8 +178,8 @@ pub enum Error {
|
||||
location: Location,
|
||||
},
|
||||
|
||||
#[snafu(display("Failed to extract column from filter"))]
|
||||
ExtractColumnFromFilter {
|
||||
#[snafu(transparent)]
|
||||
DataFusion {
|
||||
#[snafu(source)]
|
||||
error: DataFusionError,
|
||||
#[snafu(implicit)]
|
||||
@@ -225,8 +225,9 @@ impl ErrorExt for Error {
|
||||
| ManifestExists { .. }
|
||||
| BuildStream { .. }
|
||||
| ParquetScanPlan { .. }
|
||||
| UnexpectedEngine { .. }
|
||||
| ExtractColumnFromFilter { .. } => StatusCode::Unexpected,
|
||||
| UnexpectedEngine { .. } => StatusCode::Unexpected,
|
||||
|
||||
DataFusion { .. } => StatusCode::Internal,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,7 @@ use snafu::{GenerateImplicitData, ResultExt, ensure};
|
||||
use store_api::storage::ScanRequest;
|
||||
|
||||
use self::file_stream::ScanPlanConfig;
|
||||
use crate::error::{
|
||||
BuildBackendSnafu, ExtractColumnFromFilterSnafu, ProjectSchemaSnafu,
|
||||
ProjectionOutOfBoundsSnafu, Result,
|
||||
};
|
||||
use crate::error::{BuildBackendSnafu, ProjectSchemaSnafu, ProjectionOutOfBoundsSnafu, Result};
|
||||
use crate::region::FileRegion;
|
||||
|
||||
impl FileRegion {
|
||||
@@ -126,8 +123,7 @@ impl FileRegion {
|
||||
|
||||
let mut aux_column_set = HashSet::new();
|
||||
for scan_filter in scan_filters {
|
||||
df_logical_expr_utils::expr_to_columns(scan_filter, &mut aux_column_set)
|
||||
.context(ExtractColumnFromFilterSnafu)?;
|
||||
df_logical_expr_utils::expr_to_columns(scan_filter, &mut aux_column_set)?;
|
||||
|
||||
let all_file_columns = aux_column_set
|
||||
.iter()
|
||||
|
||||
@@ -56,7 +56,7 @@ fn build_record_batch_stream(
|
||||
|
||||
let config =
|
||||
FileScanConfigBuilder::new(ObjectStoreUrl::local_filesystem(), file_source.clone())
|
||||
.with_projection_indices(scan_plan_config.projection.cloned())
|
||||
.with_projection_indices(scan_plan_config.projection.cloned())?
|
||||
.with_limit(limit)
|
||||
.with_file_group(FileGroup::new(files))
|
||||
.build();
|
||||
@@ -65,7 +65,7 @@ fn build_record_batch_stream(
|
||||
scan_plan_config.store.clone(),
|
||||
));
|
||||
|
||||
let file_opener = file_source.create_file_opener(store, &config, 0);
|
||||
let file_opener = config.file_source().create_file_opener(store, &config, 0)?;
|
||||
let stream = FileStream::new(
|
||||
&config,
|
||||
0, // partition: hard-code
|
||||
@@ -146,7 +146,7 @@ fn new_parquet_stream_with_exec_plan(
|
||||
let file_scan_config =
|
||||
FileScanConfigBuilder::new(ObjectStoreUrl::local_filesystem(), Arc::new(parquet_source))
|
||||
.with_file_group(file_group)
|
||||
.with_projection_indices(projection.cloned())
|
||||
.with_projection_indices(projection.cloned())?
|
||||
.with_limit(*limit)
|
||||
.build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user