[jira] [Created] (CALCITE-4795) In class SqlBasicCall, make the "operands" field private.

2021-09-22 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4795: Summary: In class SqlBasicCall, make the "operands" field private. Key: CALCITE-4795 URL: https://issues.apache.org/jira/browse/CALCITE-4795 Projec

Re: SqlBasicCall.clone shallow copy

2021-09-22 Thread Julian Hyde
That looks like a bug. Cloning a SqlCall and then calling setOperand on it is valid, and should not modify the original SqlCall. We tend to avoid calling ’set’ methods on SqlNodes - we treat them as immutable except that the validator will replace an argument with an equivalent argument (e.g. r

Re: COALESCE returns maximum of available CHAR capacity.

2021-09-22 Thread Julian Hyde
The current behavior looks ok to me. The expression has type CHAR(2) because the arguments have types CHAR(1) and CHAR(2). So ‘a’ is widened to ‘a ‘. Julian > On Sep 22, 2021, at 12:00 AM, stanilovsky evgeny > wrote: > > sorry for typo, 'fill the ticket' of course )) > >> hi community ! >>

Re: Guava version

2021-09-21 Thread Julian Hyde
va.version=19.0. > > James > > > On Tue, Sep 21, 2021 at 4:09 PM Julian Hyde wrote: > >> How do I set the Guava version from the Gradle command line? >> >> I’d expect >> >> ./gradlew -Dguava.version=19.0 >> >> to work but it doesn’t

[jira] [Created] (CALCITE-4789) Build is broken on Guava versions < 21

2021-09-21 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4789: Summary: Build is broken on Guava versions < 21 Key: CALCITE-4789 URL: https://issues.apache.org/jira/browse/CALCITE-4789 Project: Calcite Issue Type:

Guava version

2021-09-21 Thread Julian Hyde
How do I set the Guava version from the Gradle command line? I’d expect ./gradlew -Dguava.version=19.0 to work but it doesn’t. (We used to test the supported range of Guava versions in CI. Then we stopped because Gradle. And now it turns out that we’re broken on Gradle < 21.0.) Julian

[DISCUSS] Pronouns

2021-09-21 Thread Julian Hyde
I've updated my entry in the data file of contributors [1] (from which the table of committers and PMC members is generated on the site [2]) adding my pronouns. I don't think that we should compel or expect people to provide their pronouns. But I want to provide a place for people to do so, if they

Re: ApacheCon 2021 talks about Apache Calcite

2021-09-20 Thread Julian Hyde
It’s not ApacheCon, but I am giving a talk at StrangeLoop in 2 weeks. The talk is about Morel but Calcite gets a prominent mention. https://thestrangeloop.com/2021/morel-a-functional-query-language.html Julian > On Sep

Re: Tableau dialect specification for Calcite

2021-09-20 Thread Julian Hyde
place to start since it > uses Calcite: > > https://github.com/dremio-hub/tableau-connector > > > On Fri, Sep 10, 2021 at 12:37 PM Julian Hyde wrote: > >> Tableau has a text file [1] where you can define your dialect. It lets >> Tableau know how to gener

Re: Inconsistency of javadoc and actual behaviour of RelNode#getVariablesSet

2021-09-17 Thread Julian Hyde
The sentence "Note: only {@link org.apache.calcite.rel.core.Correlate} should set variables.” is no longer true, now we added correlated Filter and, I believe, correlated Project. Maybe we should also add correlated Join (in case the ON clause uses correlated variables). I believe that variable

Tableau dialect specification for Calcite

2021-09-10 Thread Julian Hyde
Tableau has a text file [1] where you can define your dialect. It lets Tableau know how to generate SQL to extract a year from a date, for example. Has anyone written that dialect specification for Calcite or a system that uses Calcite's SQL parser (such as Druid, Phoenix)? Since those systems hav

[jira] [Created] (CALCITE-4763) EXISTS_AGG, an aggregate function that returns whether count is positive

2021-09-02 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4763: Summary: EXISTS_AGG, an aggregate function that returns whether count is positive Key: CALCITE-4763 URL: https://issues.apache.org/jira/browse/CALCITE-4763 Project

[jira] [Created] (CALCITE-4762) Upgrade to Avatica 1.19

2021-09-02 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4762: Summary: Upgrade to Avatica 1.19 Key: CALCITE-4762 URL: https://issues.apache.org/jira/browse/CALCITE-4762 Project: Calcite Issue Type: Bug

Re: [jira] [Created] (CALCITE-4760) Should not need to initialize a jdbc:calcite driver to make a RelBuilder

