Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
4220b90
Support reverse sorting key
amosbird Oct 27, 2024
a5c2c8b
Fix parsing
amosbird Oct 28, 2024
e83fd1e
Add doc
amosbird Oct 28, 2024
f204660
Also normalize for min_max projection
amosbird Oct 28, 2024
58fc298
Different implementation
amosbird Oct 28, 2024
fb8300e
Fix test
amosbird Oct 28, 2024
b9a2f68
Reimplemented with more tests
amosbird Oct 29, 2024
c801184
Stabilize test
amosbird Oct 29, 2024
a2ce825
Add another setting to fix test
amosbird Oct 29, 2024
f8437fc
Try to add ASTStorageOrderByElement.
KochetovNicolai Oct 31, 2024
c2bcf15
Update tests tegs.
KochetovNicolai Nov 4, 2024
9c6a75c
Support read-only part of Iceberg REST Catalog API
kssenii Nov 6, 2024
aac75cd
Update 03257_reverse_sorting_key_zookeeper.sql
KochetovNicolai Nov 6, 2024
fb28c16
Unfinished test
kssenii Nov 6, 2024
1c3fcfa
Fix style check
kssenii Nov 6, 2024
ca3dfe5
Automatic style fix
robot-clickhouse Nov 6, 2024
e565f5f
Add a test
kssenii Nov 12, 2024
f8255fb
One more test
kssenii Nov 12, 2024
19854ff
Automatic style fix
robot-clickhouse Nov 12, 2024
f8fbd03
Update requirements.txt
kssenii Nov 12, 2024
1e8ee20
Fix test run with runner
kssenii Nov 13, 2024
6dfd4ad
Better
kssenii Nov 13, 2024
58edfbe
Fix style check
kssenii Nov 13, 2024
6c3003c
Cleanup
kssenii Nov 13, 2024
326c91c
Fix test
kssenii Nov 14, 2024
0e14b49
Support auth header
kssenii Nov 14, 2024
32ff7d2
Fix build and test
kssenii Nov 15, 2024
5f02dc5
Merge branch 'master' into implement-23210
KochetovNicolai Nov 15, 2024
6dbe208
Fix nulls direction check.
KochetovNicolai Nov 15, 2024
4e2549b
Fixes & improvements
kssenii Nov 19, 2024
b34dfca
Speedup tables loading
kssenii Nov 19, 2024
7b4aabb
Support generating token on clickhouse server side
kssenii Nov 19, 2024
9152fc9
Merge remote-tracking branch 'origin/master' into rest-catalog
kssenii Nov 19, 2024
599d977
Update token lazily
kssenii Nov 19, 2024
bc35be4
Merge branch 'master' into implement-23210
KochetovNicolai Nov 20, 2024
fd5023e
Add comments
kssenii Nov 20, 2024
4abbf29
Fix style check
kssenii Nov 20, 2024
8953bab
Update 03257_reverse_sorting_key.sql
KochetovNicolai Nov 20, 2024
6540a7e
Merge remote-tracking branch 'origin/master' into rest-catalog
kssenii Nov 25, 2024
1016add
Add comments, fix test
kssenii Nov 25, 2024
8393e43
Better
kssenii Nov 25, 2024
c22e45d
Support vended credentials
kssenii Nov 25, 2024
bec1e4a
Add a comment
kssenii Nov 25, 2024
8239663
Add experimental flag
kssenii Nov 25, 2024
8e345cf
Fix style check
kssenii Nov 25, 2024
1e80f58
Merge remote-tracking branch 'origin/master' into rest-catalog
kssenii Nov 25, 2024
ea1827c
Fix style check
kssenii Nov 26, 2024
7a584f4
Merge remote-tracking branch 'origin/master' into rest-catalog
kssenii Nov 26, 2024
f8696aa
Merge remote-tracking branch 'origin/master' into rest-catalog
kssenii Dec 3, 2024
eb9d570
Correct merge
kssenii Dec 3, 2024
c434a3f
Support oauth_server_uri
kssenii Dec 4, 2024
cd254a6
Remove useless setting
kssenii Dec 4, 2024
a404227
Merge branch 'master' into implement-23210
KochetovNicolai Dec 9, 2024
702a610
Fixing build.
KochetovNicolai Dec 9, 2024
663d26e
Update SettingsChangesHistory
KochetovNicolai Dec 9, 2024
246f73e
Merge remote-tracking branch 'origin/master' into rest-catalog
kssenii Dec 9, 2024
9256d37
Resolve conflicts
kssenii Dec 9, 2024
bed4eaa
Fix style check
kssenii Dec 9, 2024
5e51114
Fix bad conflict resolution
kssenii Dec 9, 2024
43e6678
Review fixes, fix test
kssenii Dec 9, 2024
83ea485
Remove redundant
kssenii Dec 10, 2024
c2cf17c
Merge remote-tracking branch 'origin/master' into rest-catalog
kssenii Dec 10, 2024
a5c5088
Merge remote-tracking branch 'origin/divanik/fix_bug_iceberg_json_equ…
kssenii Dec 10, 2024
808e039
Merge remote-tracking branch 'origin/master' into rest-catalog
kssenii Dec 10, 2024
4737618
Fix
kssenii Dec 11, 2024
f55d547
Fix fast test build
kssenii Dec 11, 2024
11dc8fa
Fix fast test build
kssenii Dec 11, 2024
352e9d7
Merge pull request #71542 from ClickHouse/rest-catalog
kssenii Dec 12, 2024
204fd5b
Merge pull request #71095 from amosbird/implement-23210
KochetovNicolai Dec 12, 2024
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
5 changes: 3 additions & 2 deletions docker/test/integration/runner/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ geomet==0.2.1.post1
grpcio-tools==1.60.0
grpcio==1.60.0
gssapi==1.8.3
httplib2==0.20.2
httplib2==0.22.0
idna==3.7
importlib-metadata==4.6.4
iniconfig==2.0.0
Expand Down Expand Up @@ -72,7 +72,7 @@ pyarrow==17.0.0
pycparser==2.22
pycryptodome==3.20.0
pymongo==3.11.0
pyparsing==2.4.7
pyparsing==3.1.0
pyspark==3.3.2
pyspnego==0.10.2
pytest-order==1.0.0
Expand Down Expand Up @@ -101,4 +101,5 @@ wadllib==1.3.6
websocket-client==1.8.0
wheel==0.38.1
zipp==1.0.0
pyiceberg==0.7.1
jinja2==3.1.3
27 changes: 26 additions & 1 deletion docs/en/operations/settings/merge-tree-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ Default value: 0 bytes.

