vldpyatkov commented on code in PR #5370:
URL: https://github.com/apache/calcite/pull/5370#discussion_r4530357359


##########
site/_docs/reference.md:
##########
@@ -562,6 +563,56 @@ MATCH_CONDITION left_table.timecol <= right_table.timecol
 ON left_table.col = right_table.col
 ```
 
+### Search ordering in recursive queries
+
+`SEARCH` generates a column that can be used to order the output of a recursive
+query. `SEARCH DEPTH FIRST` orders a node before its descendants and those
+descendants before the next sibling. `SEARCH BREADTH FIRST` orders by depth,
+then by the specified columns within each level. The columns in `BY` are
+compared in their listed order, with null values sorting last.

Review Comment:
   Updated the documentation to clarify ASC/DESC behavior and why NULLS 
FIRST/LAST does not affect nested NULLs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to