delta-io / delta

An open-source storage framework that enables building a Lakehouse architecture with compute engines including Spark, PrestoDB, Flink, Trino, and Hive and APIs
https://delta.io
Apache License 2.0
7.62k stars 1.71k forks source link

Fixes the behavior of throwing table not found error during CREATE OR REPLACE Delta uniform table #3845

Open lzlfred opened 2 weeks ago

lzlfred commented 2 weeks ago

Which Delta project/connector is this regarding?

Description

If its the first time we are creating the delta uniform table and the table does not exist yet, we want to synchronously trigger the uniform conversion after the CreateDeltaTableCommand have created the table in the catalog; The existing code only checked for isReplace, but it missed to check if the table existed in the catalog or not. Adding this check fixes the behavior of throwing table not found error during CREATE OR REPLACE Delta uniform table for the very first time.

How was this patch tested?

manual test.