[jira] [Created] (CALCITE-3524) Add support for RexSubQuery creation from RelBuilder

2019-11-20 Thread Amir Gajst (Jira)
Amir Gajst created CALCITE-3524:
---

 Summary: Add support for RexSubQuery creation from RelBuilder
 Key: CALCITE-3524
 URL: https://issues.apache.org/jira/browse/CALCITE-3524
 Project: Calcite
  Issue Type: Improvement
Reporter: Amir Gajst
Assignee: Amir Gajst


When building relational expressions, the simplest way is by using the 
RelBuilder which does not currently support creation of a RexSubQuery.
We can add RexSubQuery creation functions to the RelBuilder to make it more 
"visible" and convenient to use. 



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


Re: CALCITE-2905: Maven -> Gradle: any thoughts

2019-11-20 Thread Francis Chuang
I thought I'd post about an issue I experienced with Gradle while 
testing the build/release process in docker.


I use Docker for Windows, which spins up a Hyper-V VM with docker and I 
interact with it using the docker CLI in WSL (Windows Subsystem for 
Linux). The setup is really neat, because I can use Windows as my main 
OS and almost have Linux running inside with almost native performance 
without having to use a VM.


A couple of days ago, Docker released 2.1.6.0 for their Docker for 
Windows Edge release and the build started hanging.


Basically, I execute the following to build and upload the release for 
voting (in the test environment):


gradle prepareVote -PasfTestSvnUsername=test -PasfTestSvnPassword=test 
-PasfTestNexusUsername=test -PasfTestNexusPassword=test 
-PasfTestGitSourceUsername=test -PasfTestGitSourcePassword=test 
-PasfCommitterId=test -PallowUncommittedChanges -Prc=0 -PuseGpgCmd 
-Psigning.gnupg.keyName=KEY_ID_GOES_HERE


The build will run, but it will hang forever after the configuration. 
Logs here:


2019-11-20T05:01:25.697+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Execute 'allprojects {}' action' completed
2019-11-20T05:01:25.699+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Execute container callback action' started
2019-11-20T05:01:25.701+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] 
Completing Build operation 'Execute container callback action'
2019-11-20T05:01:25.701+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Execute container callback action' completed
2019-11-20T05:01:25.701+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] 
Completing Build operation 'Apply plugin com.github.vlsi.ide to root 
project 'calcite-avatica''
2019-11-20T05:01:25.701+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Apply plugin com.github.vlsi.ide to root project 
'calcite-avatica'' completed
2019-11-20T05:01:25.702+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Apply plugin com.github.vlsi.crlf to root project 
'calcite-avatica'' started
2019-11-20T05:01:25.702+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] 
Completing Build operation 'Apply plugin com.github.vlsi.crlf to root 
project 'calcite-avatica''
2019-11-20T05:01:25.702+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Apply plugin com.github.vlsi.crlf to root project 
'calcite-avatica'' completed
2019-11-20T05:01:25.703+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Apply plugin com.github.vlsi.gradle-extensions to root 
project 'calcite-avatica'' started
2019-11-20T05:01:25.704+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] 
Completing Build operation 'Apply plugin 
com.github.vlsi.gradle-extensions to root project 'calcite-avatica''
2019-11-20T05:01:25.704+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Apply plugin com.github.vlsi.gradle-extensions to root 
project 'calcite-avatica'' completed
2019-11-20T05:01:25.706+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Apply plugin com.github.vlsi.stage-vote-release to root 
project 'calcite-avatica'' started
2019-11-20T05:01:25.728+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Execute container callback action' started
2019-11-20T05:01:25.728+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] 
Completing Build operation 'Execute container callback action'
2019-11-20T05:01:25.728+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Execute container callback action' completed
2019-11-20T05:01:25.728+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Execute container callback action' started
2019-11-20T05:01:25.729+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] 
Completing Build operation 'Execute container callback action'
2019-11-20T05:01:25.729+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Execute container callback action' completed
2019-11-20T05:01:25.729+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Execute container callback action' started
2019-11-20T05:01:25.729+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] 
Completing Build operation 'Execute container callback action'
2019-11-20T05:01:25.729+ [DEBUG] 
[org.gradle.internal.operations.DefaultBuildOperationExecutor] Build 
operation 'Execute container callback act

