[jira] [Created] (CALCITE-5955) Non-aggregate window functions incorrectly contain window frame clause for BigQuery

2023-08-24 Thread Tanner Clary (Jira)
Tanner Clary created CALCITE-5955:
-

 Summary: Non-aggregate window functions incorrectly contain window 
frame clause for BigQuery
 Key: CALCITE-5955
 URL: https://issues.apache.org/jira/browse/CALCITE-5955
 Project: Calcite
  Issue Type: Bug
Reporter: Tanner Clary
Assignee: Tanner Clary


Currently if you have a query like:

`SELECT PERCENTILE_CONT(x, .5) OVER() FROM x;` the `OVER()` clause gets 
unparsed with a `window frame clause` which BigQuery defines 
[here|https://cloud.google.com/bigquery/docs/reference/standard-sql/window-function-calls#def_window_frame].
 

>From the docs: "Only aggregate analytic functions can use a window frame 
>clause."

This causes BigQuery to fail with the following error: `Window framing clause 
is not allowed for analytic function percentile_cont `



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


Re: A link in the code has expired

2023-08-24 Thread Michael Mior
I updated the Javadoc link. However, I also noticed there are a bunch of
references to the Eigenbase JIRA in Bug.java that are also broken with no
obvious alternative.
--
Michael Mior
mm...@apache.org


On Tue, Aug 22, 2023 at 4:33 PM Julian Hyde  wrote:

> Yes, when eigenbase.org  shut down I copied the
> contents of the wiki onto my server, http://www.hydromatic.net/wiki.
> http://www.hydromatic.net/wiki/Eigenbase_Introduction is a good place to
> start reading.
>
> Maybe there’s a better place to store those files for posterity. I have
> just checked the files into git; see my fork of LucidDB:
> https://github.com/julianhyde/luciddb/commits/master. I’m trying to
> figure out how to make those files appear via GitHub pages.
>
> Julian
>
>
> > On Aug 16, 2023, at 6:54 AM, Michael Mior  wrote:
> >
> > Thanks for pointing this out! It looks like Julian might have a mirror of
> > that page at the link below that could be swapped out. Unfortunately,
> with
> > the original page unavailable, I can't confirm.
> >
> > http://www.hydromatic.net/wiki/RelationalExpressionMetadata
> >
> > --
> > Michael Mior
> > mm...@apache.org
> >
> >
> > On Wed, Aug 16, 2023 at 9:30 AM Hongyu Guo 
> wrote:
> >
> >> Hello,
> >>
> >> I found a link in RelMetadataProvider.java has expired.
> >>
> >> The link is http://wiki.eigenbase.org/RelationalExpressionMetadata
> >>
> >> Found in
> >>
> >>
> https://github.com/apache/calcite/blob/main/core/src/main/java/org/apache/calcite/rel/metadata/RelMetadataProvider.java
> >>
> >>
> >>
> >> Best,
> >>
> >> Hongyu Guo
> >>
>
>


[jira] [Created] (CALCITE-5954) Support MERGE in RelToSqlConverter

2023-08-24 Thread hongyu guo (Jira)
hongyu guo created CALCITE-5954:
---

 Summary: Support MERGE in RelToSqlConverter 
 Key: CALCITE-5954
 URL: https://issues.apache.org/jira/browse/CALCITE-5954
 Project: Calcite
  Issue Type: New Feature
  Components: core
Affects Versions: 1.35.0
Reporter: hongyu guo
Assignee: hongyu guo
 Fix For: 1.36.0


We have implemented validation for the *MERGE INTO* clause, but Calcite does 
not support converting TableModify to SqlMerge.



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


JDBC 4.2 or 4.3 support

2023-08-24 Thread Tony Falabella
Calcite Team,

Are there any plans to support JDBC 4.2 or 4.3 on the roadmap?  

Also we have code that adds a JdbcSchema to the rootSchema via:

rootSchema.add(DB_SCHEMA, JdbcSchema.create(rootSchema, DB_SCHEMA, dataSource, 
null, DB_SCHEMA));

When querying via JPA against an H2 DB that has a table containing a “Binary 
Large Object” (a Blob) CalciteJdbc41Connection creates a 
CalciteJdbc41PreparedStatement which creates a CalciteResultSet (a subclass of 
AvaticaResultSet) which then creates an ArrayIteratorCursor (a subclass of 
AbstractCursor) which has this implementation:

public Blob getBlob() throws SQLException {
  throw cannotConvert(“Blob”)
}

Is there anything I can do to support Blobs/Clobs/Arrays/Refs/etc?  Maybe I’m 
doing something incorrectly in my Connection initialization.  I am NOT 
initializing anything with the RelOptPlanner like Rules. It didn’t appear that 
I needed to. 

Thanks in advance. 
Tony

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

2023-08-24 Thread Apache Jenkins Server
See 




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

2023-08-24 Thread Apache Jenkins Server
See 


Changes:

[Benchao Li] [CALCITE-5920] Reset PERCENTILE_CONT/PERCENTILE_DISC to reserved 
keywords

[Benchao Li] [CALCITE-5909] SqlParserTest.testNoUnintendedNewReservedKeywords 
fails in IDE while passes in command line


--
[...truncated 387.18 KB...]
 21.7sec, 
org.apache.calcite.adapter.os.OsAdapterTest > testPs()
 22.2sec, 
org.apache.calcite.adapter.os.OsAdapterTest > testStdin()
 22.6sec, 
org.apache.calcite.adapter.os.OsAdapterTest > testJps()
 22.6sec, 
org.apache.calcite.adapter.os.OsAdapterTest > testDu()
 22.6sec, 
org.apache.calcite.adapter.os.OsAdapterTest > 
testDuFilterSortLimit()
 23.1sec, 
org.apache.calcite.chinook.RemotePreparedStatementParametersTest > 
testSimpleStringParameterShouldWorkWithCalcite()
 23.7sec, 
org.apache.calcite.adapter.os.OsAdapterTest > testFiles()
 23.0sec, org.apache.calcite.chinook.EndToEndTest > 
test(String)[1], [1] sql/cross-join-lateral.iq
 24.7sec, 
org.apache.calcite.chinook.RemotePreparedStatementParametersTest > 
testSeveralParametersShouldWorkWithCalcite()
 24.9sec,3 completed,   0 failed,   0 skipped, 
org.apache.calcite.chinook.RemotePreparedStatementParametersTest
 26.8sec, 
org.apache.calcite.adapter.os.OsAdapterTest > 
testSqlShellFormat()
WARNING  27.2sec,   13 completed,   0 failed,   2 
skipped, org.apache.calcite.adapter.os.OsAdapterTest
  6.9sec, org.apache.calcite.chinook.EndToEndTest > 
test(String)[2], [2] sql/preferred-for-specific-user.iq
 33.8sec,4 completed,   0 failed,   0 skipped, 
org.apache.calcite.chinook.EndToEndTest > test(String)
 34.0sec,4 completed,   0 failed,   0 skipped, 
org.apache.calcite.chinook.EndToEndTest

> Task :testkit:test

FixtureTest > testRuleFixture() STANDARD_ERROR
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further 
details.
  0.8sec,1 completed,   0 failed,   0 skipped, 
org.apache.calcite.TestKtTest
  0.9sec,5 completed,   0 failed,   0 skipped, 
org.apache.calcite.util.TestUtilTest
  2.5sec, org.apache.calcite.test.FixtureTest > 
testParserFixture()
  3.6sec, org.apache.calcite.test.FixtureTest > 
testValidatorFixture()
  7.5sec, org.apache.calcite.test.FixtureTest > 
testSqlToRelFixture()
  8.3sec, org.apache.calcite.test.FixtureTest > 
testRuleFixtureNeedsDiffRepos()
  8.7sec, org.apache.calcite.test.FixtureTest > 
testMetadata()
  9.2sec, org.apache.calcite.test.FixtureTest > 
testRuleFixture()
 10.8sec, org.apache.calcite.test.FixtureTest > 
testOperatorFixture()
 11.1sec,9 completed,   0 failed,   0 skipped, 
org.apache.calcite.test.FixtureTest
 17.5sec,   15 completed,   0 failed,   0 skipped, Gradle Test Run 
:testkit:test

> Task :redis:test
docker[redis:2.8.19] 2023-08-24 10:54:24,572 
[docker-java-stream--1564687249] INFO  - Pulling image layers:  0 pending,  9 
downloaded,  1 extracted, (39 MB/46 MB)
docker[redis:2.8.19] 2023-08-24 10:54:25,088 
[docker-java-stream--1564687249] INFO  - Pulling image layers:  0 pending,  9 
downloaded,  2 extracted, (39 MB/46 MB)

> Task :piglet:test
  3.3sec, org.apache.calcite.test.PigRelOpTest > 
testMultipleStores()
 21.4sec, org.apache.calcite.test.PigRelOpTest > 
testOrderBy()
  4.1sec, org.apache.calcite.test.PigRelOpTest > 
testGroupby()
 21.3sec, org.apache.calcite.test.PigRelOpTest > 
testCross()
  2.5sec, org.apache.calcite.test.PigRelOpTest > 
testDistinct()
  2.1sec, org.apache.calcite.test.PigRelOpTest > 
testFilter()
  2.6sec, org.apache.calcite.test.PigRelOpTest > 
testLoadFromFile()
  2.3sec, org.apache.calcite.test.PigRelOpTest > 
testGroupby2()
  4.9sec, org.apache.calcite.test.PigRelOpTest > 

Re: [jira] [Created] (CALCITE-5950) Default column constraint is erroneously processed.

2023-08-24 Thread stanilovsky evgeny

Julian thanks.
PR passed all checks and ready for review.


I just took a look at
https://github.com/apache/calcite/pull/3393/checks. I see an autostyle
violation, and it looks valid. That error is there so that you can fix
it and not waste reviewers' time.

On Wed, Aug 23, 2023 at 2:15 PM Julian Hyde  wrote:


There aren't many false positives or flaky tests in CI,
checker-framework, error-prone. If it says that (say) you are passing
a nullable object to a method that requires a not-nullable argument,
you probably are.

I find it useful to run checker-framework on my own computer, rather
than waiting for CI. But you must use JDK 11:

 ./gradlew --no-parallel --no-daemon -PenableCheckerframework
:linq4j:classes :core:classes

Julian

On Wed, Aug 23, 2023 at 8:42 AM stanilovsky evgeny
 wrote:
>
> PR is ready for review, plz explain did i need to fix all of: CI /
> CheckerFramework issues ?
> Seems some of them are false positive.
> thanks !
>
> > Evgeny Stanilovsky created CALCITE-5950: