[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=590486=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590486
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 28/Apr/21 15:55
Start Date: 28/Apr/21 15:55
Worklog Time Spent: 10m 
  Work Description: jcamachor merged pull request #2163:
URL: https://github.com/apache/hive/pull/2163


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 590486)
Time Spent: 2h  (was: 1h 50m)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=590483=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590483
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 28/Apr/21 15:49
Start Date: 28/Apr/21 15:49
Worklog Time Spent: 10m 
  Work Description: jcamachor commented on a change in pull request #2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r622313451



##
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java
##
@@ -788,6 +789,9 @@ public ASTNode visitCall(RexCall call) {
   }
 }
 break;
+  case IS_DISTINCT_FROM:
+// convert IS DISTINCT FROM to NOT (IS NOT DISTINCT FROM)
+return visitCall((RexCall) 
RexUtil.not(rexBuilder.makeCall(SqlStdOperatorTable.IS_NOT_DISTINCT_FROM, 
call.getOperands(;

Review comment:
   Do you still need to add `is_not_distinct_from` in FunctionRegistry.java 
after this change? The reason why I am asking is that adding it to 
FunctionRegistry will make it user facing, hopefully we can avoid that.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 590483)
Time Spent: 1h 50m  (was: 1h 40m)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=590456=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590456
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 28/Apr/21 14:55
Start Date: 28/Apr/21 14:55
Worklog Time Spent: 10m 
  Work Description: soumyakanti3578 commented on a change in pull request 
#2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r622262163



##
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRexExecutorImpl.java
##
@@ -52,6 +56,10 @@ public void reduce(RexBuilder rexBuilder, List 
constExps, List
   // initialize the converter
   ExprNodeConverter converter = new ExprNodeConverter("", null, null, null,
   new HashSet<>(), rexBuilder.getTypeFactory());
+
+  if (rexNode.getKind() == SqlKind.IS_DISTINCT_FROM) {

Review comment:
   Moved to `ExprNodeConverter`; passed `rexBuilder` through a new 
constructor.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 590456)
Time Spent: 1h 40m  (was: 1.5h)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=590455=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590455
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 28/Apr/21 14:53
Start Date: 28/Apr/21 14:53
Worklog Time Spent: 10m 
  Work Description: soumyakanti3578 commented on a change in pull request 
#2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r622261047



##
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java
##
@@ -788,6 +789,9 @@ public ASTNode visitCall(RexCall call) {
   }
 }
 break;
+  case IS_DISTINCT_FROM:
+// convert IS DISTINCT FROM to NOT (IS NOT DISTINCT FROM)
+return visitCall((RexCall) 
RexUtil.not(rexBuilder.makeCall(SqlStdOperatorTable.IS_NOT_DISTINCT_FROM, 
call.getOperands(;

Review comment:
   Done!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 590455)
Time Spent: 1.5h  (was: 1h 20m)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-26 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=589567=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-589567
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 27/Apr/21 05:45
Start Date: 27/Apr/21 05:45
Worklog Time Spent: 10m 
  Work Description: jcamachor commented on a change in pull request #2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r620876210



##
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRexExecutorImpl.java
##
@@ -52,6 +56,10 @@ public void reduce(RexBuilder rexBuilder, List 
constExps, List
   // initialize the converter
   ExprNodeConverter converter = new ExprNodeConverter("", null, null, null,
   new HashSet<>(), rexBuilder.getTypeFactory());
+
+  if (rexNode.getKind() == SqlKind.IS_DISTINCT_FROM) {

Review comment:
   This should be move to the `ExprNodeConverter` itself. For instance, 
check `visitCall` method.

##
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java
##
@@ -788,6 +789,9 @@ public ASTNode visitCall(RexCall call) {
   }
 }
 break;
+  case IS_DISTINCT_FROM:
+// convert IS DISTINCT FROM to NOT (IS NOT DISTINCT FROM)
+return visitCall((RexCall) 
RexUtil.not(rexBuilder.makeCall(SqlStdOperatorTable.IS_NOT_DISTINCT_FROM, 
call.getOperands(;

Review comment:
   If you rely on `buildAST(SqlOperator op, List children)`, you 
would not have to declare the function in `FunctionRegistry`?
   i) Call `visitCall` on the call operands, ii) then `buildAST` with 
`SqlStdOperatorTable.IS_NOT_DISTINCT_FROM`, iii) then `buildAST` with the 
output of the previous one.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 589567)
Time Spent: 1h 20m  (was: 1h 10m)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=581076=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581076
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 12/Apr/21 15:18
Start Date: 12/Apr/21 15:18
Worklog Time Spent: 10m 
  Work Description: soumyakanti3578 commented on a change in pull request 
#2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r611723223



##
File path: ql/src/test/results/clientpositive/llap/compare_cols_null.q.out
##
@@ -121,6 +126,7 @@ POSTHOOK: query: select * from ccn_table where key <=> 
'123a'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@ccn_table
  A masked pattern was here 
+NULL   t1

Review comment:
   Yes, before this patch, the queries with `<=>` didn't return any 
results! Although the explain plan did return an output.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 581076)
Time Spent: 1h 10m  (was: 1h)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=581075=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581075
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 12/Apr/21 15:11
Start Date: 12/Apr/21 15:11
Worklog Time Spent: 10m 
  Work Description: jcamachor commented on a change in pull request #2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r611717183



##
File path: ql/src/test/results/clientpositive/llap/compare_cols_null.q.out
##
@@ -121,6 +126,7 @@ POSTHOOK: query: select * from ccn_table where key <=> 
'123a'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@ccn_table
  A masked pattern was here 
+NULL   t1

Review comment:
   Yes, I think new output makes sense. However, I am surprised before this 
patch, the result was different?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 581075)
Time Spent: 1h  (was: 50m)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=581069=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581069
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 12/Apr/21 15:06
Start Date: 12/Apr/21 15:06
Worklog Time Spent: 10m 
  Work Description: soumyakanti3578 commented on a change in pull request 
#2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r611713345



##
File path: ql/src/test/results/clientpositive/llap/compare_cols_null.q.out
##
@@ -121,6 +126,7 @@ POSTHOOK: query: select * from ccn_table where key <=> 
'123a'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@ccn_table
  A masked pattern was here 
+NULL   t1

Review comment:
   I think it is because we are inserting `String` values to nullable `INT` 
field:
   `create table ccn_table(key int, value string);`
   `insert into ccn_table values('123a', 't1'), ('123', 't2');`
   
   `('123a', 't1')` is inserted as `NULL, 't1'`
   
   And, in this select statement: `select * from ccn_table where key <=> 
'123a';` `key <=> '123a'` resolves to `key IS NOT DISTINCT FROM null`, which 
returns the output seen above.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 581069)
Time Spent: 50m  (was: 40m)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=581063=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581063
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 12/Apr/21 14:56
Start Date: 12/Apr/21 14:56
Worklog Time Spent: 10m 
  Work Description: jcamachor commented on a change in pull request #2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r611704027



##
File path: ql/src/test/results/clientpositive/llap/compare_cols_null.q.out
##
@@ -121,6 +126,7 @@ POSTHOOK: query: select * from ccn_table where key <=> 
'123a'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@ccn_table
  A masked pattern was here 
+NULL   t1

Review comment:
   Why do we have this change of results with the patch?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 581063)
Time Spent: 40m  (was: 0.5h)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=580456=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-580456
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 10/Apr/21 01:49
Start Date: 10/Apr/21 01:49
Worklog Time Spent: 10m 
  Work Description: soumyakanti3578 commented on a change in pull request 
#2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r610975447



##
File path: 
ql/src/test/results/clientpositive/llap/cbo_fallback_always_semantic_exception.q.out
##
@@ -6,7 +6,7 @@ POSTHOOK: query: explain select count(*) from src where key <=> 
100
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
  A masked pattern was here 
-Plan not optimized by CBO due to missing feature 
[Less_than_equal_greater_than].
+Plan optimized by CBO.

Review comment:
   Plan will go through CBO now. Similar changes below.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 580456)
Time Spent: 0.5h  (was: 20m)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=580455=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-580455
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 10/Apr/21 01:49
Start Date: 10/Apr/21 01:49
Worklog Time Spent: 10m 
  Work Description: soumyakanti3578 commented on a change in pull request 
#2163:
URL: https://github.com/apache/hive/pull/2163#discussion_r610975447



##
File path: 
ql/src/test/results/clientpositive/llap/cbo_fallback_always_semantic_exception.q.out
##
@@ -6,7 +6,7 @@ POSTHOOK: query: explain select count(*) from src where key <=> 
100
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
  A masked pattern was here 
-Plan not optimized by CBO due to missing feature 
[Less_than_equal_greater_than].
+Plan optimized by CBO.

Review comment:
   Plan will go through CBO now.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 580455)
Time Spent: 20m  (was: 10m)

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24998) IS [NOT] DISTINCT FROM failing with SemanticException

