[jira] [Commented] (CALCITE-3746) RexSimplify changes the order of IS NOT NULL in And RexNode

2020-01-19 Thread Vladimir Sitnikov (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17019258#comment-17019258
 ] 

Vladimir Sitnikov commented on CALCITE-3746:


[~pzw2018], [~Chunwei Lei], please provide a test case that fails.

> RexSimplify changes the order of IS NOT NULL in And RexNode
> ---
>
> Key: CALCITE-3746
> URL: https://issues.apache.org/jira/browse/CALCITE-3746
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.20.0
>Reporter: pengzhiwei
>Assignee: pengzhiwei
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The RexSimplify changes the order of IS NOT NULL in And RexNode.The following 
> expression 
> {code:java}
> a is not null and length(a) > 0{code}
> is optimazted to 
> {code:java}
> length(a) > 0 and a is not null{code}
> which will affect the logic short circuit for null-test.



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


[jira] [Commented] (CALCITE-3748) Exception while executing table function

2020-01-19 Thread Danny Chen (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17019257#comment-17019257
 ] 

Danny Chen commented on CALCITE-3748:
-

How did you register the function "multiplication" ?

> Exception while executing table function
> 
>
> Key: CALCITE-3748
> URL: https://issues.apache.org/jira/browse/CALCITE-3748
> Project: Calcite
>  Issue Type: New Feature
>  Components: core
>Affects Versions: 1.21.0
> Environment: we are using windows7 os and we are using command prompt 
> and running this queries through sqlline
>Reporter: 
>Priority: Major
>  Labels: beginner
> Fix For: 1.21.0
>
> Attachments: WhatsApp Image 2020-01-20 at 11.11.47 AM.jpeg
>
>
> I have referred the table function test and i have run the query
> select * from table(s.multiplication(5,6,5)); 
> But i am getting the exception as "no match found for function signature 
> multiplication ((numeric),(numeric),(numeric))".Is there any different 
> calcite connection to run this query.



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


[jira] [Commented] (CALCITE-3746) RexSimplify changes the order of IS NOT NULL in And RexNode

2020-01-19 Thread Chunwei Lei (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17019255#comment-17019255
 ] 

Chunwei Lei commented on CALCITE-3746:
--

Actually I kind of agree with [~pzw2018]. In our own branch, we make some 
changes to retain order for both ISNOTNULL and NOT.

Because in our production enviroment, there are lots of queries like {{a is not 
null and udf(a)}} in which udf cannot accept NULL as a parameter.

> RexSimplify changes the order of IS NOT NULL in And RexNode
> ---
>
> Key: CALCITE-3746
> URL: https://issues.apache.org/jira/browse/CALCITE-3746
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.20.0
>Reporter: pengzhiwei
>Assignee: pengzhiwei
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The RexSimplify changes the order of IS NOT NULL in And RexNode.The following 
> expression 
> {code:java}
> a is not null and length(a) > 0{code}
> is optimazted to 
> {code:java}
> length(a) > 0 and a is not null{code}
> which will affect the logic short circuit for null-test.



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


[jira] [Commented] (CALCITE-3746) RexSimplify changes the order of IS NOT NULL in And RexNode

2020-01-19 Thread pengzhiwei (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17019251#comment-17019251
 ] 

pengzhiwei commented on CALCITE-3746:
-

Hi [~vladimirsitnikov] ,"length" is just an example.I mean any function "f". We 
cannot always think "f" cannot received "NULL" parameters.

> RexSimplify changes the order of IS NOT NULL in And RexNode
> ---
>
> Key: CALCITE-3746
> URL: https://issues.apache.org/jira/browse/CALCITE-3746
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.20.0
>Reporter: pengzhiwei
>Assignee: pengzhiwei
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The RexSimplify changes the order of IS NOT NULL in And RexNode.The following 
> expression 
> {code:java}
> a is not null and length(a) > 0{code}
> is optimazted to 
> {code:java}
> length(a) > 0 and a is not null{code}
> which will affect the logic short circuit for null-test.



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


[jira] [Created] (CALCITE-3748) Exception while executing table function

2020-01-19 Thread swathi (Jira)
swathi created CALCITE-3748:
---

 Summary: Exception while executing table function
 Key: CALCITE-3748
 URL: https://issues.apache.org/jira/browse/CALCITE-3748
 Project: Calcite
  Issue Type: New Feature
  Components: core
