Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions src/Client/BuzzHouse/Generator/FuzzConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,8 @@ FuzzConfig::FuzzConfig(DB::ClientBase * c, const String & path)
{"hudi", allow_hudi},
{"deltalakes3", allow_deltalakeS3},
{"deltalakeazure", allow_deltalakeAzure},
{"deltalakelocal", allow_deltalakelocal},
{"icebergs3", allow_icebergS3},
{"icebergazure", allow_icebergAzure},
{"iceberglocal", allow_icebergLocal},
{"merge", allow_merge},
{"distributed", allow_distributed},
{"dictionary", allow_dictionary},
Expand Down
10 changes: 3 additions & 7 deletions src/Client/BuzzHouse/Generator/SQLCatalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,23 +236,19 @@ struct SQLBase

bool isDeltaLakeAzureEngine() const { return teng == TableEngineValues::DeltaLakeAzure; }

bool isDeltaLakeLocalEngine() const { return teng == TableEngineValues::DeltaLakeLocal; }

bool isAnyDeltaLakeEngine() const { return teng >= TableEngineValues::DeltaLakeS3 && teng <= TableEngineValues::DeltaLakeLocal; }
bool isAnyDeltaLakeEngine() const { return teng >= TableEngineValues::DeltaLakeS3 && teng <= TableEngineValues::DeltaLakeAzure; }

bool isIcebergS3Engine() const { return teng == TableEngineValues::IcebergS3; }

bool isIcebergAzureEngine() const { return teng == TableEngineValues::IcebergAzure; }

bool isIcebergLocalEngine() const { return teng == TableEngineValues::IcebergLocal; }

bool isAnyIcebergEngine() const { return teng >= TableEngineValues::IcebergS3 && teng <= TableEngineValues::IcebergLocal; }
bool isAnyIcebergEngine() const { return teng >= TableEngineValues::IcebergS3 && teng <= TableEngineValues::IcebergAzure; }

bool isOnS3() const { return isIcebergS3Engine() || isDeltaLakeS3Engine() || isAnyS3Engine(); }

bool isOnAzure() const { return isIcebergAzureEngine() || isDeltaLakeAzureEngine() || isAnyAzureEngine(); }

bool isOnLocal() const { return isIcebergLocalEngine() || isDeltaLakeLocalEngine(); }
bool isOnLocal() const { return false; }

bool isMergeEngine() const { return teng == TableEngineValues::Merge; }

