-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-20403][SQL]Modify the instructions of some functions #17698
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this work with our pattern matches in the query optimizer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No,it will not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert these unrelated changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert these unrelated changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has reverted
3d66dcd to
240a989
Compare
|
I 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me, I don't think this is a proper approach (adding classes to fix a documentation).
|
Would there be other better ways, for example, fixing it in |
|
@HyukjinKwon I agree with you,i will try ,thanks. |
|
I have updated it , and test passed |
|
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 |
|
Jenkins, test this please |
|
ok to test |
|
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
7edfed5
Compare
|
Test build #77213 has finished for PR 17698 at commit
|
|
Test build #77214 has finished for PR 17698 at commit
|
|
Test build #77217 has finished for PR 17698 at commit
|
|
@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>
|
Test build #77241 has finished for PR 17698 at commit
|
|
Test passed, thanks. @ueshin @gatorsmile |
|
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>
|
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.