2021-09-01 Thread Julian Hyde
I am inclined to fix this by creating a connection directly, not via the JDBC DriverManager. But that has the potential to break people who are relying on the DriverManager. If this would affect you, please speak up by adding comments to the JIRA case. This particular case seems to be related t

Re: Runtime Exception while using SqlParse.

2021-08-18 Thread Julian Hyde
Yes, the error message is not good enough. Can you please log a bug? The error comes from org.apache.calcite.linq4j.tree.BinaryExpression, which I very much doubt happens at parse time. If you can add a test case, or a complete error stack, that would be appreciated. > On Aug 18, 2021, at 9:30

Re: Analyzing SQL queries with default catalog/database names

2021-08-17 Thread Julian Hyde
A key step in validation is to fully-quality table names. Thus in your example, mytable would become the string array [“hive”, “my_database”, “mytable”]. Any my_database2.mytable2 would become [“hive”, “my_database2”, “mytable2”]. But foo would remain foo, because it is in the query and is not a

Re: Visualization of Graphviz

2021-08-13 Thread Julian Hyde
or pointing out the visualizer in the Tempura branch. It looks > quite promising. > > Cordialement / Best Regards, > *Thomas Rebele, PhD* | R&D Developer | Germany | www.tibco.com > > > On Thu, Aug 12, 2021 at 7:19 PM Julian Hyde wrote: > >> I don’t have a str

[jira] [Created] (CALCITE-4737) Add Volcano visualizer for debugging

2021-08-13 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4737: Summary: Add Volcano visualizer for debugging Key: CALCITE-4737 URL: https://issues.apache.org/jira/browse/CALCITE-4737 Project: Calcite Issue Type: Bug

Re: Visualization of Graphviz