Note that if both `min_free_disk_bytes_to_perform_insert` and `min_free_disk_ratio_to_perform_insert` are specified, ClickHouse will count on the value that will allow to perform inserts on a bigger amount of free memory.

## min_free_disk_ratio_to_perform_insert
## min_free_disk_ratio_to_perform_insert

The minimum free to total disk space ratio to perform an `INSERT`. Must be a floating point value between 0 and 1. Note that this setting:
- takes into account the `keep_free_space_bytes` setting.
Expand All @@ -1106,6 +1106,31 @@ Default value: 0.0

Note that if both `min_free_disk_ratio_to_perform_insert` and `min_free_disk_bytes_to_perform_insert` are specified, ClickHouse will count on the value that will allow to perform inserts on a bigger amount of free memory.

## allow_experimental_reverse_key

Enables support for descending sort order in MergeTree sorting keys. This setting is particularly useful for time series analysis and Top-N queries, allowing data to be stored in reverse chronological order to optimize query performance.

With `allow_experimental_reverse_key` enabled, you can define descending sort orders within the `ORDER BY` clause of a MergeTree table. This enables the use of more efficient `ReadInOrder` optimizations instead of `ReadInReverseOrder` for descending queries.

**Example**

```sql
CREATE TABLE example
(
time DateTime,
key Int32,
value String
) ENGINE = MergeTree
ORDER BY (time DESC, key) -- Descending order on 'time' field
SETTINGS allow_experimental_reverse_key = 1;

SELECT * FROM example WHERE key = 'xxx' ORDER BY time DESC LIMIT 10;
```

By using `ORDER BY time DESC` in the query, `ReadInOrder` is applied.

**Default Value:** false

## cache_populated_by_fetch

A Cloud only setting.
Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ if (TARGET ch_contrib::hdfs)
add_headers_and_sources(dbms Disks/ObjectStorages/HDFS)
endif()

add_headers_and_sources(dbms Databases/Iceberg)