Expand Down
11 changes: 0 additions & 11 deletions src/Client/BuzzHouse/Generator/SQLQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,17 +311,6 @@ void StatementGenerator::setTableFunction(
}
afunc->set_credential(sc.named_collection);
}
else if (t.isOnLocal())
{
lfunc = tfunc->mutable_local();
const LocalFunc_FName val = (allow_chaos && rg.nextLargeNumber() < 11)
? static_cast<LocalFunc_FName>(rg.randomInt<uint32_t>(1, 2))
: (t.isIcebergLocalEngine() ? LocalFunc_FName::LocalFunc_FName_icebergLocal
: LocalFunc_FName::LocalFunc_FName_deltaLakeLocal);

lfunc->set_fname(val);
lfunc->set_credential("local");
}
else if (t.isFileEngine())
{
FileFunc * ffunc = tfunc->mutable_file();
Expand Down
8 changes: 0 additions & 8 deletions src/Client/BuzzHouse/Generator/SQLTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1893,14 +1893,6 @@ void StatementGenerator::getNextTableEngine(RandomGenerator & rg, bool use_exter
{
this->ids.emplace_back(EmbeddedRocksDB);
}
if ((fc.engine_mask & allow_icebergLocal) != 0)
{
this->ids.emplace_back(IcebergLocal);
}
if ((fc.engine_mask & allow_deltalakelocal) != 0)
{
this->ids.emplace_back(DeltaLakeLocal);
}
if (fc.allow_memory_tables && (fc.engine_mask & allow_memory) != 0)
{
this->ids.emplace_back(Memory);
Expand Down
4 changes: 0 additions & 4 deletions src/Client/BuzzHouse/Generator/TableSetttings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,8 @@ void loadFuzzerTableSettings(const FuzzConfig & fc)
{Hudi, {}},
{DeltaLakeS3, dataLakeSettings},
{DeltaLakeAzure, dataLakeSettings},
{DeltaLakeLocal, dataLakeSettings},
{IcebergS3, dataLakeSettings},
{IcebergAzure, dataLakeSettings},
{IcebergLocal, dataLakeSettings},
{Merge, {}},
{Distributed, distributedTableSettings},
{Dictionary, {}},
Expand Down Expand Up @@ -558,10 +556,8 @@ void loadFuzzerTableSettings(const FuzzConfig & fc)
{Hudi, {}},
{DeltaLakeS3, {}},
{DeltaLakeAzure, {}},
{DeltaLakeLocal, {}},
{IcebergS3, {}},
{IcebergAzure, {}},
{IcebergLocal, {}},
{Merge, {}},
{Distributed, {}},
{Dictionary, {}},
Expand Down
12 changes: 0 additions & 12 deletions src/Storages/ObjectStorage/StorageObjectStorageDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ struct IcebergAzureDefinition
static constexpr auto storage_engine_name = "IcebergAzure";
};

struct IcebergLocalDefinition
{
static constexpr auto name = "icebergLocal";
static constexpr auto storage_engine_name = "IcebergLocal";
};

struct IcebergHDFSDefinition
{
static constexpr auto name = "icebergHDFS";
Expand All @@ -91,12 +85,6 @@ struct DeltaLakeAzureDefinition
static constexpr auto storage_engine_name = "DeltaLakeAzure";
};

struct DeltaLakeLocalDefinition
{
static constexpr auto name = "deltaLakeLocal";
static constexpr auto storage_engine_name = "DeltaLakeLocal";
};

struct HudiDefinition
{
static constexpr auto name = "hudi";
Expand Down
29 changes: 0 additions & 29 deletions src/Storages/ObjectStorage/registerStorageObjectStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,21 +265,6 @@ void registerStorageIceberg(StorageFactory & factory)
.has_builtin_setting_fn = DataLakeStorageSettings::hasBuiltin,
});
# endif
factory.registerStorage(
IcebergLocalDefinition::storage_engine_name,
[&](const StorageFactory::Arguments & args)
{
const auto storage_settings = getDataLakeStorageSettings(*args.storage_def);
auto configuration = std::make_shared<StorageLocalIcebergConfiguration>(storage_settings);
return createStorageObjectStorage(args, configuration);
},
{
.supports_settings = true,
.supports_sort_order = true,
.supports_schema_inference = true,
.source_access_type = AccessTypeObjects::Source::FILE,
.has_builtin_setting_fn = DataLakeStorageSettings::hasBuiltin,
});
}

#endif
Expand Down Expand Up @@ -334,20 +319,6 @@ void registerStorageDeltaLake(StorageFactory & factory)
.has_builtin_setting_fn = DataLakeStorageSettings::hasBuiltin,
});
# endif
factory.registerStorage(
DeltaLakeLocalDefinition::storage_engine_name,
[&](const StorageFactory::Arguments & args)
{
const auto storage_settings = getDataLakeStorageSettings(*args.storage_def);
auto configuration = std::make_shared<StorageLocalDeltaLakeConfiguration>(storage_settings);
return createStorageObjectStorage(args, configuration);
},
{
.supports_settings = true,
.supports_schema_inference = true,
.source_access_type = AccessTypeObjects::Source::FILE,
.has_builtin_setting_fn = StorageObjectStorageSettings::hasBuiltin,
});
}
#endif

