Skip to content

Commit b6b6e61

Browse files
committed
Merge pull request #1026 from Altinity/fix/antalya/systables-iceberg-sort
Follow-up for #959: proper spaces, remove nulls order info
1 parent 8836980 commit b6b6e61

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,7 @@ String composeList(
407407
if (field->has("direction"))
408408
{
409409
auto d = field->getValue<String>("direction");
410-
expr += (Poco::icompare(d, "desc") == 0) ? "DESC" : "ASC";
411-
}
412-
if (field->has("null-order"))
413-
{
414-
auto n = field->getValue<String>("null-order");
415-
expr += (Poco::icompare(n, "nulls-last") == 0) ? "NULLS LAST" : "NULLS FIRST";
410+
expr += (Poco::icompare(d, "desc") == 0) ? " DESC" : " ASC";
416411
}
417412
}
418413

tests/integration/test_storage_iceberg/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3537,4 +3537,4 @@ def test_system_tables_partition_sorting_keys(started_cluster, storage_type):
35373537
WHERE name = '{table_name}' FORMAT csv
35383538
""").strip().lower()
35393539

3540-
assert res == '"bucket(16, id), day(ts)","iddescnulls last, hour(ts)ascnulls first"'
3540+
assert res == '"bucket(16, id), day(ts)","id desc, hour(ts) asc"'

0 commit comments

Comments
 (0)