Uh oh!
There was an error while loading. Please reload this page.
[SPARK-20403][SQL]Modify the instructions of some functions - #17698
[SPARK-20403][SQL]Modify the instructions of some functions#1769810110346 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
will this work with our pattern matches in the query optimizer?
3d66dcd to
240a989CompareI have tested all of them(boolean,tinyint,smallint,int,bigint,float,double,decimal,date,timestamp,binary,string), they can work properly. @srowen@rxin@HyukjinKwon |
HyukjinKwon
left a comment
There was a problem hiding this comment.
For me, I don't think this is a proper approach (adding classes to fix a documentation).
HyukjinKwon
commented
May 10, 2017
Would there be other better ways, for example, fixing it in |
@HyukjinKwon I agree with you,i will try ,thanks. |
10110346
commented
May 11, 2017
I have updated it , and test passed |
gatorsmile
commented
May 18, 2017
LGTM except one comment: Please add the test cases to the end of file You can generate the result file by |
@gatorsmile I have added test cases to the file |
kiszk
commented
May 19, 2017
Jenkins, test this please |
gatorsmile
commented
May 22, 2017
ok to test |
SparkQA
commented
May 22, 2017
Test build #77201 has finished for PR 17698 at commit
|
Signed-off-by: liuxian <liu.xian3@zte.com.cn>
command in spark-sql Signed-off-by: liuxian <liu.xian3@zte.com.cn>
6ce4220 to
7edfed5CompareSparkQA
commented
May 23, 2017
Test build #77213 has finished for PR 17698 at commit
|
SparkQA
commented
May 23, 2017
Test build #77214 has finished for PR 17698 at commit
|
SparkQA
commented
May 23, 2017
Test build #77217 has finished for PR 17698 at commit
|
ueshin
commented
May 23, 2017
@10110346 Hi, you can use the command @gatorsmile mentioned above to generate the result file. |
boolean,tinyint,smallint,int,bigint,float,double,decimal,date,timestamp,binary,string Signed-off-by: liuxian <liu.xian3@zte.com.cn>
SparkQA
commented
May 23, 2017
Test build #77241 has finished for PR 17698 at commit
|
10110346
commented
May 23, 2017
Test passed, thanks. @ueshin@gatorsmile |
gatorsmile
commented
May 25, 2017
LGTM |
## What changes were proposed in this pull request? 1. add instructions of 'cast' function When using 'show functions' and 'desc function cast' command in spark-sql 2. 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.Cast 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`. Author: liuxian <liu.xian3@zte.com.cn> Closes#17698 from 10110346/wip_lx_0418. (cherry picked from commit 197f901) Signed-off-by: Xiao Li <gatorsmile@gmail.com>
gatorsmile
commented
May 25, 2017
Thanks! Merging to master/2.2 |
What changes were proposed in this pull request?
command in spark-sql
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
exprto the target data typetype.After modification:
spark-sql> desc function boolean;
Function: boolean
Class: org.apache.spark.sql.catalyst.expressions.Cast
Usage: boolean(expr) - Casts the value
exprto the target data typeboolean.spark-sql> desc function cast
Function: cast
Class: org.apache.spark.sql.catalyst.expressions.Cast
Usage: cast(expr AS type) - Casts the value
exprto the target data typetype.