GitHub user 10110346 opened a pull request:
https://github.com/apache/spark/pull/17698
[SPARK-20403][SQL][Documentation]Modify the instructions of some functions,
and add instructions of 'cast' function
## What changes were proposed in this pull request?
1. ââhashSetâ and âhashMapâ are mutable,so,using 'val' will be
better;
2. modify annotation:HALF_UP -> HALF_EVEN
3. add instructions of 'cast' function When using 'show functions'
and 'desc function cast'
command in spark-sql
4. Modify the instructions of functionsï¼such as
booleanï¼tinyintï¼smallintï¼intï¼bigintï¼floatï¼doubleï¼decimalï¼dateï¼timestampï¼binaryï¼string
## How was this patch tested?
Before modificationï¼
spark-sql>desc function boolean;
Function: boolean
Class: org.apache.spark.sql.catalyst.expressions.Cast
Usage: boolean(expr AS type) - Casts the value `expr` to the target data
type `type`.
After modificationï¼
spark-sql> desc function boolean;
Function: boolean
Class: org.apache.spark.sql.catalyst.expressions.CastAlias
Usage: boolean(expr) - Casts the value `expr` to the target data type
`boolean`.
spark-sql> desc function cast
Function: cast
Class: org.apache.spark.sql.catalyst.expressions.Cast
Usage: cast(expr AS type) - Casts the value `expr` to the target data type
`type`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/10110346/spark wip_lx_0418
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17698.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17698
----
commit 11ca517e75d0ce800037557b180fdabb81c9e554
Author: liuxian <[email protected]>
Date: 2017-04-18T11:53:45Z
hashSet and hashMap are mutable,so,using val will be better
Signed-off-by: liuxian <[email protected]>
commit c3dcefa02c36de8d6055e7166379391b01337cda
Author: liuxian <[email protected]>
Date: 2017-04-18T12:07:50Z
modify annotation:HALF_UP -> HALF_EVEN
Signed-off-by: liuxian <[email protected]>
commit c56507c3b99744d64d539dd105e5615abaf6a917
Author: liuxian <[email protected]>
Date: 2017-04-20T02:56:30Z
add 'cast' function When using 'show functions' and 'desc function cast'
command in spark-sql
Signed-off-by: liuxian <[email protected]>
commit 62a29bf16c359dac040c2e089c4bcfae417ed2e9
Author: liuxian <[email protected]>
Date: 2017-04-20T03:05:53Z
Modify the usage of functionsï¼such as
booleanï¼tinyintï¼smallintï¼intï¼bigintï¼floatï¼doubleï¼decimalï¼dateï¼timestampï¼binaryï¼string
Signed-off-by: liuxian <[email protected]>
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]