@@ -91,6 +91,7 @@ StorageObjectStorageCluster::StorageObjectStorageCluster(
9191 std::shared_ptr<DataLake::ICatalog> catalog,
9292 bool if_not_exists,
9393 bool is_datalake_query,
94+ bool is_table_function,
9495 bool lazy_init)
9596 : IStorageCluster(
9697 cluster_name_, table_id_, getLogger(fmt::format(" {}({})" , configuration_->getEngineName (), table_id_.table_name)))
@@ -145,6 +146,10 @@ StorageObjectStorageCluster::StorageObjectStorageCluster(
145146 tryLogCurrentException (log_);
146147 }
147148
149+ // For tables need to update configuration on each read
150+ // because data can be changed after previous update
151+ update_configuration_on_read_write = !is_table_function;
152+
148153 ColumnsDescription columns{columns_in_table_or_function_definition};
149154 std::string sample_path;
150155 if (need_resolve_columns_or_format)
@@ -295,6 +300,7 @@ void StorageObjectStorageCluster::updateQueryForDistributedEngineIfNeeded(ASTPtr
295300 {" IcebergS3" , " icebergS3" },
296301 {" IcebergAzure" , " icebergAzure" },
297302 {" IcebergHDFS" , " icebergHDFS" },
303+ {" IcebergLocal" , " icebergLocal" },
298304 {" DeltaLake" , " deltaLake" },
299305 {" DeltaLakeS3" , " deltaLakeS3" },
300306 {" DeltaLakeAzure" , " deltaLakeAzure" },
@@ -416,6 +422,7 @@ void StorageObjectStorageCluster::updateQueryToSendIfNeeded(
416422 {" icebergS3" , " icebergS3Cluster" },
417423 {" icebergAzure" , " icebergAzureCluster" },
418424 {" icebergHDFS" , " icebergHDFSCluster" },
425+ {" icebergLocal" , " icebergLocalCluster" },
419426 {" deltaLake" , " deltaLakeCluster" },
420427 {" deltaLakeS3" , " deltaLakeS3Cluster" },
421428 {" deltaLakeAzure" , " deltaLakeAzureCluster" },
@@ -741,6 +748,18 @@ IDataLakeMetadata * StorageObjectStorageCluster::getExternalMetadata(ContextPtr
741748 return configuration->getExternalMetadata ();
742749}
743750
751+ void StorageObjectStorageCluster::updateConfigurationIfNeeded (ContextPtr context)
752+ {
753+ if (update_configuration_on_read_write)
754+ {
755+ configuration->update (
756+ object_storage,
757+ context,
758+ /* if_not_updated_before */ false ,
759+ /* check_consistent_with_previous_metadata */ false );
760+ }
761+ }
762+
744763void StorageObjectStorageCluster::checkAlterIsPossible (const AlterCommands & commands, ContextPtr context) const
745764{
746765 if (getClusterName (context).empty ())
0 commit comments