Docs: Fix non-existent SortOrderBuilder method in evolution.md example
- Dominant language
- Java
- Stars
- 9.2k
- Forks
- 3.5k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 132
Description
**Apache Iceberg version**
main @ 49b89a8c5
**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.
Contributor guide
Research direction
Open docs/docs/evolution.md around line 96 and compare the replaceSortOrder example with api/src/main/java/org/apache/iceberg/SortOrderBuilder.java and NullOrder.java. Verify the corrected example against the API, then confirm the code block no longer contains the reported compilation errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100