Re: Towards Avatica 1.24.0 and Avatica-Go 5.3.0

2023-11-12 Thread Istvan Toth
Hi!
I made a pass over the newer open pull requests, and committed
https://issues.apache.org/jira/browse/CALCITE-5536.

https://github.com/apache/calcite-avatica/pull/215 also looks
unctroversial, but it doesn't have a JIRA, and I'm not an Idea user, so I
cannot test it easily.

The rest do not seem to have consensus on them.
The timestamp patches have several unanswered suggestions and no approvals.
https://issues.apache.org/jira/browse/CALCITE-5957 seems to be a no go.
I have suggested a more generic approach for
https://issues.apache.org/jira/browse/CALCITE-5534 (though this on COULD be
committed)
The rest are older than the latest release, so I assume that they were not
included for a reason,

This does not mean that they can not be reviewed and merged, but most of
them are not super low hanging fruit.

Istvan


On Sun, Nov 12, 2023 at 10:35 PM Francis Chuang 
wrote:

> Hey everyone,
>
> Since Calcite 1.36.0 has been released, I think it would be a good time
> to release Avatica 1.24.0 and Avatica-Go 5.3.0.
>
> I will be release manager for both releases, with Avatica being released
> first, followed by Avatica-Go.
>
> For Avatica, can community members please review and merge the open pull
> requests? There are quite a few that look like they are ready and a few
> that can be merged with some work.
>
> I am looking at making rc0 available for voting in around 2 weeks, to
> allow for time to merge any open PRs, but I am happy to extend that if
> needed.
>
> Francis
>


-- 
*István Tóth* | Sr. Staff Software Engineer
*Email*: st...@cloudera.com
cloudera.com 
[image: Cloudera] 
[image: Cloudera on Twitter]  [image:
Cloudera on Facebook]  [image: Cloudera
on LinkedIn] 
--
--


[jira] [Created] (CALCITE-6111) Explicit cast from expression to numeric type doesn't check overflow

2023-11-12 Thread Evgeny Stanilovsky (Jira)
Evgeny Stanilovsky created CALCITE-6111:
---

 Summary: Explicit cast from expression to numeric type doesn't 
check overflow
 Key: CALCITE-6111
 URL: https://issues.apache.org/jira/browse/CALCITE-6111
 Project: Calcite
  Issue Type: Bug
  Components: core
Affects Versions: 1.36.0
Reporter: Evgeny Stanilovsky


After [1] was implemented it is still possible to obtain erroneous result, 
check:
{code:java}
SELECT cast(100+30 as tinyint);{code}
result:
{code:java}
-126{code}
[1] https://issues.apache.org/jira/browse/CALCITE-5990



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


[jira] [Created] (CALCITE-6110) Release Avatica-Go 5.3.0

2023-11-12 Thread Francis Chuang (Jira)
Francis Chuang created CALCITE-6110:
---

 Summary: Release Avatica-Go 5.3.0
 Key: CALCITE-6110
 URL: https://issues.apache.org/jira/browse/CALCITE-6110
 Project: Calcite
  Issue Type: New Feature
  Components: avatica-go
Reporter: Francis Chuang
Assignee: Francis Chuang
 Fix For: avatica-go-5.3.0






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


Re: [DISCUSS] State of the project 2023

2023-11-12 Thread Julian Hyde
I agree that lack of documentation is a problem. However, I can’t see an 
obvious way to fix it.

The fact is, we just don’t receive contributions of documentation. I don’t 
believe we have ever received contributions from someone who is a technical 
writer by profession. Nor has Calcite ever been a paid commercial offering by 
any company. So, what documentation we have we squeeze out of the development 
flow. (Yes, I’m the a$$hole who refused to merge your PR because I didn’t think 
your commit message was good enough.)

Let’s look at the current development flow:
 * People submit PRs with some new classes and methods, and those classes and 
methods must have javadoc;
 * The PRs must have a Jira case that contains an adequate amount of 
specification (good summary and description) and a commit comment that matches 
the summary.
 * The release notes consist of the commit messages plus a link to the Jira 
case. 
 * There are discussions in Jira cases, and on the dev list.
 * For a few types of change (adapters, SQL syntax changes, new SQL functions, 
model syntax) there is a prescribed place to put documentation. That 
documentation is very terse (e.g. one line to describe a SQL function).

Can we squeeze more out of the current development flow? Should we find ways to 
get the current documentation indexed better? Or should we find new places to 
put documentation (e.g. encourage a series of blog posts)? 


On the bright side, I see more people coming forward to review and merge PRs. 
Thank you to those people.

And, thank you to all of on the dev list. You make this a rewarding, 
productive, positive, kind, respectful community.

Julian