add_headers_and_sources(dbms Disks/ObjectStorages/Cached)
add_headers_and_sources(dbms Disks/ObjectStorages/Local)
add_headers_and_sources(dbms Disks/ObjectStorages/Web)
Expand Down
3 changes: 3 additions & 0 deletions src/Common/CurrentMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
M(BuildVectorSimilarityIndexThreads, "Number of threads in the build vector similarity index thread pool.") \
M(BuildVectorSimilarityIndexThreadsActive, "Number of threads in the build vector similarity index thread pool running a task.") \
M(BuildVectorSimilarityIndexThreadsScheduled, "Number of queued or active jobs in the build vector similarity index thread pool.") \
M(IcebergCatalogThreads, "Number of threads in the IcebergCatalog thread pool.") \
M(IcebergCatalogThreadsActive, "Number of threads in the IcebergCatalog thread pool running a task.") \
M(IcebergCatalogThreadsScheduled, "Number of queued or active jobs in the IcebergCatalog thread pool.") \
\
M(DiskPlainRewritableAzureDirectoryMapSize, "Number of local-to-remote path entries in the 'plain_rewritable' in-memory map for AzureObjectStorage.") \
M(DiskPlainRewritableAzureFileCount, "Number of file entries in the 'plain_rewritable' in-memory map for AzureObjectStorage.") \
Expand Down
1 change: 1 addition & 0 deletions src/Common/ErrorCodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@
M(733, TABLE_IS_BEING_RESTARTED) \
M(734, CANNOT_WRITE_AFTER_BUFFER_CANCELED) \
M(735, QUERY_WAS_CANCELLED_BY_CLIENT) \
M(736, ICEBERG_CATALOG_ERROR) \
\
M(900, DISTRIBUTED_CACHE_ERROR) \
M(901, CANNOT_USE_DISTRIBUTED_CACHE) \
Expand Down
2 changes: 2 additions & 0 deletions src/Core/ServerSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ namespace DB
DECLARE(UInt64, load_marks_threadpool_queue_size, 1000000, "Number of tasks which is possible to push into prefetches pool", 0) \
DECLARE(UInt64, threadpool_writer_pool_size, 100, "Size of background pool for write requests to object storages", 0) \
DECLARE(UInt64, threadpool_writer_queue_size, 1000000, "Number of tasks which is possible to push into background pool for write requests to object storages", 0) \
DECLARE(UInt64, iceberg_catalog_threadpool_pool_size, 50, "Size of background pool for iceberg catalog", 0) \
DECLARE(UInt64, iceberg_catalog_threadpool_queue_size, 1000000, "Number of tasks which is possible to push into iceberg catalog pool", 0) \
DECLARE(UInt32, allow_feature_tier, 0, "0 - All feature tiers allowed (experimental, beta, production). 1 - Only beta and production feature tiers allowed. 2 - Only production feature tier allowed", 0) \


Expand Down
3 changes: 3 additions & 0 deletions src/Core/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5560,6 +5560,9 @@ Only available in ClickHouse Cloud. Exclude new data parts from SELECT queries u
)", 0) \
DECLARE(Int64, prefer_warmed_unmerged_parts_seconds, 0, R"(
Only available in ClickHouse Cloud. If a merged part is less than this many seconds old and is not pre-warmed (see cache_populated_by_fetch), but all its source parts are available and pre-warmed, SELECT queries will read from those parts instead. Only for ReplicatedMergeTree. Note that this only checks whether CacheWarmer processed the part; if the part was fetched into cache by something else, it'll still be considered cold until CacheWarmer gets to it; if it was warmed, then evicted from cache, it'll still be considered warm.
)", 0) \
DECLARE(Bool, allow_experimental_database_iceberg, false, R"(
Allow experimental database engine Iceberg
)", 0) \
DECLARE(Bool, allow_deprecated_error_prone_window_functions, false, R"(
Allow usage of deprecated error prone window functions (neighbor, runningAccumulate, runningDifferenceStartingWithFirstValue, runningDifference)
Expand Down
2 changes: 2 additions & 0 deletions src/Core/SettingsChangesHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory
{
{"24.12",
{
{"allow_experimental_database_iceberg", false, false, "New setting."},
{"query_plan_join_swap_table", "false", "auto", "New setting. Right table was always chosen before."},
{"max_size_to_preallocate_for_aggregation", 100'000'000, 1'000'000'000'000, "Enable optimisation for bigger tables."},
{"max_size_to_preallocate_for_joins", 100'000'000, 1'000'000'000'000, "Enable optimisation for bigger tables."},
Expand Down Expand Up @@ -624,6 +625,7 @@ static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory
{"use_primary_key_cache", false, false, "New setting"},
{"prewarm_primary_key_cache", false, false, "New setting"},
{"min_bytes_to_prewarm_caches", 0, 0, "New setting"},
{"allow_experimental_reverse_key", false, false, "New setting"},
}
},
{"24.11",
Expand Down
3 changes: 3 additions & 0 deletions src/Core/SettingsEnums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,7 @@ IMPLEMENT_SETTING_ENUM(
{"StochasticSimple", MergeSelectorAlgorithm::STOCHASTIC_SIMPLE},
{"Trivial", MergeSelectorAlgorithm::TRIVIAL}})

IMPLEMENT_SETTING_ENUM(DatabaseIcebergCatalogType, ErrorCodes::BAD_ARGUMENTS,
{{"rest", DatabaseIcebergCatalogType::REST}})

}
7 changes: 7 additions & 0 deletions src/Core/SettingsEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,4 +359,11 @@ DECLARE_SETTING_ENUM(GroupArrayActionWhenLimitReached)

DECLARE_SETTING_ENUM(MergeSelectorAlgorithm)

enum class DatabaseIcebergCatalogType : uint8_t
{
REST,
};

DECLARE_SETTING_ENUM(DatabaseIcebergCatalogType)

}
Loading