[jira] [Created] (CALCITE-6319) Add negative test to pow and power functions

2024-03-10 Thread Caican Cai (Jira)
Caican Cai created CALCITE-6319:
---

 Summary: Add negative test to pow and power functions
 Key: CALCITE-6319
 URL: https://issues.apache.org/jira/browse/CALCITE-6319
 Project: Calcite
  Issue Type: Test
Affects Versions: 1.36.0
Reporter: Caican Cai
 Fix For: 1.37.0


Add negative test to pow and power functions



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [Question] Regarding the loading conflict between SqlStdOperatorTable and SqlLibraryOperators

2024-03-10 Thread Cancai Cai
It seems like I can't find a suitable way to solve this problem, can you
give me some suggestions?

Best regards,
Cancai Cai

Benchao Li  于2024年3月5日周二 19:26写道:

> It's not a class loading problem, it's an operator lookup mechanism,
> which is a by design behavior, you can see details here[1]. If there
> are multiple candidates in the result of operator lookup, the first
> one will be returned.
>
> [1]
> https://github.com/apache/calcite/blob/d64ee0037db7abacdfcd4e774072f5e3fb8f2998/core/src/main/java/org/apache/calcite/sql/SqlUtil.java#L494-L517
>
> Cancai Cai  于2024年3月5日周二 16:53写道:
> >
> > Hello, everyone in the calcite community.
> >
> > I'm not sure if I should ask this question.
> >
> > In the process of fixing CALCITE-6259
> > , I found that I
> > defined a log10_MS function in SqlLibraryOperators to simulate the
> behavior
> > of the log function in mysql, but the ReturnTypes.DOUBLE_FORCE_NULLABLE I
> > set was not Effective, its return value still complies with the
> ReturnTypes
> > of the LOG10 function in SqlStdOperatorTable. It seems to be a class
> > loading conflict. I tried to modify sqlkind, but it didn’t take effect.
> Is
> > there any good way?
> >
> > Thank you all.
> >
> > Best wishes.
> > Cancai Cai
>
>
>
> --
>
> Best,
> Benchao Li
>


[jira] [Created] (CALCITE-6318) Add some rules that WeTune discovers and verifies

2024-03-10 Thread Jiajun Xie (Jira)
Jiajun Xie created CALCITE-6318:
---

 Summary: Add some rules that WeTune discovers and verifies
 Key: CALCITE-6318
 URL: https://issues.apache.org/jira/browse/CALCITE-6318
 Project: Calcite
  Issue Type: Improvement
  Components: core
Reporter: Jiajun Xie


[WeTune|https://ipads.se.sjtu.edu.cn/_media/publications/wtune_extend.pdf] is a 
rule generator that can automatically discover new query rewrite rules for SQL 
query optimization.

 

The paper was published in 2022, and some optimization rules have recently been 
implemented in Calcite.

e.g. CALCITE-6214 is rule No.2 in Table.7 of the paper.

 

But there are still many rules that have not been implemented,
which are worth discussing.

Here are all the discovered rewrite 
[rules|https://ipads.se.sjtu.edu.cn:1312/opensource/wetune/-/blob/main/wtune_data/rules/rules.test.txt?ref_type=heads].



--
This message was sent by Atlassian Jira
(v8.20.10#820010)