diff --git a/src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp b/src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp index de02ced00c4d..2af04ec743f0 100644 --- a/src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp +++ b/src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp @@ -678,12 +678,7 @@ String composeList( if (field->has("direction")) { auto d = field->getValue("direction"); - expr += (Poco::icompare(d, "desc") == 0) ? "DESC" : "ASC"; - } - if (field->has("null-order")) - { - auto n = field->getValue("null-order"); - expr += (Poco::icompare(n, "nulls-last") == 0) ? "NULLS LAST" : "NULLS FIRST"; + expr += (Poco::icompare(d, "desc") == 0) ? " DESC" : " ASC"; } } diff --git a/tests/integration/test_storage_iceberg/test.py b/tests/integration/test_storage_iceberg/test.py index d08ab8d6605e..569ca8faa8a4 100644 --- a/tests/integration/test_storage_iceberg/test.py +++ b/tests/integration/test_storage_iceberg/test.py @@ -3453,7 +3453,7 @@ def test_system_tables_partition_sorting_keys(started_cluster, storage_type): WHERE name = '{table_name}' FORMAT csv """).strip().lower() - assert res == '"bucket(16, id), day(ts)","iddescnulls last, hour(ts)ascnulls first"' + assert res == '"bucket(16, id), day(ts)","id desc, hour(ts) asc"' @pytest.mark.parametrize("storage_type", ["local", "s3"]) def test_compressed_metadata(started_cluster, storage_type):