2021-04-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24998?focusedWorklogId=580319=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-580319
 ]

ASF GitHub Bot logged work on HIVE-24998:
-

Author: ASF GitHub Bot
Created on: 09/Apr/21 20:51
Start Date: 09/Apr/21 20:51
Worklog Time Spent: 10m 
  Work Description: soumyakanti3578 opened a new pull request #2163:
URL: https://github.com/apache/hive/pull/2163


   
   
   ### What changes were proposed in this pull request?
   `SqlFunctionConverter.java` has been changed to make IS_DISTINCT_FROM 
operator go through the CBO.
   
   
   ### Why are the changes needed?
   Currently, insert statements are failing when IS DISTINCT FROM or IS NOT 
DISTINCT FROM operators are used, which can be fixed by simply optimizing 
through the CBO.
   
   
   ### Does this PR introduce _any_ user-facing change?
   NO
   
   
   ### How was this patch tested?
   Added tests to `is_distinct_from.q`, and validated the output.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 580319)
Remaining Estimate: 0h
Time Spent: 10m

> IS [NOT] DISTINCT FROM failing with SemanticException
> -
>
> Key: HIVE-24998
> URL: https://issues.apache.org/jira/browse/HIVE-24998
> Project: Hive
>  Issue Type: Bug
>  Components: CBO
>Reporter: Soumyakanti Das
>Assignee: Soumyakanti Das
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hive: INSERT statements failing with UDFArgumentException and 
> SemanticException
> Problem Statement:
> {code:java}
> CREATE TABLE t2(c0 boolean , c1 FLOAT );
> INSERT INTO t2(c0) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641));
> -- Insert failing with: Error: Error while compiling statement: FAILED: 
> UDFArgumentException UDF tables only one argument (state=42000,code=4)
> INSERT INTO t2(c0,c1) VALUES (NOT (0.379 IS NOT DISTINCT FROM 641), 0.2);
> -- Insert failing with: SemanticException 0:0 Expected 2 columns for 
> insclause-0/database52@t2; select produces 1 columns. Error encountered near 
> token '0.2' (state=42000,code=4) {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)