Affects Versions: 1.21.0
 Environment: we are using windows7 os and we are using command prompt 
and running this queries through sqlline
Reporter: swathi
 Fix For: 1.21.0
 Attachments: WhatsApp Image 2020-01-20 at 11.11.47 AM.jpeg

I have referred the table function test and i have run the query

select * from table(s.multiplication(5,6,5)); 

But i am getting the exception as "no match found for function signature 
multiplication ((numeric),(numeric),(numeric))".Is there any different calcite 
connection to run this query.



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


[jira] [Commented] (CALCITE-3741) duplicate ‘ordre by‘ key word generate in select

2020-01-19 Thread Danny Chen (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-3741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17019165#comment-17019165
 ] 

Danny Chen commented on CALCITE-3741:
-

Yes, the commit does not solve your problem, just a reference of how to fix 
your problem.

> duplicate ‘ordre by‘ key word generate in select
> 
>
> Key: CALCITE-3741
> URL: https://issues.apache.org/jira/browse/CALCITE-3741
> Project: Calcite
>  Issue Type: Bug
>  Components: mongodb-adapter
>Affects Versions: 1.17.0
>Reporter: james601232
>Priority: Major
> Attachments: image-2020-01-16-14-28-57-662.png, 
> image-2020-01-17-09-40-47-906.png, image-2020-01-17-10-43-28-765.png
>
>
> Hi
>    I encoutner a problem use calcite query mongodb.  my select sql is "select 
> * from products order by score". unfortunatly.  calcite analysis sql concat 
> redundant 'order by score'  in sql.
> debug screenshot as following:
> !image-2020-01-16-14-28-57-662.png!
> could you help me what wrong happen. 
> Tks 
>  



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


[jira] [Commented] (CALCITE-3747) Constructing BETWEEN with RelBuilder throws class cast exception

2020-01-19 Thread Danny Chen (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17019166#comment-17019166
 ] 

Danny Chen commented on CALCITE-3747:
-

I have re-checked all the usage of SqlCallBinding, no problems there.

> Constructing BETWEEN with RelBuilder throws class cast exception
> 
>
> Key: CALCITE-3747
> URL: https://issues.apache.org/jira/browse/CALCITE-3747
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.21.0
>Reporter: Danny Chen
>Assignee: Danny Chen
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.22.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Fix the return type inference of BETWEEN operator.



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


[jira] [Commented] (CALCITE-3747) Constructing BETWEEN with RelBuilder throws class cast exception

2020-01-19 Thread Julian Hyde (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17018993#comment-17018993
 ] 

Julian Hyde commented on CALCITE-3747:
--

Thanks for the rapid fix, [~danny0405]. I wonder whether any other 
commonly-used operators make the same mistake.

> Constructing BETWEEN with RelBuilder throws class cast exception
> 
>
> Key: CALCITE-3747
> URL: https://issues.apache.org/jira/browse/CALCITE-3747
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.21.0
>Reporter: Danny Chen
>Assignee: Danny Chen
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.22.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Fix the return type inference of BETWEEN operator.



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


[jira] [Commented] (CALCITE-3741) duplicate ‘ordre by‘ key word generate in select

2020-01-19 Thread james601232 (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-3741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17018879#comment-17018879
 ] 

james601232 commented on CALCITE-3741:
--

Dear [~danny0405]

       I check this PR 
[https://github.com/apache/calcite/commit/fe0a2fe7dde4a4a342cfc50f2f9da983cc60c479]
 and merge the changes. Unfortunately. the error still exists.

> duplicate ‘ordre by‘ key word generate in select
> 
>
> Key: CALCITE-3741
> URL: https://issues.apache.org/jira/browse/CALCITE-3741
> Project: Calcite
>  Issue Type: Bug
>  Components: mongodb-adapter
>Affects Versions: 1.17.0
>Reporter: james601232
>Priority: Major
> Attachments: image-2020-01-16-14-28-57-662.png, 
> image-2020-01-17-09-40-47-906.png, image-2020-01-17-10-43-28-765.png
>
>
> Hi
>    I encoutner a problem use calcite query mongodb.  my select sql is "select 
> * from products order by score". unfortunatly.  calcite analysis sql concat 
> redundant 'order by score'  in sql.
> debug screenshot as following:
> !image-2020-01-16-14-28-57-662.png!
> could you help me what wrong happen. 
> Tks 
>  



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