Expand Down
13 changes: 0 additions & 13 deletions src/TableFunctions/TableFunctionObjectStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,6 @@ void registerTableFunctionIceberg(TableFunctionFactory & factory)
.category = FunctionDocumentation::Category::TableFunction},
.allow_readonly = false});
#endif
factory.registerFunction<TableFunctionIcebergLocal>(
{.documentation
= {.description = R"(The table function can be used to read the Iceberg table stored locally.)",
.examples{{IcebergLocalDefinition::name, "SELECT * FROM icebergLocal(filename)", ""}},
.category = FunctionDocumentation::Category::TableFunction},
.allow_readonly = false});
}
#endif

Expand Down Expand Up @@ -426,13 +420,6 @@ void registerTableFunctionDeltaLake(TableFunctionFactory & factory)
.category = FunctionDocumentation::Category::TableFunction},
.allow_readonly = false});
#endif
// Register the new local Delta Lake table function
factory.registerFunction<TableFunctionDeltaLakeLocal>(
{.documentation
= {.description = R"(The table function can be used to read the DeltaLake table stored locally.)",
.examples{{DeltaLakeLocalDefinition::name, "SELECT * FROM deltaLakeLocal(path)", ""}},
.category = FunctionDocumentation::Category::TableFunction},
.allow_readonly = false});
}
#endif

Expand Down
3 changes: 0 additions & 3 deletions src/TableFunctions/TableFunctionObjectStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ using TableFunctionIcebergAzure = TableFunctionObjectStorage<IcebergAzureDefinit
# if USE_HDFS
using TableFunctionIcebergHDFS = TableFunctionObjectStorage<IcebergHDFSDefinition, StorageHDFSIcebergConfiguration, true>;
# endif
using TableFunctionIcebergLocal = TableFunctionObjectStorage<IcebergLocalDefinition, StorageLocalIcebergConfiguration, true>;
#endif
#if USE_PARQUET && USE_DELTA_KERNEL_RS
#if USE_AWS_S3
Expand All @@ -143,8 +142,6 @@ using TableFunctionDeltaLakeS3 = TableFunctionObjectStorage<DeltaLakeS3Definitio
#if USE_AZURE_BLOB_STORAGE
using TableFunctionDeltaLakeAzure = TableFunctionObjectStorage<DeltaLakeAzureDefinition, StorageAzureDeltaLakeConfiguration, true>;
#endif
// New alias for local Delta Lake table function
using TableFunctionDeltaLakeLocal = TableFunctionObjectStorage<DeltaLakeLocalDefinition, StorageLocalDeltaLakeConfiguration, true>;
#endif
#if USE_AWS_S3
using TableFunctionHudi = TableFunctionObjectStorage<HudiDefinition, StorageS3HudiConfiguration, true>;
Expand Down
24 changes: 0 additions & 24 deletions tests/integration/helpers/iceberg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,6 @@ def get_creation_expression(
engine_part = "Azure"
elif (storage_type == "hdfs"):
engine_part = "HDFS"
elif (storage_type == "local"):
engine_part = "Local"

if_not_exists_prefix = ""
if if_not_exists:
Expand Down Expand Up @@ -289,28 +287,6 @@ def get_creation_expression(
"""
)

elif storage_type == "local":
if run_on_cluster:
assert table_function
return f"""
iceberg{engine_part}Cluster('cluster_simple', {storage_arg}, path = '/iceberg_data/default/{table_name}/', format={format})
"""
else:
if table_function:
return f"""
iceberg{engine_part}({storage_arg}, path = '/iceberg_data/default/{table_name}/', format={format})
"""
else:
return (
f"""
DROP TABLE IF EXISTS {table_name};
CREATE TABLE {if_not_exists_prefix} {table_name} {schema}
ENGINE=Iceberg{engine_part}({storage_arg}, path = '/iceberg_data/default/{table_name}/', format={format})
{partition_by}
{settings_expression}
"""
)

else:
raise Exception(f"Unknown iceberg storage type: {storage_type}")

Expand Down
Loading
Loading