Skip to content

Fix temporary table scoping on Spark/Databricks - #71

Open
wklimowicz wants to merge 1 commit into
grantmcdermott:mainfrom
wklimowicz:fix/spark-temp-table-scope
Open

wklimowicz wants to merge 1 commit into
grantmcdermott:mainfrom
wklimowicz:fix/spark-temp-table-scope

Conversation

@wklimowicz

Copy link
Copy Markdown

Fixes #70

  • Use DROP TEMPORARY TABLE IF EXISTS for Spark backends in drop_table_if_exists() so session-scoped temporary tables are correctly removed instead of catalog tables.
  • Use CREATE OR REPLACE TEMPORARY TABLE for Spark and DuckDB backends in create_temp_table_as() to prevent TableAlreadyExistsException in iterative AP loops.

- Use 'DROP TEMPORARY TABLE IF EXISTS' for Spark backends in drop_table_if_exists()
  so session-scoped temporary tables are correctly removed instead of catalog tables.
- Use 'CREATE OR REPLACE TEMPORARY TABLE' for Spark and DuckDB backends in
  create_temp_table_as() to prevent TableAlreadyExistsException in iterative AP loops.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-FE alternating projections fail on Databricks/Spark with TableAlreadyExistsException due to temp table drop syntax

1 participant