Re: [ANNOUNCE] Master branch renamed to main

2022-04-26 Thread Francis Chuang
Quick update. I just did a dry-run release for Avatica and it built fine 
without needing to set the branch in vlsi-release-plugin's configuration.


The plugin only pushes tags to git and I don't think it ever commits any 
files, so I don't think it needs to know about us renaming our default 
branch to main. I also ran `git branch -a` in my local copy of Avatica 
and I don't see any branch or references to "master" after running a 
dry-run release.


On 27/04/2022 9:03 am, Michael Mior wrote:

One outstanding issue is that I was unable to set the branch to main for
stage-vote-release-plugin. I believe it may default to "master", so I'm not
sure if we'll run into issues on the next release.
--
Michael Mior
mm...@apache.org


Le mar. 26 avr. 2022 à 16:30, Julian Hyde  a écrit :


Thanks, Michael. It all looks good from my end.

I had opened a pull request yesterday (when the branch was named
'master') and it merged smoothly today (after the rename).

Julian

On Tue, Apr 26, 2022 at 7:54 AM Michael Mior  wrote:


The master branch has now been renamed to main. If you have an existing
checkout, please follow the steps below (thanks to Francis!) to ensure

your

local master branch is also correctly renamed. Note that if you do not

have

any local changes, you can also simply clone a new copy of the repository
and the default branch will now be main.

1. Ensure you are in the repository's folder in your command line.
2. Stash any uncommitted changes:
   - git stash
3. Check out your local master branch:
   - git checkout master
4. Rename your local master branch to main:
   - git branch -m master main
5. Fetch latest commits and branches from remote:
   - git fetch
6. Remove the tracking branch:
   - git branch --unset-upstream
7. Create a new tracking branch (assuming the remote is called

origin):

   - git branch -u origin/main
8. Restore your uncommitted changes:
   - git stash pop

--
Michael Mior
mm...@apache.org






[jira] [Created] (CALCITE-5117) Optimize the EXISTS sub-query by Metadata RowCount

2022-04-26 Thread xiong duan (Jira)
xiong duan created CALCITE-5117:
---

 Summary: Optimize the EXISTS sub-query by Metadata RowCount
 Key: CALCITE-5117
 URL: https://issues.apache.org/jira/browse/CALCITE-5117
 Project: Calcite
  Issue Type: Bug
  Components: core
Affects Versions: 1.30.0
Reporter: xiong duan


As same as the UNIQUE sub-query, before we convert the sub-query to RelNode. we 
use the Metadata to optimize it.

EXISTS sub-query, If the sub-query is guaranteed to produce at least one row, 
just return TRUE. If the sub-query is guaranteed to produce no row, just return 
FALSE.

