Skip to content

Commit dc37819

Browse files
authored
Merge pull request #1026 from Altinity/fix/antalya/systables-iceberg-sort
Follow-up for #959: proper spaces, remove nulls order info
2 parents 1baa927 + 634c6da commit dc37819

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
@@ -678,12 +678,7 @@ String composeList(
678678
if (field->has("direction"))
679679
{
680680
auto d = field->getValue<String>("direction");
681-
expr += (Poco::icompare(d, "desc") == 0) ? "DESC" : "ASC";
682-
}
683-
if (field->has("null-order"))
684-
{
685-
auto n = field->getValue<String>("null-order");
686-
expr += (Poco::icompare(n, "nulls-last") == 0) ? "NULLS LAST" : "NULLS FIRST";
681+
expr += (Poco::icompare(d, "desc") == 0) ? " DESC" : " ASC";
687682
}
688683
}
689684

tests/integration/test_storage_iceberg/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3453,7 +3453,7 @@ def test_system_tables_partition_sorting_keys(started_cluster, storage_type):
34533453
WHERE name = '{table_name}' FORMAT csv
34543454
""").strip().lower()
34553455

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

34583458
@pytest.mark.parametrize("storage_type", ["local", "s3"])
34593459
def test_compressed_metadata(started_cluster, storage_type):

0 commit comments

Comments
 (0)