2021-08-12 Thread Julian Hyde
I don’t have a strong opinion on this, but I want to point out that there are some GraphViz improvements as part of Tempura (the case is https://issues.apache.org/jira/browse/CALCITE-4568 ; the specific commit is https://github.com/hbtoo/calci

[jira] [Created] (CALCITE-4728) Parse and validate procedural code (such as SQL/PSM, PL/SQL, PL/pgSQL, T-SQL)

2021-08-12 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4728: Summary: Parse and validate procedural code (such as SQL/PSM, PL/SQL, PL/pgSQL, T-SQL) Key: CALCITE-4728 URL: https://issues.apache.org/jira/browse/CALCITE-4728

Re: QueryableTable can only be implemented as ENUMERABLE convention

2021-08-11 Thread Julian Hyde
It’s a reasonable ask. Can you please log a JIRA case? Julian > On Aug 11, 2021, at 5:09 AM, Martin Jonsson > wrote: > > Hello all. > It is mentioned in the code (1.27) that QueryableTable can only be with > Enumerable Convention. Is there a workaround to have it work with Bindable > Conven

[jira] [Created] (CALCITE-4723) Check whether JDBC adapter generates "GROUP BY ()" against Oracle, DB2, MSSQL

2021-08-10 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4723: Summary: Check whether JDBC adapter generates "GROUP BY ()" against Oracle, DB2, MSSQL Key: CALCITE-4723 URL: https://issues.apache.org/jira/browse/CA

Reviewer/committer needed for [CALCITE-4544] Deprecate Metadata API backed by Java Reflection

2021-08-09 Thread Julian Hyde
https://issues.apache.org/jira/browse/CALCITE-4544 looks like something we want, but I am too busy to commit it. It is a major change that requires due diligence. Can someone volunteer to review and commit this? Julian

Re: Integrate the Cosette prover in Calcite's RelNode rewrite tests

2021-08-06 Thread Julian Hyde
Shuxian, It would be great to carry on this integration. I downloaded and built your project. (I also opened a pull request[1], adding a maven wrapper and a README.) It’s difficult to get at the RelNodes in RelOptRulesTest if you’re outside Calcite. (Because it is a test, we don’t currently inc

[jira] [Created] (CALCITE-4720) Obsolete the Collect relational operator, using Aggregate and ARRAY_AGG (and new aggregate functions MULTISET_AGG and MAP_AGG) instead

2021-08-05 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4720: Summary: Obsolete the Collect relational operator, using Aggregate and ARRAY_AGG (and new aggregate functions MULTISET_AGG and MAP_AGG) instead Key: CALCITE-4720 URL: https

[jira] [Created] (CALCITE-4719) Add variants of RexSubQuery that collect sub-queries into MULTISET, ARRAY and MAP collections

2021-08-05 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4719: Summary: Add variants of RexSubQuery that collect sub-queries into MULTISET, ARRAY and MAP collections Key: CALCITE-4719 URL: https://issues.apache.org/jira/browse/CALCITE-4719

Fwd: [DISCUSS] Developing an "Arrow Compute IR [Intermediate Representation]" to decouple language front ends from Arrow-native compute engines

2021-08-04 Thread Julian Hyde
On dev@arrow, Wes McKinney just started a discussion of a language for “programming” Arrow. One of its explicit goals is for systems like Calcite to generate such code as their physical plan. This would be great for Calcite. Arrow started as an excellent runtime for high-performance data proces

Re: ClassCastException: FamilyOperandTypeChecker cannot be cast to SqlOperandMetadata

2021-08-03 Thread Julian Hyde
SqlOperandMetadata only needs to be implemented by user-defined functions. (User-defined functions have fixed number of parameters, and the parameters have names; built-in functions may have a variable number of arguments, but they do not have names.) So, maybe the cause is a function that isn’

Re: does Calcite have the mathematical equation transformation such a + b = c to a = c - b

2021-07-30 Thread Julian Hyde
Calcite doesn’t transform a + b = c” to “a = c - b for good reason… someone would also want to transform a - b = c” to “a = c + b and the two transforms would cycle. To put it another way: Calcite’s expression simplification is not smart/powerful enough to do theorem proving. Our rule of

[jira] [Created] (CALCITE-4711) RexProgramBuilder should not simplify

2021-07-30 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4711: Summary: RexProgramBuilder should not simplify Key: CALCITE-4711 URL: https://issues.apache.org/jira/browse/CALCITE-4711 Project: Calcite Issue Type: Bug

Re: Changing the Parser

2021-07-29 Thread Julian Hyde
There is some documentation: https://calcite.apache.org/docs/adapter.html#extending-the-parser . > On Jul 29, 2021, at 7:04 PM, Vladimir Sitnikov > wrote: > > https://issues.apache.org/jira/browse/CALCITE-4701 seems relevant.

[jira] [Created] (CALCITE-4707) Optimize incremental maintenance of materialized views

2021-07-28 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4707: Summary: Optimize incremental maintenance of materialized views Key: CALCITE-4707 URL: https://issues.apache.org/jira/browse/CALCITE-4707 Project: Calcite

Re: Support on Avatica driver for Reactive JDBC (R2DBC)

2021-07-19 Thread Julian Hyde
Avatica does not currently support R2DBC. I was not previously aware of R2DBC but it looks like a useful extension to JDBC for streaming apps. (When I was at SQLstream, we had to make similar extensions, e.g. providing a callback method that would be executed each time a record was available in

On vacation

2021-07-16 Thread Julian Hyde
I’m on vacation for the next week, pretty much offline. I’d appreciate if someone could review PRs, etc. Julian

[jira] [Created] (CALCITE-4687) Add LIMIT to WITHIN GROUP clause of aggregate functions

2021-07-08 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4687: Summary: Add LIMIT to WITHIN GROUP clause of aggregate functions Key: CALCITE-4687 URL: https://issues.apache.org/jira/browse/CALCITE-4687 Project: Calcite

Re: Support for constraints in jdbc adapter and optional decorrelation step in PlannerImpl.rel?

2021-07-06 Thread Julian Hyde
Re 1. It seems that the Server parser goes further than the Server implementation. You can specify PRIMARY KEY in the DDL, and we can parse it, but Server cannot create tables with primary keys. Please log a bug. Contributions welcome. One workaround is for you to parse but not execute. The inf

Re: Deduplicate correlate variables question.

2021-07-01 Thread Julian Hyde
Thanks, yes, that’s better. > On Jun 30, 2021, at 10:34 PM, stanilovsky evgeny > wrote: > > thanks! done, i hope ) > >> Thanks! Can you improve the JIRA subject, so that everyone reading the >> release notes will understand it? (I had to look up COLLECTION_TABLE.) >> >> >>> On Jun 30, 2021,

Re: Deduplicate correlate variables question.

2021-06-30 Thread Julian Hyde
Thanks! Can you improve the JIRA subject, so that everyone reading the release notes will understand it? (I had to look up COLLECTION_TABLE.) > On Jun 30, 2021, at 5:12 AM, stanilovsky evgeny > wrote: > > Guys, i fill the ticket [1] and PR is ready for check, can anyone take a look > on it ?

[jira] [Created] (CALCITE-4671) Allow Avatica connect-string properties in any case (lowerCamel, UPPER_SNAKE, etc.)

2021-06-28 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4671: Summary: Allow Avatica connect-string properties in any case (lowerCamel, UPPER_SNAKE, etc.) Key: CALCITE-4671 URL: https://issues.apache.org/jira/browse/CALCITE-4671

Re: [ANNOUNCE] New committer: Vladimir Ozerov

2021-06-25 Thread Julian Hyde
fforts might boost Apache Calcite adoption > dramatically. Hopefully, we will find time to invest in it. > > Regards, > Vladimir. > > пт, 25 июн. 2021 г. в 09:52, Fan Liya : > >> Congratulations, Vladimir! >> Thanks for the good articles. >> >> Best, &g

Re: why do We use inner class for CallCopyingArgHandler within SqlShuttle rather static nested class as ArgHandlerImpl within SqlBasicVisitor.

2021-06-25 Thread Julian Hyde
> I find the CallCopyingArgHandler is not static, but the doc doesn't specify > the reason. > Does someone know why? If you try making it static you will see that it is unable to use the current shuttle to visit the children. CallCopyingArgHandler exists for a very short duration - visit of one

Re: [ANNOUNCE] New committer: Vladimir Ozerov

2021-06-24 Thread Julian Hyde
Welcome, Vladimir! > On Jun 24, 2021, at 6:00 PM, Albert wrote: > > Congrats. > just found the blog: https://www.querifylabs.com/author/vladimir-ozerov > > On Thu, Jun 24, 2021 at 2:27 PM Alessandro Solimando < > alessandro.solima...@gmail.com> wrote: > >> Congratulations Vladimir, well deserv

Re: Error encountered during build on ppc64le architecture

2021-06-22 Thread Julian Hyde
It looks as if the Redis adapter test is trying to get an unavailable port. See whether the build succeeds if the Redis adapter test is skipped: ./gradlew clean test -x :redis:test If that passes, it indicates that Calcite is sound. (The Redis adapter is probably sound, too, and its test would

Re: geometry type support problem

2021-06-22 Thread Julian Hyde
It’s possible that the problem is with the JDBC adapter. Calcite would need to connect to PostGIS via its JDBC driver, read the column types, and deduce that the column is of GEOMETRY type. JDBC does not have a type-id for GEOMETRY, so this process would be a little ad hoc. (Probably using Resu

Re: Equals method of AggregateCall

2021-06-16 Thread Julian Hyde
Not a bug. The type is derived from the operator plus argument types, so it is impossible for two AggregateCalls to be the same except for type. There is no perfect “equals”. The current one seems to serve our needs. If you have different needs maybe you need a different “equals” (or use a wr

Re: should calcite tolerate some typo mistakes?

2021-06-16 Thread Julian Hyde
It would have to be a mode that people opt into, but it might be useful. Especially for interactive use. I think you should write a Jira case with a specification and examples. Note that we already detect when people use the right identifier with the wrong case, and alert them in the error me

[jira] [Created] (CALCITE-4649) Add AggregateExpandGroupingSetsRule, a planner rule that removes GROUPING SETS

2021-06-11 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4649: Summary: Add AggregateExpandGroupingSetsRule, a planner rule that removes GROUPING SETS Key: CALCITE-4649 URL: https://issues.apache.org/jira/browse/CALCITE-4649

Re: Problem with Spool (de-)serialization

2021-06-10 Thread Julian Hyde
son(java.lang.Object) > doesn’t know how to handle enum > > @Override public RelWriter explainTerms(RelWriter pw) { > return super.explainTerms(pw) > .item("readType", readType) > .item("writeType", writeType); > } > > Does it m

Re: Optimizer (Hep) NOT scanning RelNodes of Subqqueries

2021-06-09 Thread Julian Hyde
I presume we’re talking about scalar sub-queries (e.g. sub-query in SELECT) and sub-queries with IN and EXISTS, as opposed to sub-queries in the FROM clause. The former are represented using RexSubQuery because the queries appear in scalar expressions. There are rules to expand RexSubQuery into

Re: Problem with Spool (de-)serialization

2021-06-08 Thread Julian Hyde
Including class names in serialized JSON makes me nervous. It is a common attack surface. Could we, say, include the name of the enum (without package name) and map it to a list of supported Enums? > On Jun 8, 2021, at 9:20 AM, Konstantin Orlov wrote: > > Hi, folks! > > We have a problem with

Re: [ANNOUNCE] Apache Calcite 1.27.0 released

2021-06-04 Thread Julian Hyde
Thank you, Stamatis! And the 50 other people who contributed to this release. On Fri, Jun 4, 2021 at 3:50 PM Haisheng Yuan wrote: > > Thank you Stamatis and all Calciters involved for leading the effort. > > Haisheng Yuan > > On 2021/06/04 22:16:21, Stamatis Zampetakis wrote: > > The Apache Calc

Re: [DISCUSS] Release Managers

2021-06-03 Thread Julian Hyde
Yes, I am release manager for 1.28. I’ll aim to release first week of August. Somewhat related to the call for release managers: we need active committers. (Stamatis, can you run your stats on PRs and active committers?) On May 21, I noted that PR backlog is building up, and appealed for 5 commi

Re: Deduplicate correlate variables question.

2021-06-03 Thread Julian Hyde
The PR needs to fix a bug or implement a feature. So, first you should log a JIRA case describing what doesn’t work. Write tests for what doesn’t work that you want to make work. (Or maybe you can refactor/generalize existing tests.) Then submit a PR, and we will review that PR on the basis of w

Re: Deduplicate correlate variables question.

2021-06-02 Thread Julian Hyde
re is no way of knowing by reading > the code. This would personally have made me much simpler for myself to > get ramped on the calcite code base. > > James > > On Wed, Jun 2, 2021 at 12:07 PM Julian Hyde wrote: > >> Master is a moving target. Apparently you are using

Re: RelFieldTrimmer on union distinct

2021-06-02 Thread Julian Hyde
ou Julian. > > I am able to reproduce your findings. > > I am curious if the results highlight a bug in Calcite where we should expect > 4 to be returned or is this a query that Calcite should not support? > > Sean > >> On Jun 2, 2021, at 11:37 AM, Julian Hyde wrote

Re: Minified javascript in source releases

2021-06-02 Thread Julian Hyde
+0 to remove them entirely, if that is possible. -1 to keep in git but remove from source releases. We are already in compliance with Apache policy, best I can tell. On Wed, Jun 2, 2021 at 12:08 PM Haisheng Yuan wrote: > > +1 for removing them entirely. > > Thanks, > Haisheng Yuan > > On 2021/0

Re: Deduplicate correlate variables question.

2021-06-02 Thread Julian Hyde
Master is a moving target. Apparently you are using a version of the code from sometime in March. These links work better: [1] https://github.com/apache/calcite/blob/796675c9b33e0461bc45a72780162d474a4b098b/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java#L2881 [2] https://g

Re: RelFieldTrimmer on union distinct

2021-06-02 Thread Julian Hyde
Here’s a query that would give the wrong answer if you trim: select count(*) from ( select deptno from scott.emp union select deptno from scott.dept); returns 4. Note that ‘deptno’ is not used. But when I trim it away, select count(*) from ( select 'a' from scott.emp unio

Re: [VOTE] Release apache-calcite-1.27.0 (release candidate 0)

2021-06-01 Thread Julian Hyde
FYI, I have just discovered https://issues.apache.org/jira/browse/CALCITE-4629 <https://issues.apache.org/jira/browse/CALCITE-4629> in 1.27 RC 0. I don’t have a repro case. I don’t think it is a show-stopper so my vote remains +1. > On Jun 1, 2021, at 2:59 PM, Julian Hyde wrote

[jira] [Created] (CALCITE-4629) RexNormalize.hashCode() throws NullPointerException

2021-06-01 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4629: Summary: RexNormalize.hashCode() throws NullPointerException Key: CALCITE-4629 URL: https://issues.apache.org/jira/browse/CALCITE-4629 Project: Calcite

Re: [VOTE] Release apache-calcite-1.27.0 (release candidate 0)

2021-06-01 Thread Julian Hyde
+1 Downloaded, checked hashes and signature, compared tar.gz contents to git commit 60f07118f3. Confirmed that gradle-wrapper.jar is missing from tar.gz. Using instructions in site/_docs/howto.md, downloaded and installed gradle-6.8.3 from https://gradle.org/releases/

[jira] [Created] (CALCITE-4628) If SqlImplementor fails, include the RelNode in the exception

2021-06-01 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4628: Summary: If SqlImplementor fails, include the RelNode in the exception Key: CALCITE-4628 URL: https://issues.apache.org/jira/browse/CALCITE-4628 Project: Calcite

Re: Calcite Engine Support for Oracle SQL89 Outer Join Syntax

2021-05-27 Thread Julian Hyde
Calcite does not support Oracle’s outer join syntax (“(+)”) or, for that matter, SQL Server’s syntax (“(*)”). Please log a JIRA case, asking for both to be added to the Babel parser. (I don’t want to add it to the Core parser, because it will cause ambiguities.) I don’t know of a workaround. J

Re: Question: Hints & Rules

2021-05-26 Thread Julian Hyde
My fear, when we introduced hints, was that there would be many cases where people would hope that rules propagate hints and the rules do not; and that in some cases, the expected behavior isn't even clear. Maybe this can be addressed by the power of open source: people find an issue, submit a pat

Re: [DISCUSS] Towards Calcite 1.27.0

2021-05-24 Thread Julian Hyde
that you need my help. I will check those soon. > > > -Rui > > On Mon, May 24, 2021 at 11:06 AM Julian Hyde wrote: > >> We still need 5 committers to review 5 PRs each. Please reply to this >> email to volunteer. >> >> On Fri, May 21, 2021 at 3:41 PM S

Re: [DISCUSS] Towards Calcite 1.27.0

2021-05-24 Thread Julian Hyde
y, if people agree on > this. > Alternatively, I will have a bit more time around 17 to 20 of June. > > I will try to get 2-3 PRs in before starting the RC. > > Best, > Stamatis > > > On Fri, May 21, 2021 at 9:15 PM Julian Hyde wrote: > > > Now Avatica 1.18 has

Re: [RESULT][VOTE] Release apache-calcite-avatica-1.18.0 (release candidate 1)

2021-05-23 Thread Julian Hyde
ipt* > > That pretty much forbids releasing minified files as a part of the source > release. > > Vladimir > > > вт, 18 мая 2021 г. в 14:14, Francis Chuang : > > > Thanks to everyone who has tested the release candidate and given their > > comments and votes.

Re: [DISCUSS] Towards Calcite 1.27.0

2021-05-21 Thread Julian Hyde
tica/pull/138 > > On Sun, Feb 28, 2021 at 2:22 AM Julian Hyde wrote: > > > Vladimir, > > > > Thanks for finding this bug. Please log it. > > > > I don't intend to fix any more bugs in this area before 1.27. It has > > been a huge effort on my p

Re: Enumerable rules lost hint info

2021-05-21 Thread Julian Hyde
physical operators. But I am not sure whether there are downstream >> projects that are using hints for physical resource. >> >> On 2021/05/19 17:05:44, Julian Hyde wrote: >>> Sure, there’s a slot to hold the hints. But is there a benefit to keeping >> them in the ph

Re: AggregateUnionTransposeRule fails when some inputs have unique grouping key

2021-05-21 Thread Julian Hyde
Can you add your proposed fix to the bug, and we can discuss there. > On May 21, 2021, at 2:33 AM, Vladimir Ozerov wrote: > > Hi, > > I created two issues for two distinct bugs in AggregateUnionTransposeRule: > > 1. https://issues.apache.org/jira/browse/CALCITE-4616 - the problem with > a

Re: Issue with DDL Parsing - Postgres

2021-05-19 Thread Julian Hyde
The SQL string you posted does not contain the word “PRIMARY”, so the error message is surprising. That said, Calcite’s dialect is different from PostgreSQL, and we do not promise to be able to parse every PostgreSQL query. You might have a better chance with Babel parser, which is more lenient

Re: Enumerable rules lost hint info

2021-05-19 Thread Julian Hyde
gt;return project_(nodes, fieldNames, ImmutableList.of(), force); > } > > > > Regards! > > Aron Tao > > > Julian Hyde 于2021年5月19日周三 上午12:30写道: > >> Do we really need hints in physical operators? When hints were introduced, >> was that part of

Re: AggregateUnionTransposeRule fails when some inputs have unique grouping key

2021-05-19 Thread Julian Hyde
You have definitely found a bug. One solution is to remove some of the rule’s responsibilities - delegating to another rule that presumably doesn’t have the bug. That would be a breaking change. Another solution is to fix the rule. Please log a jira case, and let’s discuss further there. Rea

Re: Enumerable rules lost hint info

2021-05-18 Thread Julian Hyde
Do we really need hints in physical operators? When hints were introduced, was that part of the plan? Julian > On May 17, 2021, at 11:50 PM, JiaTao Tao wrote: > > Hi > Recently, I'm integrating Calcite's hint into our system, and I've found > the Enumerable rules just throw the hint info(Immu

Re: Calcite development using IntelliJ

2021-05-17 Thread Julian Hyde
All those things usually work fine, and with very little effort. But occasionally things get screwed up. If IntelliJ doesn’t load correctly the first time you initialize from build.gradle.kts, close the project and reload. It usually works fine the second time. If that doesn’t work, try ‘File >

[jira] [Created] (CALCITE-4609) WITH query using AVG throws AssertionError: type mismatch

2021-05-17 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4609: Summary: WITH query using AVG throws AssertionError: type mismatch Key: CALCITE-4609 URL: https://issues.apache.org/jira/browse/CALCITE-4609 Project: Calcite

Re: Whether Explain statement should be validated or not

2021-05-14 Thread Julian Hyde
Let’s frame this discussion in terms of user-visible behavior (rather than validator, relations and namespaces). Calcite does validate EXPLAIN statements, as this example illustrates: sqlline> !connect jdbc:calcite:model=core/src/test/resources/hsqldb-model.json sa sa sqlline> explain plan

Re: [VOTE] Release apache-calcite-avatica-1.18.0 (release candidate 1)

2021-05-14 Thread Julian Hyde
You’re right. I did not intend to mis-state policy. > On May 14, 2021, at 1:53 AM, Vladimir Sitnikov > wrote: > > Julian>The vote passes if the number of +1 votes exceeds the number of -1 > votes by 3 or more. > > Julian, please check the regular rules: > https://www.apache.org/legal/release-

Re: [VOTE] Release apache-calcite-avatica-1.18.0 (release candidate 1)

2021-05-14 Thread Julian Hyde
ist.apache.org/repos/dist/dev/calcite/apache-calcite-avatica-1.18.0-rc1 > > Are you asking because this might tamper with the procedure to check the > source code? > > Best regards, > Alessandro > > On Wed, 12 May 2021 at 19:37, Julian Hyde wrote: > >> Ale

Re: [VOTE] Release apache-calcite-avatica-1.18.0 (release candidate 1)

2021-05-13 Thread Julian Hyde
Let’s not have a discussion on the vote thread. Feel free to start a new thread, or continue an existing discussion thread. To re-state the rules. Every PMC member has a binding vote. The vote passes if the number of +1 votes exceeds the number of -1 votes by 3 or more. Vladimir is entitled to

Re: Using Calcite as a Distributed Optimizer

2021-05-13 Thread Julian Hyde
Calcite has no user@ list. So, ask away here! > On May 13, 2021, at 10:52 AM, Atri Sharma wrote: > > Sorry, didn't realize I had sent to the dev list. I will send to the user > list > > On Thu, 13 May 2021, 15:57 Atri Sharma, wrote: > >> Hi All, >> >> Are there examples of using Calcite to

Re: Proposal to extend Calcite into a incremental query optimizer

2021-05-13 Thread Julian Hyde
;>> Hello, >>>> >>>> I really regret missing the first meeting, sorry about that. I added my >>>> preferences in the document. >>>> I will make sure to attend the next one and help as much as I can. >>>> >>>> I didn

Re: [VOTE] Release apache-calcite-avatica-1.18.0 (release candidate 1)

2021-05-12 Thread Julian Hyde
; OS: Mac OS X 10.15.7 x86_64 > > $ sw_vers > > ProductName: Mac OS X > > ProductVersion: 10.15.7 > > BuildVersion: 19H524 > > > Best regards, > > Alessandro > > On Wed, 12 May 2021 at 08:41, Julian Hyde wrote: > >> +1 (bindin

Re: [VOTE] Release apache-calcite-avatica-1.18.0 (release candidate 1)

2021-05-11 Thread Julian Hyde
+1 (binding) Checked hashes & signature. Compiled & ran tests on Linux / JDK 8, JDK 11, OpenJDK 15 / Gradle 6.8.1. Checked LICENSE, NOTICE. Ran rat. Checked build instructions. Checked that contents of tar.gz match git commit (except for gradle wrapper, licenses, fonts). Thank you, Francis! Juli

Re: [CANCEL][VOTE] Release apache-calcite-avatica-1.18.0 (release candidate 0)

2021-05-11 Thread Julian Hyde
I have created https://github.com/apache/calcite-avatica/pull/144 <https://github.com/apache/calcite-avatica/pull/144> with fixes for those two issues. I think we’re good to go for RC 1. Julian > On May 10, 2021, at 5:01 PM, Julian Hyde wrote: > > OK, thanks. > > I wi

Re: [CANCEL][VOTE] Release apache-calcite-avatica-1.18.0 (release candidate 0)

2021-05-10 Thread Julian Hyde
OK, thanks. I will fix those 2 issues in the next day or two, then let’s do a new RC. > On May 10, 2021, at 3:33 PM, Francis Chuang wrote: > > The vote for apache-calcite-avatica-1.18.0 (release candidate 0) has been > cancelled pending the resolution of the following issues: > - https://issue

Re: [VOTE] Release apache-calcite-avatica-1.18.0 (release candidate 0)

2021-05-10 Thread Julian Hyde
uid [ultimate] Francis Chuang > ssb rsa4096 2018-04-16 [E] > > This is the entry in KEYS: > -END PGP PUBLIC KEY BLOCK- > > pub rsa4096/3A970AB7 2018-04-16 [SC] > uid [ultimate] Francis Chuang > sig 33A970AB7 2018-04-16 Francis Chuang

Re: Question about Calcite History

2021-05-06 Thread Julian Hyde
ect entered the incubator in 2014, I > believe the development started a couple years earlier, but I'll leave > Julian Hyde (the original author of Optiq) to answer. > -- > Michael Mior > mm...@apache.org > > Le jeu. 6 mai 2021 à 09:47, Michael Mior a écrit : >> >>

Re: Trait propagation in heterogeneous plans

2021-05-05 Thread Julian Hyde
ribution or figure out how to > "externalize" the trait propagation for Enumerable operators, we may relax > this statement. > > Please let me know if it makes any sense. > > Regards, > Vladimir. > > вт, 4 мая 2021 г. в 21:02, Julian Hyde : > >>>

Re: RelFieldTrimmer throws an exception in certain cases

2021-05-05 Thread Julian Hyde
e/CALCITE-4596 > <https://issues.apache.org/jira/browse/CALCITE-4596> > > -- > Regards, > Konstantin Orlov > > > >> On 4 May 2021, at 21:29, Julian Hyde wrote: >> >> Regardless of which direction we go (allowing zero-field record types, or >> disallo

[jira] [Created] (CALCITE-4597) Allow RelNodes to have an empty row type (zero fields)

2021-05-05 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4597: Summary: Allow RelNodes to have an empty row type (zero fields) Key: CALCITE-4597 URL: https://issues.apache.org/jira/browse/CALCITE-4597 Project: Calcite

Re: RelFieldTrimmer throws an exception in certain cases

2021-05-04 Thread Julian Hyde
Regardless of which direction we go (allowing zero-field record types, or disallowing them), Konstantin has found a bug. Konstantin, can you log it, please. On 2021/04/29 14:25:27, Konstantin Orlov wrote: > Hi all. > > I faced a problem preventing certain queries being planned because > RelF

Re: Trait propagation in heterogeneous plans

2021-05-04 Thread Julian Hyde
> I would say known in-core vs unknown trait is a reasonable approach to > distingush traits. Easy, but not reasonable. It will make it very difficult to reuse existing rels and rules (e.g. Enumerable) in a downstream project that has defined its own traits. On Tue, May 4, 2021 at 10:44 AM Vladim

Sorting XML resource files

2021-05-04 Thread Julian Hyde
Please review CALCITE-4593 [1] and its PR [2]. I would like to squash and merge in 24 hours. Note that this change sorts several major src/test/resources/*/*.xml files, so it will not merge cleanly with other PRs. (But the whole point of this change is that such files will merge cleanly in future.

Re: Trait propagation in heterogeneous plans

2021-05-04 Thread Julian Hyde
It seems arbitrary to include Collation but exclude other traits. Convention is, and should remain, the only “special” trait. Distribution does apply to Enumerable operators. Other traits, including those defined by the user without modifying core Calcite, should also be supported. I acknowledg

[jira] [Created] (CALCITE-4594) Interpreter returns wrong result when Values has zero fields

2021-05-03 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4594: Summary: Interpreter returns wrong result when Values has zero fields Key: CALCITE-4594 URL: https://issues.apache.org/jira/browse/CALCITE-4594 Project: Calcite

Re: RelFieldTrimmer throws an exception in certain cases

2021-05-03 Thread Julian Hyde
che/calcite/blob/4bc916619fd286b2c0cc4d5c653c96a68801d74e/core/src/main/java/org/apache/calcite/interpreter/ValuesNode.java#L56> > On May 3, 2021, at 2:55 PM, Julian Hyde wrote: > > I am inclined to be brave and idealistic: officially allow records with no > fields, and add enough

Re: RelFieldTrimmer throws an exception in certain cases

2021-05-03 Thread Julian Hyde
ssues. > > But since the benefits are not clear and the effort required seems to be > bigger, the more rational option is to ban them. > > -- > Regards, > Konstantin Orlov > > > > >> On 2 May 2021, at 01:30, Julian Hyde wrote: >> >> Here's a v

Re: How to match root node in a HEP Rule?

2021-05-03 Thread Julian Hyde
> Is there a way to identify a node as being a root node during RelRule.match? Not currently. One workaround would be to create 'class MyRoot extends SingleRel', add it as the root of the tree, and write your rules to match on it. > Or more generally, is there a way to collect the parents of an a

Re: Support for JSON path expressions in select queries.

2021-05-03 Thread Julian Hyde
If we add native JSON syntax to SQL, it is very likely that there will be ambiguities. I think our best path for JSON support is to follow the SQL standard (and perhaps some extensions made by other major DBs), which consists of a set of functions to handle JSON. Quite a few of those functions acce

<    5   6   7   8   9   10   11   12   13   14   >