For example:
{code:java}
select *
from dept as d
where EXISTS (select count(*) from emp e where d.deptno = e.deptno){code}
We can optimize it to:
{code:java}
EnumerableTableScan(table=[[scott, DEPT]]){code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[DISCUSS] Towards Calcite-Avatica 1.21.0

2022-04-26 Thread Francis Chuang

Hey everyone,

The last release for Avatica (1.20.0) was in December last year, so it's 
about time to release Avatica 1.21.0.


This release should be a pretty straight-forward and routine release as 
we only have a handful of commits to Avatica since the last release.


Here's a list of issues that must be resolved before I can build the 
release for voting:

- CALCITE-5116: Unable to build Avatica release with Gradle 7.4.2 [1]
- CALCITE-5095: Support Java 18 and Guava 31.1-jre

There are also a few PRs could potentially make it into this release:
- https://github.com/apache/calcite-avatica/pull/163
- https://github.com/apache/calcite-avatica/pull/170
- https://github.com/apache/calcite-avatica/pull/148

Please have a look and merge / review any PRs that are ready for this 
release.


If possible, I'd like to make rc0 available for voting towards the end 
of next week, but I am happy to delay the vote if more time is needed to 
review or merge any open PRs.


Francis

[1] https://issues.apache.org/jira/browse/CALCITE-5116
[2] https://issues.apache.org/jira/browse/CALCITE-5095


[jira] [Created] (CALCITE-5116) Unable to build Avatica release with Gradle 7.4.2

2022-04-26 Thread Francis Chuang (Jira)
Francis Chuang created CALCITE-5116:
---

 Summary: Unable to build Avatica release with Gradle 7.4.2
 Key: CALCITE-5116
 URL: https://issues.apache.org/jira/browse/CALCITE-5116
 Project: Calcite
  Issue Type: Bug
  Components: avatica
Reporter: Francis Chuang
 Fix For: avatica-1.21.0


The release no longer builds after upgrading to Gradle 7.4.2.

The build fails with this message:

{{> Configure project :
Building Apache Calcite Avatica 1.21.0

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':stageSvnDist'.
> Could not resolve all dependencies for configuration ':releaseSignatures'.
   > Querying the mapped value of flatmap(provider(task 'distTar', class 
org.gradle.api.tasks.bundling.Tar)) before task ':release:distTar' has 
completed is not supported}}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


Re: [ANNOUNCE] Master branch renamed to main

2022-04-26 Thread Francis Chuang
Not sure how the stage-vote-release-plugin works internally, but I think 
the branch is not set in calcite and calcite-avatica originally, so 
perhaps it's smart enough to use the name of the current branch instead 
of defaulting to master.



On 27/04/2022 9:03 am, Michael Mior wrote:

One outstanding issue is that I was unable to set the branch to main for
stage-vote-release-plugin. I believe it may default to "master", so I'm not
sure if we'll run into issues on the next release.
--
Michael Mior
mm...@apache.org


Le mar. 26 avr. 2022 à 16:30, Julian Hyde  a écrit :


Thanks, Michael. It all looks good from my end.

I had opened a pull request yesterday (when the branch was named
'master') and it merged smoothly today (after the rename).

Julian

On Tue, Apr 26, 2022 at 7:54 AM Michael Mior  wrote:


The master branch has now been renamed to main. If you have an existing
checkout, please follow the steps below (thanks to Francis!) to ensure

your

local master branch is also correctly renamed. Note that if you do not

have

any local changes, you can also simply clone a new copy of the repository
and the default branch will now be main.

1. Ensure you are in the repository's folder in your command line.
2. Stash any uncommitted changes:
   - git stash
3. Check out your local master branch:
   - git checkout master
4. Rename your local master branch to main:
   - git branch -m master main
5. Fetch latest commits and branches from remote:
   - git fetch
6. Remove the tracking branch:
   - git branch --unset-upstream
7. Create a new tracking branch (assuming the remote is called

origin):

   - git branch -u origin/main
8. Restore your uncommitted changes:
   - git stash pop

--
Michael Mior
mm...@apache.org






Jenkins build is back to normal : Calcite » Calcite-snapshots #134

2022-04-26 Thread Apache Jenkins Server
See 




Build failed in Jenkins: Calcite » Calcite-snapshots #133

2022-04-26 Thread Apache Jenkins Server
See 


Changes:

[Francis Chuang] Revert "Remove branch setting in release configuration"


--
Started by GitHub push by F21
Started by GitHub push by F21
Started by an SCM change
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on builds23 (ubuntu) in workspace 

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
The recommended git tool is: NONE
No credentials specified
Cloning the remote Git repository
Using shallow clone with depth 100
Avoid fetching tags
Honoring refspec on initial clone
Cloning repository https://github.com/apache/calcite.git
 > git init 
 >  # 
 > timeout=10
Fetching upstream changes from https://github.com/apache/calcite.git
 > git --version # timeout=10
 > git --version # 'git version 2.17.1'
 > git fetch --no-tags --progress --depth=100 -- 
 > https://github.com/apache/calcite.git +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url https://github.com/apache/calcite.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
Avoid second fetch
 > git rev-parse refs/remotes/origin/main^{commit} # timeout=10
Checking out Revision d61f079b40d1c57989e0cb9746f7f2dc21dabdf6 
(refs/remotes/origin/main)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f d61f079b40d1c57989e0cb9746f7f2dc21dabdf6 # timeout=10
Commit message: "Revert "Remove branch setting in release configuration""
 > git rev-list --no-walk 5813035c8d8ef7b73dcdd2ef87230a58894dbd3c # timeout=10
[Gradle] - Launching build.
[Calcite-snapshots] $ 
 
"-Dorg.gradle.jvmargs=-Xmx1024m -XX:MaxMetaspaceSize=512m" -Pasf=true -PCI=true 
--no-build-cache --profile --no-daemon build publish
To honour the JVM settings for this build a single-use Daemon process will be 
forked. See 
https://docs.gradle.org/7.3/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build 
> Task :buildSrc:compileKotlin NO-SOURCE
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy NO-SOURCE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:inspectClassesForKotlinIC
> Task :buildSrc:jar
> Task :buildSrc:assemble
> Task :buildSrc:autostyleKotlinCheck NO-SOURCE
> Task :buildSrc:fmpp:pluginDescriptors
> Task :buildSrc:javacc:pluginDescriptors
> Task :buildSrc:buildext:pluginDescriptors
> Task :buildSrc:buildext:processResources
> Task :buildSrc:javacc:processResources
> Task :buildSrc:fmpp:processResources
> Task :buildSrc:autostyleKotlinGradleCheck
> Task :buildSrc:autostyleCheck
> Task :buildSrc:compileTestKotlin NO-SOURCE
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:javacc:autostyleKotlinCheck
> Task :buildSrc:buildext:autostyleKotlinCheck
> Task :buildSrc:fmpp:autostyleKotlinCheck
> Task :buildSrc:javacc:autostyleKotlinGradleCheck
> Task :buildSrc:javacc:autostyleCheck
> Task :buildSrc:buildext:autostyleKotlinGradleCheck
> Task :buildSrc:buildext:autostyleCheck
> Task :buildSrc:javacc:processTestResources NO-SOURCE
> Task :buildSrc:buildext:processTestResources NO-SOURCE
> Task :buildSrc:fmpp:autostyleKotlinGradleCheck
> Task :buildSrc:fmpp:autostyleCheck
> Task :buildSrc:fmpp:processTestResources NO-SOURCE
> Task :buildSrc:fmpp:compileKotlin
> Task :buildSrc:fmpp:compileJava NO-SOURCE
> Task :buildSrc:fmpp:classes

> Task :buildSrc:javacc:compileKotlin
w: 
:
 (66, 13): 'setter for main: String?' is deprecated. Deprecated in Java

> Task :buildSrc:javacc:compileJava NO-SOURCE
> Task :buildSrc:javacc:classes
> Task :buildSrc:buildext:compileKotlin
> Task :buildSrc:fmpp:inspectClassesForKotlinIC
> Task :buildSrc:buildext:compileJava NO-SOURCE
> Task :buildSrc:buildext:classes
> Task :buildSrc:javacc:inspectClassesForKotlinIC
> Task :buildSrc:buildext:inspectClassesForKotlinIC
> Task :buildSrc:javacc:jar
> Task :buildSrc:fmpp:jar
> Task :buildSrc:javacc:assemble
> Task :buildSrc:fmpp:assemble
> Task :buildSrc:javacc:compileTestKotlin NO-SOURCE
> Task :buildSrc:buildext:jar
> Task :buildSrc:fmpp:compileTestKotlin NO-SOURCE
> Task :buildSrc:buildext:assemble
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:check
> Task :buildSrc:build
> Task :buildSrc:buildext:compileTestKotlin NO-SOURCE
> Task 

Re: [ANNOUNCE] Master branch renamed to main

2022-04-26 Thread Michael Mior
One outstanding issue is that I was unable to set the branch to main for
stage-vote-release-plugin. I believe it may default to "master", so I'm not
sure if we'll run into issues on the next release.
--
Michael Mior
mm...@apache.org


Le mar. 26 avr. 2022 à 16:30, Julian Hyde  a écrit :

> Thanks, Michael. It all looks good from my end.
>
> I had opened a pull request yesterday (when the branch was named
> 'master') and it merged smoothly today (after the rename).
>
> Julian
>
> On Tue, Apr 26, 2022 at 7:54 AM Michael Mior  wrote:
> >
> > The master branch has now been renamed to main. If you have an existing
> > checkout, please follow the steps below (thanks to Francis!) to ensure
> your
> > local master branch is also correctly renamed. Note that if you do not
> have
> > any local changes, you can also simply clone a new copy of the repository
> > and the default branch will now be main.
> >
> >1. Ensure you are in the repository's folder in your command line.
> >2. Stash any uncommitted changes:
> >   - git stash
> >3. Check out your local master branch:
> >   - git checkout master
> >4. Rename your local master branch to main:
> >   - git branch -m master main
> >5. Fetch latest commits and branches from remote:
> >   - git fetch
> >6. Remove the tracking branch:
> >   - git branch --unset-upstream
> >7. Create a new tracking branch (assuming the remote is called
> origin):
> >   - git branch -u origin/main
> >8. Restore your uncommitted changes:
> >   - git stash pop
> >
> > --
> > Michael Mior
> > mm...@apache.org
>


Re: [ANNOUNCE] Master branch renamed to main

2022-04-26 Thread Julian Hyde
Thanks, Michael. It all looks good from my end.

I had opened a pull request yesterday (when the branch was named
'master') and it merged smoothly today (after the rename).

Julian

On Tue, Apr 26, 2022 at 7:54 AM Michael Mior  wrote:
>
> The master branch has now been renamed to main. If you have an existing
> checkout, please follow the steps below (thanks to Francis!) to ensure your
> local master branch is also correctly renamed. Note that if you do not have
> any local changes, you can also simply clone a new copy of the repository
> and the default branch will now be main.
>
>1. Ensure you are in the repository's folder in your command line.
>2. Stash any uncommitted changes:
>   - git stash
>3. Check out your local master branch:
>   - git checkout master
>4. Rename your local master branch to main:
>   - git branch -m master main
>5. Fetch latest commits and branches from remote:
>   - git fetch
>6. Remove the tracking branch:
>   - git branch --unset-upstream
>7. Create a new tracking branch (assuming the remote is called origin):
>   - git branch -u origin/main
>8. Restore your uncommitted changes:
>   - git stash pop
>
> --
> Michael Mior
> mm...@apache.org


[ANNOUNCE] Master branch renamed to main

2022-04-26 Thread Michael Mior
The master branch has now been renamed to main. If you have an existing
checkout, please follow the steps below (thanks to Francis!) to ensure your
local master branch is also correctly renamed. Note that if you do not have
any local changes, you can also simply clone a new copy of the repository
and the default branch will now be main.

   1. Ensure you are in the repository's folder in your command line.
   2. Stash any uncommitted changes:
  - git stash
   3. Check out your local master branch:
  - git checkout master
   4. Rename your local master branch to main:
  - git branch -m master main
   5. Fetch latest commits and branches from remote:
  - git fetch
   6. Remove the tracking branch:
  - git branch --unset-upstream
   7. Create a new tracking branch (assuming the remote is called origin):
  - git branch -u origin/main
   8. Restore your uncommitted changes:
  - git stash pop

--
Michael Mior
mm...@apache.org


[jira] [Created] (CALCITE-5115) upgrade jackson due to CVE-2020-36518

2022-04-26 Thread Florian Brams (Jira)
Florian Brams created CALCITE-5115:
--

 Summary: upgrade jackson due to CVE-2020-36518
 Key: CALCITE-5115
 URL: https://issues.apache.org/jira/browse/CALCITE-5115
 Project: Calcite
  Issue Type: Bug
  Components: core
Affects Versions: 1.30.0
Reporter: Florian Brams
 Fix For: 1.31.0


https://nvd.nist.gov/vuln/detail/CVE-2020-36518



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Created] (CALCITE-5114) SqlParseException for Spark's "corr" function

