rubenada commented on code in PR #5370: URL: https://github.com/apache/calcite/pull/5370#discussion_r4528205840
########## 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: "with null values sorting last". IIANM is only true in ascending order: as `testSearchNullKey` shows, DESC reverses it. How about saying "null key values sort after non-null values in ascending order; NULLS FIRST/LAST does not affect them, because the generated column itself is never null." -- 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]