> On Nov 6, 2023, at 1:55 PM, Francis Chuang  wrote:
> 
> Thank you, Stamatis, for being chair and leading the project for 2023.
> 
> I also agree that it's been a great year for Calcite as we've seen 3 releases 
> for Calcite so far. We have also added a significant amount of committers.
> 
> There have also been more reviewers for PRs and participants on the mailing 
> lists, which is an improvement to issues identified in previous years.
> 
> I also agree that the documentation for Calcite on the website can be a bit 
> confusing and sparse, however, I think this can be remedied by reworking the 
> information architecture of the website, so that information is presented in 
> a more bite-sized and digestible manner.
> 
> I am also excited about the possibility of automating the release process 
> [1]. I have not had time to look into it further, but hopefully, we can have 
> some discussions about this as a community next year. I believe implementing 
> release automation will significantly reduce the amount of mechanical work to 
> produce a release and can potentially increase our release velocity.
> 
> I look forward to another exciting year with a new chair next year and I am 
> excited to see further developments for the project and the community.
> 
> Francis
> 
> [1] https://lists.apache.org/thread/qkstx4o9qw90fxzqcfnp69w33h7vw2yg
> 
> On 6/11/2023 8:24 pm, Stamatis Zampetakis wrote:
>> Thanks everyone for sharing your thoughts.
>> Indeed documentation is a common pain point especially with those
>> starting off with Calcite. However, over the past few years there are
>> more and more people publishing blogs, talks, and tutorials around
>> Calcite. I find it very helpful and I would definitely like to see
>> more improvements around this area.
>> As far as it concerns testing we can always do better and personally I
>> am a big fan of extending test coverage. There are many good ideas
>> around improvements in our JIRA backlog and I hope to see many of
>> those implemented over the next year.
>> Note that the PMC nomination period has ended. The PMC will proceed
>> with the vote on existing candidates in the following days.
>> Best,
>> Stamatis
>> On Thu, Oct 26, 2023 at 8:42 PM Ran Tao  wrote:
>>> 
>>> Really, totally agree with Mihai & Hongyu about documentation.
>>> 
>>> In fact, I have a similar problem.
>>> The learning curve of calcite is indeed steep,  most of my learning comes
>>> from source code.
>>> 
>>> Fortunately, we still have a relatively rich javadoc in the source code.
>>> If there is no javadoc, I mostly rely on experience to guess a certain
>>> field or a certain logic.
>>> There are relatively few people around me who know about calcite.
>>> 
>>> Of course, now I try to ask questions on the mailing list,
>>> but considering the asynchronous situation of the mailing list and the fact
>>> that new-beginners may not be willing or comfortable to ask questions by
>>> email, it may not always work.
>>> 
>>> If we have some documentation from simple to in-depth,
>>> such as how to build a simple function, a rule, from parser to optimizer,
>>> how to combine some basic components to complete the optimization of a
>>> large SQL or even run it.
>>> Slowly increase the depth so that it will be more friendly to new-beginners.
>>> 
>>> I can’t imagine

Towards Avatica 1.24.0 and Avatica-Go 5.3.0

2023-11-12 Thread Francis Chuang

Hey everyone,

Since Calcite 1.36.0 has been released, I think it would be a good time 
to release Avatica 1.24.0 and Avatica-Go 5.3.0.


I will be release manager for both releases, with Avatica being released 
first, followed by Avatica-Go.


For Avatica, can community members please review and merge the open pull 
requests? There are quite a few that look like they are ready and a few 
that can be merged with some work.


I am looking at making rc0 available for voting in around 2 weeks, to 
allow for time to merge any open PRs, but I am happy to extend that if 
needed.


Francis


[jira] [Created] (CALCITE-6109) Avoid extra loops when optimizing statements with ternary expressions

2023-11-12 Thread asdfgh19 (Jira)
asdfgh19 created CALCITE-6109:
-

 Summary: Avoid extra loops when optimizing statements with ternary 
expressions
 Key: CALCITE-6109
 URL: https://issues.apache.org/jira/browse/CALCITE-6109
 Project: Calcite
  Issue Type: Improvement
  Components: linq4j
Reporter: asdfgh19
Assignee: asdfgh19


{code:java}
public BlockStatement toBlock() {
  if (optimizing && removeUnused) {
// We put an artificial limit of 10 iterations just to prevent an endless
// loop. Optimize should not loop forever, however it is hard to prove if
// it always finishes in reasonable time.
for (int i = 0; i < 10; i++) {
  if (!optimize(createOptimizeShuttle(), true)) {
break;
  }
}
optimize(createFinishingOptimizeShuttle(), false);
  }
  return Expressions.block(statements);
} {code}
When there are statements with ternary expressions in BlockBuilder#statements, 
the optimize method always returns true, causing the loop in the toBlock method 
to always be executed 10 times.

The reason is that when OptimizeShuttle traverses the statement, a new instance 
of TernaryExpression will always be created, regardless of whether the 
optimization is actually performed.

 



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


Re: [ANNOUNCE] Apache Calcite 1.36.0 released

2023-11-12 Thread LakeShen
Thanks to Benchao for being the Release Manager of 1.36.0,and driving this
release.

Stamatis Zampetakis  于2023年11月11日周六 17:29写道:

> Thanks for driving this release Benchao! Well planned and timely executed.
> Awesome work!
>
> On Fri, Nov 10, 2023, 2:49 PM Benchao Li  wrote:
>
> > The Apache Calcite team is pleased to announce the release of Apache
> > Calcite 1.36.0.
> >
> > Calcite is a dynamic data management framework. Its cost-based
> > optimizer converts queries, represented in relational algebra, into
> > executable plans. Calcite supports many front-end languages and
> > back-end data engines, and includes an SQL parser and, as a
> > sub-project, the Avatica JDBC driver.
> >
> > This release comes three months after 1.35.0. It includes more than
> > 125 resolved issues, comprising of a few new features as well as
> > general improvements and bug-fixes. It includes more than 30 new
> > functions, various improvements hardening TABLESAMPLE, and also the
> > integration of SQL Logic Test suite.
> >
> > You can start using it in Maven by simply updating your dependency to:
> >
> > 
> > org.apache.calcite
> > calcite-core
> > 1.36.0
> > 
> >
> > If you'd like to download the source release, you can find it here:
> >
> > https://calcite.apache.org/downloads/
> >
> > You can read more about the release (including release notes) here:
> >
> > https://calcite.apache.org/news/2023/11/10/release-1.36.0/
> >
> > We welcome your help and feedback. For more information on how to
> > report problems, and to get involved, visit the project website at:
> >
> > https://calcite.apache.org/
> >
> > Thanks to everyone involved!
> >
> > Benchao Li, on behalf of the Apache Calcite Team
> >
> > --
> >
> > Best,
> > Benchao Li
> >
>