kasakrisz commented on code in PR #35: URL: https://github.com/apache/hive-site/pull/35#discussion_r1930224694
########## content/docs/latest/languagemanual-sortby_27362045.md: ########## @@ -190,7 +190,16 @@ SELECT col1, col2 FROM t1 DISTRIBUTE BY col1 SORT BY col1 ASC, col2 DESC ``` - +Note that columns are specified by name, not by position number. However in [Hive-28572](https://issues.apache.org/jira/browse/HIVE-28572) and later, columns can be specified by position when configured as follows: - +* set [hive.orderby.position.alias](https://hive.apache.org/docs/latest/configuration-properties_27842758/#hiveorderbypositionalias)=true; (True is the default) +* set [hive.cbo.enable](https://hive.apache.org/docs/latest/configuration-properties_27842758/#hivecboenable)=true; (True is the default) +When any of the above conditions are not met, no distribution is performed. + +In the following example we distribute by the 3rd and the 1st column (birthdate, age): +``` Review Comment: Added `sql`. ########## content/docs/latest/languagemanual-sortby_27362045.md: ########## @@ -190,7 +190,16 @@ SELECT col1, col2 FROM t1 DISTRIBUTE BY col1 SORT BY col1 ASC, col2 DESC ``` - +Note that columns are specified by name, not by position number. However in [Hive-28572](https://issues.apache.org/jira/browse/HIVE-28572) and later, columns can be specified by position when configured as follows: - +* set [hive.orderby.position.alias](https://hive.apache.org/docs/latest/configuration-properties_27842758/#hiveorderbypositionalias)=true; (True is the default) +* set [hive.cbo.enable](https://hive.apache.org/docs/latest/configuration-properties_27842758/#hivecboenable)=true; (True is the default) Review Comment: Removed -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
