[jira] [Commented] (HIVE-13555) Add nullif udf

2018-10-08 Thread Ian Cook (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16642487#comment-16642487
 ] 

Ian Cook commented on HIVE-13555:
-

Thanks Zoltan!

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
>Priority: Major
> Fix For: 2.3.0
>
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch, 
> HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-13555) Add nullif udf

2018-10-08 Thread Zoltan Haindrich (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16642478#comment-16642478
 ] 

Zoltan Haindrich commented on HIVE-13555:
-

I think it was close to the release - nullif is present on 2.3 ; but not on 2.2

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
>Priority: Major
> Fix For: 2.3.0
>
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch, 
> HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-13555) Add nullif udf

2018-10-08 Thread Ian Cook (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16642384#comment-16642384
 ] 

Ian Cook commented on HIVE-13555:
-

[~leftylev]: the wiki says this was added in 2.2.0, but [~owen.omalley]: it 
looks like you set the fix version here to 2.3.0. Owen: can you confirm that 
the {{nullif}} UDF was added in 2.3.0, not 2.2.0? Thanks.

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
>Priority: Major
> Fix For: 2.3.0
>
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch, 
> HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-09-10 Thread Lefty Leverenz (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15481121#comment-15481121
 ] 

Lefty Leverenz commented on HIVE-13555:
---

Thanks Zoltan!  I removed the TODOC2.2 label.

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
> Fix For: 2.2.0
>
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch, 
> HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-09-10 Thread Zoltan Haindrich (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15479587#comment-15479587
 ] 

Zoltan Haindrich commented on HIVE-13555:
-

I've added it; with a link included ;)

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
>  Labels: TODOC2.2
> Fix For: 2.2.0
>
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch, 
> HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-09-07 Thread Lefty Leverenz (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15472230#comment-15472230
 ] 

Lefty Leverenz commented on HIVE-13555:
---

Now would be better, because it's likely to be forgotten later.  Just make sure 
you include version information that links to this JIRA issue -- copy the way 
it's done for other UDFs.

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
>  Labels: TODOC2.2
> Fix For: 2.2.0
>
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch, 
> HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-09-07 Thread Zoltan Haindrich (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15471691#comment-15471691
 ] 

Zoltan Haindrich commented on HIVE-13555:
-

[~leftylev] should I add this..or it will be added later - when 2.2.0 is 
launched?

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
>  Labels: TODOC2.2
> Fix For: 2.2.0
>
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch, 
> HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-09-07 Thread Lefty Leverenz (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15469691#comment-15469691
 ] 

Lefty Leverenz commented on HIVE-13555:
---

Doc note:  The nullif UDF should be documented in the wiki for release 2.2.0.

* [Hive Operators and UDFs -- Conditional Functions | 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-ConditionalFunctions]

Added a TODOC2.2 label.

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
>  Labels: TODOC2.2
> Fix For: 2.2.0
>
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch, 
> HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-09-03 Thread Hive QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15461891#comment-15461891
 ] 

Hive QA commented on HIVE-13555:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12826986/HIVE-13555.2.patch

{color:green}SUCCESS:{color} +1 due to 2 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 7 failed/errored test(s), 10451 tests 
executed
*Failed tests:*
{noformat}
TestBeeLineWithArgs - did not produce a TEST-*.xml file
TestHiveCli - did not produce a TEST-*.xml file
org.apache.hadoop.hive.cli.TestCliDriver.org.apache.hadoop.hive.cli.TestCliDriver
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vector_join_part_col_char]
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[acid_bucket_pruning]
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainuser_3]
org.apache.hive.jdbc.TestJdbcWithMiniHS2.testAddJarConstructorUnCaching
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/1102/testReport
Console output: 
https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/1102/console
Test logs: 
http://ec2-204-236-174-241.us-west-1.compute.amazonaws.com/logs/PreCommit-HIVE-MASTER-Build-1102/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 7 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12826986 - PreCommit-HIVE-MASTER-Build

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch, 
> HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-09-02 Thread Ashutosh Chauhan (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15458858#comment-15458858
 ] 

Ashutosh Chauhan commented on HIVE-13555:
-

Keeping it strict makes sense. +1

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
> Attachments: HIVE-13555.1.patch, HIVE-13555.2.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-09-01 Thread Ashutosh Chauhan (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15456171#comment-15456171
 ] 

Ashutosh Chauhan commented on HIVE-13555:
-

I think it makes sense to stick to standard on this. Since we are implementing 
this specifically to meet standards requirement. Otherwise workaround using 
case statement already exists. Postgres implementation is a good standard to 
follow.

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
> Attachments: HIVE-13555.1.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-09-01 Thread Hive QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15455023#comment-15455023
 ] 

Hive QA commented on HIVE-13555:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12826532/HIVE-13555.1.patch

{color:green}SUCCESS:{color} +1 due to 2 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 6 failed/errored test(s), 10443 tests 
executed
*Failed tests:*
{noformat}
TestBeeLineWithArgs - did not produce a TEST-*.xml file
TestHiveCli - did not produce a TEST-*.xml file
org.apache.hadoop.hive.cli.TestCliDriver.org.apache.hadoop.hive.cli.TestCliDriver
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vector_join_part_col_char]
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainuser_3]
org.apache.hive.jdbc.TestJdbcWithMiniHS2.testAddJarConstructorUnCaching
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/1067/testReport
Console output: 
https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/1067/console
Test logs: 
http://ec2-204-236-174-241.us-west-1.compute.amazonaws.com/logs/PreCommit-HIVE-MASTER-Build-1067/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 6 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12826532 - PreCommit-HIVE-MASTER-Build

> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
> Attachments: HIVE-13555.1.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-13555) Add nullif udf

2016-08-31 Thread Zoltan Haindrich (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15453842#comment-15453842
 ] 

Zoltan Haindrich commented on HIVE-13555:
-

i've checked for reference postgresql's nullif...it converts types like:
{code}
 nullif(integer,integer) => integer
 nullif(text,integer) => integer
 nullif(integer,text) => integer
 nullif(text,text) => text
{code}
it demotes the the text argument into integer - in case the otherone is an 
integer...and produces a syntax exception for nullif(1,'x') 

the proposed method will keep the 'first' argument type, but will convert the 
second if needed...in case someone puts in a string...this is good or bad?
i think this is somewhat expected...and will align with 'case when' current 
implementation.
should I remove the conversion - be strict about types as much as possible - 
and stick to the standard?


> Add nullif udf
> --
>
> Key: HIVE-13555
> URL: https://issues.apache.org/jira/browse/HIVE-13555
> Project: Hive
>  Issue Type: Sub-task
>  Components: UDF
>Reporter: Ashutosh Chauhan
>Assignee: Zoltan Haindrich
> Attachments: HIVE-13555.1.patch
>
>
> {{nullif(exp1, exp2)}} is shorthand for: {{case when exp1 = exp2 then null 
> else exp1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)