2022-04-26 Thread Laurens Versluis (Jira)
Laurens Versluis created CALCITE-5114:
-

 Summary: SqlParseException for Spark's "corr" function
 Key: CALCITE-5114
 URL: https://issues.apache.org/jira/browse/CALCITE-5114
 Project: Calcite
  Issue Type: Bug
 Environment: Running Calcite 1.30.0 with Java 11.
Reporter: Laurens Versluis


When parsing a string that contains Spark's "corr" function, Calcite will throw 
a SqlParseException.

 

Minimal reproducible example:
{code:java}
import org.apache.calcite.sql.dialect.SparkSqlDialect;
import org.apache.calcite.sql.parser.SqlParseException;
import org.apache.calcite.sql.parser.SqlParser;

class Scratch {
public static void main(String[] args) throws SqlParseException {
// Example SQL provided by spark, see 
https://spark.apache.org/docs/latest/api/sql/#corr
String sqlQuery = "SELECT corr(c1, c2) FROM VALUES (3, 2), (3, 3), (6, 
4) as tab(c1, c2);";
SqlParser.create(sqlQuery, 
SparkSqlDialect.DEFAULT.configureParser(SqlParser.config())).parseQuery();
}
} {code}
Output:
{noformat}
Exception in thread "main" org.apache.calcite.sql.parser.SqlParseException: 
Encountered "corr" at line 1, column 8.{noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Created] (CALCITE-5113) function week(date 'xxx') return an error number

2022-04-26 Thread itxiangkui (Jira)
itxiangkui created CALCITE-5113:
---

 Summary: function week(date 'xxx') return an error number
 Key: CALCITE-5113
 URL: https://issues.apache.org/jira/browse/CALCITE-5113
 Project: Calcite
  Issue Type: Bug
Reporter: itxiangkui


0: jdbc:calcite:model=src/test/resources/mode> select week(date '2022-01-01');
++
| EXPR$0 |
++
| 52     |
++

 

mysql> select week(date '2022-01-01');
+-+
| week(date '2022-01-01') |
+-+
|                       0 |
+-+
1 row in set (0.01 sec)

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)