Skip to content

Docs: Fix non-existent SortOrderBuilder method in evolution.md example #17082

Description

@thswlsqls

Apache Iceberg version
main @ 49b89a8

Query engine
None (Java API)

Please describe the bug
The replaceSortOrder example in docs/docs/evolution.md (line 96) calls .dec("category", NullOrder.NULL_FIRST). Neither exists in the API: SortOrderBuilder (api/src/main/java/org/apache/iceberg/SortOrderBuilder.java) only defines desc(...), not dec(...), and NullOrder (api/src/main/java/org/apache/iceberg/NullOrder.java line 22-23) only defines the constants NULLS_FIRST/NULLS_LAST, not NULL_FIRST. The example does not compile as written. The line directly above it (.asc("id", NullOrder.NULLS_LAST)) already uses the correct constant naming, so only the second line has the typo.

Steps to reproduce
Copy the example code block from docs/docs/evolution.md line 93-97 into a Java file and compile it: fails with "cannot find symbol" for both dec and NULL_FIRST.

Additional context
N/A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions