Skip to content
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

Use case for greatest/least #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,6 @@
"hive.vectorized.execution.mapjoin.native.fast.hashtable.enabled","property used to be FALSE, after upgrade this changes to TRUE","me","\w+\s+hive.vectorized.execution.mapjoin.native.fast.hashtable.enabled(\s{0,1}|\s+)\=(\s{0,1}|\s+)false"
"hive.vectorized.use.row.serde.deserialize","property used to be FALSE, after upgrade this changes to TRUE","me","\w+\s+hive.vectorized.use.row.serde.deserialize(\s{0,1}|\s+)\=(\s{0,1}|\s+)false"
"cast timestamp","By Default, casting a numeric type value into a timestamp produces a result that reflects the UTC instead of the time zone of the cluster.","se","CAST(\s+|\s{0})\(\d+\s+AS\s+TIMESTAMP"
"cast zeros as null","By Default, casting of an invalid date returns a result. Please ensure cast is as desired.","se","CAST(\s+|\s{0})\((\s+|\s{0})('0000-00-00'|'000-00-00 00:00:00')"
"cast zeros as null","By Default, casting of an invalid date returns a result. Please ensure cast is as desired.","se","CAST(\s+|\s{0})\((\s+|\s{0})('0000-00-00'|'000-00-00 00:00:00')"
"greatest","If NULL is found while using greatest in CDP you could return the incorrect result, use NVL to set a default","me","\w+\s+greatest\("
"least","If NULL is found while using least in CDP you could return the incorrect result, use NVL to set a default","me","\w+\s+least\("
2 changes: 2 additions & 0 deletions upgrade-toolkit/Hive Code Scanner/test_hqls/test1.hql
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ SET hive.vectorized.use.row.serde.deserialize = FALSE;
CREATE TABLE mydb.employees (id INT, name STRING, salary FLOAT);
ALTER TABLE mydb.employees ADD COLUMNS (email STRING);
DROP TABLE mydb.employees;

SELECT greatest(col1), least(col2) FROM mydb.employees;