Re: CALCITE-2905: Maven -> Gradle: any thoughts

2019-11-20 Thread Danny Chan
When I use the IDEA 2019.9 version, it works ~

But the travis test is failing for the slow test: here is my log 
https://travis-ci.org/apache/calcite/jobs/614406384?utm_medium=notification&utm_source=github_status

Best,
Danny Chan
在 2019年11月20日 +0800 PM2:28,Vladimir Sitnikov ,写道:
> > Here is the stacktrace:
> java.lang.NoClassDefFoundError: org/gradle/api/internal/plugin
> s/DefaultConvention
> at org.jetbrains.plugins.gradle.tooling.builder.ProjectExtensio
> nsDataBuilderImpl.buildAll(ProjectExtensionsDataBuilderImpl.groovy:50)
>
> What is IDEA version?
>
> Vladimir


Re: CALCITE-2905: Maven -> Gradle: any thoughts

2019-11-20 Thread Amir Gajst
Hi

Trying to build the project with gradle on windows fails with the following
message:

> Task :core:spotlessJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:spotlessJava'.
> The following files had format violations:

core\build\generated\sources\version\org\apache\calcite\jdbc\CalciteDriverVersion.java
  @@ -1,41 +1,41 @@G [6s]sed in this build, making it incompatible
with Gradle 7.0.
  -/*\r\nde all' to show the individual deprecation warnings.
  - * Licensed to the Apache Software Foundation (ASF) under one or
more\r\nline_warnings
  - * contributor license agreements.  See the NOTICE file
distributed with\r\n
  - * this work for additional information regarding copyright
ownership.\r\n
  - * The ASF licenses this file to you under the Apache License,
Version 2.0\r\n
  - * (the "License"); you may not use this file except in
compliance with\r\n
  - * the License.  You may obtain a copy of the License at\r\n
  - *\r\n
  - * http://www.apache.org/licenses/LICENSE-2.0\r\n
  - *\r\nessTestResources
  - * Unless required by applicable law or agreed to in writing,
software\r\n
  - * distributed under the License is distributed on an "AS IS"
BASIS,\r\n
  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.\r\n
  - * See the License for the specific language governing
permissions and\r\n
  - * limitations under the License.\r\n
  - */\r\n
  -package org.apache.calcite.jdbc;\r\n
  -\r\n
  -import org.apache.calcite.avatica.DriverVersion;\r\n
  -\r\n
  -/**\r\n
  - * Provides information on the current Calcite version.\r\n
  - */\r\n
  -class CalciteDriverVersion {\r\n
  -  static final DriverVersion INSTANCE =\r\n
  -  new DriverVersion(\r\n
  -  "Calcite JDBC Driver",\r\n
  -  "1.22.0-SNAPSHOT" /* :version */,\r\n
  -  "Calcite",\r\n
  -  "1.22.0-SNAPSHOT" /* :version */,\r\n
  -  true,\r\n
  -  1 /* :major */,\r\n
  -  22 /* :minor */,\r\n
  -  1 /* :major */,\r\n
  -  22 /* :minor */);\r\n
  -\r\n
  -  private CalciteDriverVersion() {\r\n
  -  }\r\n
  -}\r\n
  -\r\n
  -// End CalciteDriverVersion.java\r\n
  +/*\n
  + * Licensed to the Apache Software Foundation (ASF) under one or
more\n
  + * contributor license agreements.  See the NOTICE file
distributed with\n
  + * this work for additional information regarding copyright
ownership.\n
  + * The ASF licenses this file to you under the Apache License,
Version 2.0\n
  + * (the "License"); you may not use this file except in
compliance with\n
  + * the License.  You may obtain a copy of the License at\n
  ... (34 more lines that didn't fit)
  Run 'gradlew spotlessApply' to fix these violations.

Needless to say I tried running gradlew spotlessApply and building again
and it had no effect ( the file
core\build\generated\sources\version\org\apache\calcite\jdbc\CalciteDriverVersion.java
which seems to be the problem is overwritten on every build...)

Best
Amir

On Wed, Nov 20, 2019 at 11:31 AM Danny Chan  wrote:

> When I use the IDEA 2019.9 version, it works ~
>
> But the travis test is failing for the slow test: here is my log
> https://travis-ci.org/apache/calcite/jobs/614406384?utm_medium=notification&utm_source=github_status
>
> Best,
> Danny Chan
> 在 2019年11月20日 +0800 PM2:28,Vladimir Sitnikov  >,写道:
> > > Here is the stacktrace:
> > java.lang.NoClassDefFoundError: org/gradle/api/internal/plugin
> > s/DefaultConvention
> > at org.jetbrains.plugins.gradle.tooling.builder.ProjectExtensio
> > nsDataBuilderImpl.buildAll(ProjectExtensionsDataBuilderImpl.groovy:50)
> >
> > What is IDEA version?
> >
> > Vladimir
>


-- 



[image: Sisense]

*Amir Gajst*
Software Engineer
+972-54-4766239
amir.gajst
[image: Instagram]    [image: LinkedIn]
   [image: Facebook]
   [image: Twitter]




Re: CALCITE-2905: Maven -> Gradle: any thoughts

2019-11-20 Thread Vladimir Sitnikov
Are you using core.autocrlf true? (which is a recommended configuration for
Windows by the way:
https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings
)

>the file
core\build\generated\sources\version\org\apache\calcite\jdbc\CalciteDriverVersion.java
which seems to be the problem is overwritten on every build.

The file is taken
from core/src/main/version/org/apache/calcite/jdbc/CalciteDriverVersion.java,
and I would suggest checking which line endings the file has on your local
file system.

Vladimir


Re: CALCITE-2905: Maven -> Gradle: any thoughts

2019-11-20 Thread Amir Gajst
I started with *core.autocrlf true* (and *core.eol lf*). I later switched
it to *core.autocrlf false* in one of the attempts to get it to build.
core/src/main/version/org/apache/calcite/jdbc/CalciteDriverVersion.java has
LF line endings but when it's copied
to 
core/build/generated/sources/version/org/apache/calcite/jdbc/CalciteDriverVersion.java
the line-ending is changed to CRLF. If I change it to LF and build again,
the file is overwritten and the line-ending is changed back to CRLF and the
build fails again.

On Wed, Nov 20, 2019 at 6:23 PM Vladimir Sitnikov <
sitnikov.vladi...@gmail.com> wrote:

> Are you using core.autocrlf true? (which is a recommended configuration for
> Windows by the way:
>
> https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings
> )
>
> >the file
>
> core\build\generated\sources\version\org\apache\calcite\jdbc\CalciteDriverVersion.java
> which seems to be the problem is overwritten on every build.
>
> The file is taken
> from
> core/src/main/version/org/apache/calcite/jdbc/CalciteDriverVersion.java,
> and I would suggest checking which line endings the file has on your local
> file system.
>
> Vladimir
>


-- 



[image: Sisense]

*Amir Gajst*
Software Engineer
+972-54-4766239
amir.gajst
[image: Instagram]    [image: LinkedIn]
   [image: Facebook]
   [image: Twitter]




[jira] [Created] (CALCITE-3525) RexSimplify: eliminate redundant rex calls in OR

2019-11-20 Thread Igor Guzenko (Jira)
Igor Guzenko created CALCITE-3525:
-

 Summary: RexSimplify: eliminate redundant rex calls in OR
 Key: CALCITE-3525
 URL: https://issues.apache.org/jira/browse/CALCITE-3525
 Project: Calcite
  Issue Type: Improvement
Reporter: Igor Guzenko
Assignee: Igor Guzenko


Sample case to reproduce in {code}RexProgramTest.simplifyOrTerms{code}: 

{code:java}
// (a=1 or a=2 or (arr[1]>4 and arr[1]<3 and a=3)) => a=1 or a=2
final RelDataType intArrayType = typeFactory.createArrayType(intType, -1);
final RexInputRef ref0 = rexBuilder.makeInputRef(intType, 0);
final RexInputRef ref3 = rexBuilder.makeInputRef(intArrayType, 3);
final RexCall itm1 = (RexCall) rexBuilder.makeCall(intType, 
SqlStdOperatorTable.ITEM,
ImmutableList.of(ref3, literal1));
simplify = this.simplify.withParanoid(false);
checkSimplifyFilter(
or(
eq(ref0, literal1),
eq(ref0, literal2),
and(
gt(itm1, literal4),
lt(itm1, literal3),
eq(ref0, literal3)
)
),
"OR(=($0, 1), =($0, 2))"
);
simplify = simplify.withParanoid(true);
{code}




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


Re: CALCITE-2905: Maven -> Gradle: any thoughts

2019-11-20 Thread Vladimir Sitnikov
>I started with *core.autocrlf true*

Please ensure you are using core.autocrlf true, checkout the repository
from scratch, and retry.
It does work on my machine. It does work in GitHub Actions / Windows, it
does work at AppVeyor.

C:\temp>git config --get core.autocrlf
true

C:\temp>git config --get core.eol

C:\temp>git clone --depth 100 https://github.com/apache/calcite.git
calcite-tmp
Cloning into 'calcite-tmp'...

C:\temp>cd calcite-tmp

C:\temp\calcite-tmp>gradlew :core:versionClass :core:spotlessCheck
...

> Configure project :
Building Apache Calcite 1.22.0-SNAPSHOT
...
BUILD SUCCESSFUL
3 actionable tasks: 3 executed

Vladimir


Re: Progress on adding TUMBLE as table value function (CALCITE-3272)

2019-11-20 Thread Rui Wang
I have an update:

I tried to add DESCRIPTOR support (CALCITE-3339). Amazingly it was not
complicated at all to have a working version. So I created #1599[1], which
is built on top of #1587[2], to demonstrate DESCRIPTOR. The PRs are
separated because DESCRIPTOR support currently is less mature.


[1]: https://github.com/apache/calcite/pull/1599
[2]: https://github.com/apache/calcite/pull/1587


-Rui

On Thu, Nov 14, 2019 at 9:35 PM Rui Wang  wrote:

> Hi community,
>
> I have created a new PR ( https://github.com/apache/calcite/pull/1587) to
> demonstrate the progress of TUMBLE table value function (CALCITE-3272).
> Julian suggested me to have a working version that adds a stream.iq and
> have an enumerable implementation. Those are in the PR.
>
> High level speaking, the PR is adding a support of the following:
>
> SELECT *
> FROM TABLE(Tumble(
>   TABLE ORDERS ,
>   'ROWTIME' ,
>  INTERVAL '1' MINUTES))
>
>
> One missing feature so far is adding support of DESCRIPTOR, which is
> intentionally cut off from the PR because that will make the PR more
> complicated. Thus DESCRIPTOR is left as future work.
>
> The PR solves not only CALCITE-3272, but also it's blockers:
> https://jira.apache.org/jira/browse/CALCITE-3340
> https://jira.apache.org/jira/browse/CALCITE-3501
> https://jira.apache.org/jira/browse/CALCITE-3499
> https://jira.apache.org/jira/browse/CALCITE-3418
>
>
> I will probably need some guidance on how to proceed to get the PR merged.
> Please let me know if you have any thoughts.
>
> -Rui
>


Re: Progress on adding TUMBLE as table value function (CALCITE-3272)

2019-11-20 Thread Rui Wang
Forgot to mention, the DESCRIPTOR support means the following query will be
able to run:

SELECT *
FROM TABLE(Tumble(
  TABLE ORDERS ,
  DESCRIPTOR(ROWTIME) ,
 INTERVAL '1' MINUTES))


Note that the second parameter to indicate the watermarked column is
changed from a string(varchar) to DESCRIPTOR(col_name).


-Rui


On Wed, Nov 20, 2019 at 11:04 AM Rui Wang  wrote:

> I have an update:
>
> I tried to add DESCRIPTOR support (CALCITE-3339). Amazingly it was not
> complicated at all to have a working version. So I created #1599[1], which
> is built on top of #1587[2], to demonstrate DESCRIPTOR. The PRs are
> separated because DESCRIPTOR support currently is less mature.
>
>
> [1]: https://github.com/apache/calcite/pull/1599
> [2]: https://github.com/apache/calcite/pull/1587
>
>
> -Rui
>
> On Thu, Nov 14, 2019 at 9:35 PM Rui Wang  wrote:
>
>> Hi community,
>>
>> I have created a new PR ( https://github.com/apache/calcite/pull/1587)
>> to demonstrate the progress of TUMBLE table value function (CALCITE-3272).
>> Julian suggested me to have a working version that adds a stream.iq and
>> have an enumerable implementation. Those are in the PR.
>>
>> High level speaking, the PR is adding a support of the following:
>>
>> SELECT *
>> FROM TABLE(Tumble(
>>   TABLE ORDERS ,
>>   'ROWTIME' ,
>>  INTERVAL '1' MINUTES))
>>
>>
>> One missing feature so far is adding support of DESCRIPTOR, which is
>> intentionally cut off from the PR because that will make the PR more
>> complicated. Thus DESCRIPTOR is left as future work.
>>
>> The PR solves not only CALCITE-3272, but also it's blockers:
>> https://jira.apache.org/jira/browse/CALCITE-3340
>> https://jira.apache.org/jira/browse/CALCITE-3501
>> https://jira.apache.org/jira/browse/CALCITE-3499
>> https://jira.apache.org/jira/browse/CALCITE-3418
>>
>>
>> I will probably need some guidance on how to proceed to get the PR
>> merged. Please let me know if you have any thoughts.
>>
>> -Rui
>>
>


[jira] [Created] (CALCITE-3526) SqlPrettyWriter should have options to fold/chop long lines, print leading commas

2019-11-20 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-3526:


 Summary: SqlPrettyWriter should have options to fold/chop long 
lines, print leading commas
 Key: CALCITE-3526
 URL: https://issues.apache.org/jira/browse/CALCITE-3526
 Project: Calcite
  Issue Type: Bug
Reporter: Julian Hyde


SqlPrettyWriter should have options to fold/chop long lines, print leading 
commas.

In this change, we change how {{SqlPrettyWriter}} is configured: methods such 
as 
{{setIndentation}} are now deprecated, there is an immutable config object 
{{SqlWriterConfig}}, and the {{SqlDialect}} and {{boolean 
alwaysUseParentheses}} constructor arguments are also properties of the config. 
So, rather than
{code}
new SqlPrettyWriter(d, p).setIndentation(4)
{code}
you now write
{code}
new SqlPrettyWriter(
SqlPrettyWriter.config()
.withDialect(d)
.withAlwaysUseParentheses(p)
.withIndentation(4))
{code}

This change adds options to fold lists such as the SELECT clause: WIDE always 
puts items on the same line, TALL always puts items on separate lines, and FOLD 
and CHOP adapt. If the line is too long, FOLD fits as many items on a line as 
it can, whereas CHOP puts items onto separate lines. STEP is like WIDE but 
observes the {{clauseEndsLine}} property.

You can set folding policy for each clause separately using 
{{withSelectFolding}}, {{withOrderByFolding}} etc., or set the default 
{{withFolding}}.

A new property {{clauseEndsLine}} causes first SELECT item to be on a separate 
line than the SELECT keyword, and similarly other clauses.

For all options, see 
[SqlWriterConfig|https://calcite.apache.org/apidocs/org/apache/calcite/sql/SqlWriterConfig.html].

This changes also fixes CALCITE-1585; because config is held in an immutable 
object rather than the SqlPrettyWriter, {{reset()}} no longer resets settings 
such as {{alwaysUseParentheses}}.



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


Re: Re: CALCITE-2905: Maven -> Gradle: any thoughts

2019-11-20 Thread Haisheng Yuan
Hi Vladimir,

I had the same error:
Unable to load class 'org.gradle.api.internal.plugins.DefaultConvention'.

IntelliJ IDEA 2018.3.4 (Community Edition)
Build #IC-183.5429.30, built on January 28, 2019
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.4

- Haisheng

--
发件人:Danny Chan
日 期:2019年11月20日 17:31:18
收件人:
主 题:Re: CALCITE-2905: Maven -> Gradle: any thoughts

When I use the IDEA 2019.9 version, it works ~

But the travis test is failing for the slow test: here is my log 
https://travis-ci.org/apache/calcite/jobs/614406384?utm_medium=notification&utm_source=github_status

Best,
Danny Chan
在 2019年11月20日 +0800 PM2:28,Vladimir Sitnikov ,写道:
> > Here is the stacktrace:
> java.lang.NoClassDefFoundError: org/gradle/api/internal/plugin
> s/DefaultConvention
> at org.jetbrains.plugins.gradle.tooling.builder.ProjectExtensio
> nsDataBuilderImpl.buildAll(ProjectExtensionsDataBuilderImpl.groovy:50)
>
> What is IDEA version?
>
> Vladimir



Re: Re: CALCITE-2905: Maven -> Gradle: any thoughts

2019-11-20 Thread Danny Chan
Haisheng, upgrade to IDEA 2019.3 EAP solves the problem for me.

Best,
Danny Chan
在 2019年11月21日 +0800 AM9:24,Haisheng Yuan ,写道:
> Hi Vladimir,
>
> I had the same error:
> Unable to load class 'org.gradle.api.internal.plugins.DefaultConvention'.
>
> IntelliJ IDEA 2018.3.4 (Community Edition)
> Build #IC-183.5429.30, built on January 28, 2019
> JRE: 1.8.0_152-release-1343-b26 x86_64
> JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
> macOS 10.14.4
>
> - Haisheng
>
> --
> 发件人:Danny Chan
> 日 期:2019年11月20日 17:31:18
> 收件人:
> 主 题:Re: CALCITE-2905: Maven -> Gradle: any thoughts
>
> When I use the IDEA 2019.9 version, it works ~
>
> But the travis test is failing for the slow test: here is my log 
> https://travis-ci.org/apache/calcite/jobs/614406384?utm_medium=notification&utm_source=github_status
>
> Best,
> Danny Chan
> 在 2019年11月20日 +0800 PM2:28,Vladimir Sitnikov ,写道:
> > > Here is the stacktrace:
> > java.lang.NoClassDefFoundError: org/gradle/api/internal/plugin
> > s/DefaultConvention
> > at org.jetbrains.plugins.gradle.tooling.builder.ProjectExtensio
> > nsDataBuilderImpl.buildAll(ProjectExtensionsDataBuilderImpl.groovy:50)
> >
> > What is IDEA version?
> >
> > Vladimir
>


Re: Progress on adding TUMBLE as table value function (CALCITE-3272)

2019-11-20 Thread Julian Hyde
If I write

 DESCRIPTOR(rowtime)

and I am running Calcite’s parser in a mode that converts unquoted identifiers 
to upper-case, do you think that it should convert “rowtime” to upper-case?

I am undecided. It’s possible that “rowtime” references a column in a 
case-sensitive database.

Julian


> On Nov 20, 2019, at 11:14 AM, Rui Wang  wrote:
> 
> Forgot to mention, the DESCRIPTOR support means the following query will be
> able to run:
> 
> SELECT *
> FROM TABLE(Tumble(
>  TABLE ORDERS ,
>  DESCRIPTOR(ROWTIME) ,
> INTERVAL '1' MINUTES))
> 
> 
> Note that the second parameter to indicate the watermarked column is
> changed from a string(varchar) to DESCRIPTOR(col_name).
> 
> 
> -Rui
> 
> 
> On Wed, Nov 20, 2019 at 11:04 AM Rui Wang  wrote:
> 
>> I have an update:
>> 
>> I tried to add DESCRIPTOR support (CALCITE-3339). Amazingly it was not
>> complicated at all to have a working version. So I created #1599[1], which
>> is built on top of #1587[2], to demonstrate DESCRIPTOR. The PRs are
>> separated because DESCRIPTOR support currently is less mature.
>> 
>> 
>> [1]: https://github.com/apache/calcite/pull/1599
>> [2]: https://github.com/apache/calcite/pull/1587
>> 
>> 
>> -Rui
>> 
>> On Thu, Nov 14, 2019 at 9:35 PM Rui Wang  wrote:
>> 
>>> Hi community,
>>> 
>>> I have created a new PR ( https://github.com/apache/calcite/pull/1587)
>>> to demonstrate the progress of TUMBLE table value function (CALCITE-3272).
>>> Julian suggested me to have a working version that adds a stream.iq and
>>> have an enumerable implementation. Those are in the PR.
>>> 
>>> High level speaking, the PR is adding a support of the following:
>>> 
>>> SELECT *
>>> FROM TABLE(Tumble(
>>>  TABLE ORDERS ,
>>>  'ROWTIME' ,
>>> INTERVAL '1' MINUTES))
>>> 
>>> 
>>> One missing feature so far is adding support of DESCRIPTOR, which is
>>> intentionally cut off from the PR because that will make the PR more
>>> complicated. Thus DESCRIPTOR is left as future work.
>>> 
>>> The PR solves not only CALCITE-3272, but also it's blockers:
>>> https://jira.apache.org/jira/browse/CALCITE-3340
>>> https://jira.apache.org/jira/browse/CALCITE-3501
>>> https://jira.apache.org/jira/browse/CALCITE-3499
>>> https://jira.apache.org/jira/browse/CALCITE-3418
>>> 
>>> 
>>> I will probably need some guidance on how to proceed to get the PR
>>> merged. Please let me know if you have any thoughts.
>>> 
>>> -Rui
>>> 
>> 



Re: CALCITE-2905: Maven -> Gradle: any thoughts

2019-11-20 Thread Amir Gajst
Hi Vladimir,

It works.
FYI, it wasn't setting core.autocrlf to true that made the difference, but
unsetting core.eol.

Thanks

On Wed, Nov 20, 2019 at 7:41 PM Vladimir Sitnikov <
sitnikov.vladi...@gmail.com> wrote:

> >I started with *core.autocrlf true*
>
> Please ensure you are using core.autocrlf true, checkout the repository
> from scratch, and retry.
> It does work on my machine. It does work in GitHub Actions / Windows, it
> does work at AppVeyor.
>
> C:\temp>git config --get core.autocrlf
> true
>
> C:\temp>git config --get core.eol
>
> C:\temp>git clone --depth 100 https://github.com/apache/calcite.git
> calcite-tmp 
> Cloning into 'calcite-tmp'...
>
> C:\temp>cd calcite-tmp
>
> C:\temp\calcite-tmp>gradlew :core:versionClass :core:spotlessCheck
> ...
>
> > Configure project :
> Building Apache Calcite 1.22.0-SNAPSHOT
> ...
> BUILD SUCCESSFUL
> 3 actionable tasks: 3 executed
>
> Vladimir
>


-- 



[image: Sisense]

*Amir Gajst*
Software Engineer
+972-54-4766239
amir.gajst
[image: Instagram]    [image: LinkedIn]
   [image: Facebook]
   [image: Twitter]




[jira] [Created] (CALCITE-3527) enrich tests for sql hints.

2019-11-20 Thread Shuo Cheng (Jira)
Shuo Cheng created CALCITE-3527:
---

 Summary: enrich tests for sql hints.
 Key: CALCITE-3527
 URL: https://issues.apache.org/jira/browse/CALCITE-3527
 Project: Calcite
  Issue Type: Sub-task
Affects Versions: 1.21.0
Reporter: Shuo Cheng
 Fix For: 1.22.0


* add more tests for sql hints 



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