Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: merge to use logical plans #1720

Merged
merged 9 commits into from
Nov 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
revert mem pool
  • Loading branch information
Blajda committed Nov 19, 2023
commit 4070b76e7e5c57fe9472518083a0f22414cab0a9
9 changes: 3 additions & 6 deletions crates/deltalake-core/src/operations/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! specified matter. See [`MergeBuilder`] for more information
//!
//! *WARNING* The current implementation rewrites the entire delta table so only
//! use on small to medium sized tables.
//! use on small to medium sized tables.
//! Enhancements tracked at #850
//!
//! # Example
Expand Down Expand Up @@ -40,7 +40,6 @@ use async_trait::async_trait;
use datafusion::datasource::provider_as_source;
use datafusion::error::Result as DataFusionResult;
use datafusion::execution::context::{QueryPlanner, SessionConfig};
use datafusion::execution::runtime_env::{RuntimeEnv, RuntimeConfig};
use datafusion::logical_expr::build_join_schema;
use datafusion::physical_planner::{DefaultPhysicalPlanner, ExtensionPlanner, PhysicalPlanner};
use datafusion::{
Expand Down Expand Up @@ -1114,10 +1113,8 @@ impl std::future::IntoFuture for MergeBuilder {

let state = this.state.unwrap_or_else(|| {
//TODO: Datafusion's Hashjoin has some memory issues. Running with all cores results in a OoM. Can be removed when upstream improvemetns are made.
let config = SessionConfig::new();
let runtime = Arc::new(RuntimeEnv::new(RuntimeConfig::default().with_memory_limit(34359738368, 0.80)).unwrap_or_default());
let session = SessionContext::new_with_config_rt(config, runtime);

let config = SessionConfig::new().with_target_partitions(1);
let session = SessionContext::new_with_config(config);

// If a user provides their own their DF state then they must register the store themselves
register_store(this.log_store.clone(), session.runtime_env());
Expand Down