Repository navigation
Conversation
|
Workflow [PR], commit [5e9c9dc] Summary: ❌
AI ReviewSummaryThis PR adds PR Metadata
Findings❌ Blockers
Tests
Final Verdict❌ Request changes until the |
scanhex12
left a comment
There was a problem hiding this comment.
Looks good, but we need to test it with Glue catalog
| {"lock_object_storage_task_distribution_ms", 500, 500, "Raised the value to 500 to avoid hoping tasks between executors."}, | ||
| {"allow_retries_in_cluster_requests", false, false, "New setting"}, | ||
| {"object_storage_remote_initiator", false, false, "New setting."}, | ||
| {"allow_experimental_export_merge_tree_part", false, true, "Turned ON by default for Antalya."}, |
There was a problem hiding this comment.
Oh, thanks!
Fixed.
| assert node.query(f"SHOW CREATE TABLE {CATALOG_NAME}.`{root_namespace}.{table_name}`") == f"CREATE TABLE {CATALOG_NAME}.`{root_namespace}.{table_name}`\\n(\\n `timestamp` Nullable(DateTime64(6)),\\n `timestamptz` Nullable(DateTime64(6, \\'UTC\\'))\\n)\\nENGINE = Iceberg(\\'http://minio:9000/warehouse-rest/data/\\', \\'minio\\', \\'[HIDDEN]\\')\n" | ||
| assert node.query(f"SELECT * FROM {CATALOG_NAME}.`{root_namespace}.{table_name}`") == "2024-01-01 12:00:00.000000\t2024-01-01 12:00:00.000000\n" | ||
|
|
||
| # Berlin - UTC+1 at winter |
There was a problem hiding this comment.
Could you also add a test for glue catalog, because we have separate implementation for timestamp type there?
|
@scanhex12 All tests passed except |
LLVM Coverage Report
Changed lines: 78.08% (203/260) | lost baseline coverage: 12 line(s) · Uncovered code |
|
Dear @scanhex12, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
Persistent IcebergSchemaProcessor instances cached ClickHouse DateTime64 timezones by schema-id only, so the first query or background prefetch could pin UTC for later queries with a different iceberg_timezone_for_timestamptz. https: //github.com/ClickHouse/pull/94025 Co-authored-by: Cursor <[email protected]>
A single schema-id slot could still be overwritten by concurrent queries with different iceberg_timezone_for_timestamptz values. Cache CH types and transform DAGs by (schema_id, timezone) so sessions keep independent DateTime64 timezones. https: //github.com/ClickHouse/pull/94025 Co-authored-by: Cursor <[email protected]>
Materialization only runs when `(schema_id, timezone)` is missing, so clearing artifacts first was unnecessary. Co-authored-by: Cursor <[email protected]>
Partition transforms and timestamptz Avro typing are UTC-based; a non-default presentation timezone must not leak into INSERT, mutations, or OPTIMIZE MANIFEST. Co-authored-by: Cursor <[email protected]>
…nes. iceberg_timezone_for_timestamptz must not shift hour/day prune keys or min-max bounds relative to UTC-written partitions. Co-authored-by: Cursor <[email protected]>
A prior SELECT with an empty presentation timezone could leave a non-explicit DateTime64 sample that flipped adjust-to-utc and partition calendars. Co-authored-by: Cursor <[email protected]>
| , data_lake_settings(configuration_->getDataLakeSettings()) | ||
| , write_format(configuration_->format) | ||
| { | ||
| checkIcebergTimezoneSettingForWrite(context_); |
There was a problem hiding this comment.
checkIcebergTimezoneSettingForWrite only validates the current query setting, but this sink still trusts the sample_block_ it was handed from storage metadata. That leaves a remaining hole for INSERT through a materialized-view target: StorageMaterializedView::write does not call updateExternalDynamicMetadataIfExists on the target, so metadata_snapshot->getSampleBlock() can still reflect whatever presentation timezone a previous SELECT / SHOW CREATE cached.
If the target was last materialized under SETTINGS iceberg_timezone_for_timestamptz='', sample_block_ reaches ChunkPartitioner / generateManifestFile here as non-explicit DateTime64, even though the current insert query is UTC. That reintroduces the wrong-partition / adjust-to-utc=false manifest bug for MV inserts.
Can we rebuild a physical UTC header here (like createIcebergPhysicalSampleBlock now does in compaction) or refresh the target metadata before MV writes?
`master` moved the documentation from the Docusaurus tree under `docs/en/**/*.md` to the Mintlify tree at `docs/**/*.mdx`, deleting every file this branch edits. The edits are replayed at the new paths: - `docs/en/engines/table-engines/integrations/iceberg.md` -> `docs/reference/engines/table-engines/integrations/iceberg.mdx`
…g_timestamptz Resolve the conflict with the move of the settings changes history into the setting declarations (ee6b44f): the history records this PR added to `SettingsChangesHistory.cpp` now live as trailing arguments of the `DECLARE` of each setting. - retargeted PR record [email protected] to 26.10 (settings-history check rule) - semantic merge fixes in non-conflicting files: src/Databases/DataLake/GlueCatalog.cpp, src/Databases/DataLake/S3TablesCatalog.cpp, src/Databases/DataLake/S3TablesCatalog.h, src/Databases/DataLake/UnityV2Catalog.cpp, src/Databases/DataLake/UnityV2Catalog.h, src/Storages/ObjectStorage/DataLakes/DeltaLake/DeltaLakeCatalogRegistration.cpp, src/Storages/ObjectStorage/DataLakes/Iceberg/Utils.cpp, src/Storages/ObjectStorage/DataLakes/Iceberg/tests/gtest_iceberg_schema_processor.cpp Also resolved conflicts in: - `src/Databases/DataLake/RestCatalog.cpp` - `src/Databases/DataLake/tests/gtest_rest_catalog.cpp` - `src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp` - `src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergWrites.cpp` - `src/Storages/ObjectStorage/DataLakes/Iceberg/ManifestFileIterator.cpp` - `src/Storages/ObjectStorage/DataLakes/Iceberg/ManifestFilesPruning.cpp` - `src/Storages/ObjectStorage/DataLakes/Iceberg/SchemaProcessor.cpp` - `src/Storages/ObjectStorage/DataLakes/Iceberg/SchemaProcessor.h` - `src/Core/Settings.cpp` The remaining `ICatalog` callers (`GlueCatalog`, `S3TablesCatalog`, `UnityV2Catalog`, `DeltaLakeCatalogRegistration`) are updated to the `ContextPtr`-taking signatures. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Thanks for the contribution, I'll continue there: #130772 |
The setting sets the time zone of the `DateTime64` type that Iceberg `timestamptz` and `timestamptz_ns` columns are mapped to. The schema processor keeps producing `DateTime64(p, 'UTC')`, and the time zone is applied only to the table schema exposed to queries (`IcebergMetadata` table schema, storage metadata, sorting key, and the schema of Iceberg tables in a data lake catalog database). Partition transforms are UTC based and `adjust-to-utc` depends only on the time zone being explicit, so writes and pruning are not affected. A simplified version of ClickHouse#94025 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Setting
timezone_for_iceberg_timestamptzfor Iceberg timestamptz type.Documentation entry for user-facing changes
Solved #86641
Setting
timezone_for_iceberg_timestamptzfor Iceberg timestamptz type.Possible values:
Any valid timezone, e.g.
Europe/Berlin,UTCorZuluEmpty string to use session time zone.
Default value is
UTC.Documentation is written (mandatory for new features)
Workflow [PR]
Sync PR [sync-upstream/pr/94025]