Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pull latest apache spark #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
pull latest apache spark #10
Changes from 1 commit
be72b153ed1ae143d71d901a8e46d56c26241bb1dd3c0c2d03429619d58a350d6b30ed1662e936942aeeb8aaef443cbfadce0d3bb846bc6195713ebdc5d34d9e33954183d4cb2dd37d8d3abb36763b83e05af2def3676d67d16776574ef6cde7af291f24cee1813c4a628bdea51620e21a598d7522e1f83b66b1c07142cf0456b4024e6c1873e64f7c7270a432fa0b88fcbda96327ea56077e3e840ba05d7b1fcffba9cc83d0e174e47f48cd4895c98f0df6b734ed7ab30a11a4133c1b32d6d9d235d2836949a9cd8f4540313c6cacd5d0f34482ff2ecf437a964b50719b02409696580fc45c2c501370d7ce1108cba69ae96028e3f5e10a35cd8ea9648a8620bdbefe12f0d2412ab7f7aba9492900f14facb7fed07fd68a9f30d92ca594454e7a29e7f3c6ff02a438629744068c954d2fd60d4f9e451bc6a23254445f1794ee7dfe16c4c0364936c1f2e22ae36b48eeacdf45ffa0092baad2125ce7293ceea2b87b9ab791e00f1a1c26976f57bc1e9f62b20f6e37524dbb82410dfc1ec8a4f2288598d0331c74fe8a5eb506b45d7ee4d8f9af767905520d92a6273a71828fab04bab8f5dc74c0ee2ac2f1dd781677d0a3ef9575582515910e720c94fb9b54b1c5f9b891a98574371e4e2f6c5d8fdd88fa3a1d98c64fbf748ca00cc70fa5b7cb6ef1f521c44508c7e19a17edfec8be7e6bdcbb2298d8641f66cb72dc76153c4e6fc694b88393ddd7f5e054ddb2a28728a886617422b111e4decedf3c6198c79a4dabc7307ac0bad10d73d9067f4073026adf67d6308c657c726621e978b1894a7563b049abc66d64b94f7e0410f45b3a11db947c923511bc17a6581200a83194322f96242d5aefa8ee13f3e718bbc9c6ff59a280ff523d4dd142b6ff0ce17901dce6a71ebb9c06955d5fa7352bea51da5822a8d9ec81d1a09b1270e71f10cbf1b75bd17f7ad0db9cac249b21b806a8a5cd2f32a842fedf6965ac968559606868f130ad27fc53610e37f6d2b29323e6a714f180b65c11f24a3920af750ada2a04975a6c792aff4a8c9e22274d849d48bd04943ea5576c43f20adf9a365a29b2c5b9b1038b185ce20478d8e825e64fbd1cf21f6ceceaec931fdfe699c5935d74daf62d2b8b6312e740b09cbf3d9b98aef02bb06892449577bf4da83b117d6f20be4d01bd00dd74dee1d29d1e8323806e161ba7e0fa4dbea2516f4ecbe4169ed73944728640530fe68c6610a9File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
… with arguments and examples for trim function ## What changes were proposed in this pull request? This PR proposes to enhance the documentation for `trim` functions in the function description session. - Add more `usage`, `arguments` and `examples` for the trim function - Adjust space in the `usage` session After the changes, the trim function documentation will look like this: - `trim` ```trim(str) - Removes the leading and trailing space characters from str. trim(BOTH trimStr FROM str) - Remove the leading and trailing trimStr characters from str trim(LEADING trimStr FROM str) - Remove the leading trimStr characters from str trim(TRAILING trimStr FROM str) - Remove the trailing trimStr characters from str Arguments: str - a string expression trimStr - the trim string characters to trim, the default value is a single space BOTH, FROM - these are keywords to specify trimming string characters from both ends of the string LEADING, FROM - these are keywords to specify trimming string characters from the left end of the string TRAILING, FROM - these are keywords to specify trimming string characters from the right end of the string Examples: > SELECT trim(' SparkSQL '); SparkSQL > SELECT trim('SL', 'SSparkSQLS'); parkSQ > SELECT trim(BOTH 'SL' FROM 'SSparkSQLS'); parkSQ > SELECT trim(LEADING 'SL' FROM 'SSparkSQLS'); parkSQLS > SELECT trim(TRAILING 'SL' FROM 'SSparkSQLS'); SSparkSQ ``` - `ltrim` ```ltrim ltrim(str) - Removes the leading space characters from str. ltrim(trimStr, str) - Removes the leading string contains the characters from the trim string Arguments: str - a string expression trimStr - the trim string characters to trim, the default value is a single space Examples: > SELECT ltrim(' SparkSQL '); SparkSQL > SELECT ltrim('Sp', 'SSparkSQLS'); arkSQLS ``` - `rtrim` ```rtrim rtrim(str) - Removes the trailing space characters from str. rtrim(trimStr, str) - Removes the trailing string which contains the characters from the trim string from the str Arguments: str - a string expression trimStr - the trim string characters to trim, the default value is a single space Examples: > SELECT rtrim(' SparkSQL '); SparkSQL > SELECT rtrim('LQSa', 'SSparkSQLS'); SSpark ``` This is the trim characters function jira: [trim function](https://issues.apache.org/jira/browse/SPARK-14878) ## How was this patch tested? Manually tested ``` spark-sql> describe function extended trim; 17/09/22 17:03:04 INFO CodeGenerator: Code generated in 153.026533 ms Function: trim Class: org.apache.spark.sql.catalyst.expressions.StringTrim Usage: trim(str) - Removes the leading and trailing space characters from `str`. trim(BOTH trimStr FROM str) - Remove the leading and trailing `trimStr` characters from `str` trim(LEADING trimStr FROM str) - Remove the leading `trimStr` characters from `str` trim(TRAILING trimStr FROM str) - Remove the trailing `trimStr` characters from `str` Extended Usage: Arguments: * str - a string expression * trimStr - the trim string characters to trim, the default value is a single space * BOTH, FROM - these are keywords to specify trimming string characters from both ends of the string * LEADING, FROM - these are keywords to specify trimming string characters from the left end of the string * TRAILING, FROM - these are keywords to specify trimming string characters from the right end of the string Examples: > SELECT trim(' SparkSQL '); SparkSQL > SELECT trim('SL', 'SSparkSQLS'); parkSQ > SELECT trim(BOTH 'SL' FROM 'SSparkSQLS'); parkSQ > SELECT trim(LEADING 'SL' FROM 'SSparkSQLS'); parkSQLS > SELECT trim(TRAILING 'SL' FROM 'SSparkSQLS'); SSparkSQ ``` ``` spark-sql> describe function extended ltrim; Function: ltrim Class: org.apache.spark.sql.catalyst.expressions.StringTrimLeft Usage: ltrim(str) - Removes the leading space characters from `str`. ltrim(trimStr, str) - Removes the leading string contains the characters from the trim string Extended Usage: Arguments: * str - a string expression * trimStr - the trim string characters to trim, the default value is a single space Examples: > SELECT ltrim(' SparkSQL '); SparkSQL > SELECT ltrim('Sp', 'SSparkSQLS'); arkSQLS ``` ``` spark-sql> describe function extended rtrim; Function: rtrim Class: org.apache.spark.sql.catalyst.expressions.StringTrimRight Usage: rtrim(str) - Removes the trailing space characters from `str`. rtrim(trimStr, str) - Removes the trailing string which contains the characters from the trim string from the `str` Extended Usage: Arguments: * str - a string expression * trimStr - the trim string characters to trim, the default value is a single space Examples: > SELECT rtrim(' SparkSQL '); SparkSQL > SELECT rtrim('LQSa', 'SSparkSQLS'); SSpark ``` Author: Kevin Yu <[email protected]> Closes apache#19329 from kevinyu98/spark-14878-5.Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing