Re: Release managers

2019-12-06 Thread Julian Hyde
I was mistaken in saying that only a PMC can sign a release. Any committer may be a release manager, and sign the release. In http://www.apache.org/dev/release-publishing.html#release_manager: "Any committer may serve as the manager of a release" Julian On Fri, Dec 6, 2019 at 9:41 AM Vladimir

Re: Updating the Website

2019-12-09 Thread Julian Hyde
We might be inventing requirements here, in order to justify a “cool” technical change. I don’t think there is a strong requirement for multiple versions of the site. (Sure, it would be nice.) This thread started with Stamatis pointing out that it was complicated to update the site. If we supp

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

2019-12-09 Thread Julian Hyde
+0 I’m curious why the instructions include ‘-Prelease’. People should be able to unpack and build the distribution and do a ’normal’ build. Sure, it is useful to be able to reproduce the release build, but it’s much more important that a normal build works. And, related, I would not include

Re: Quicksql

2019-12-09 Thread Julian Hyde
k so it is totally distributed. The user >> doesn't need to aware of where the table is from. >> > > I understand that the Spark convention Calcite has attempts to achieve the > same goal, but it isn't fully implemented yet. > > > On Tue, Oct 29, 20

Re: Quicksql

2019-12-10 Thread Julian Hyde
) > > > —Z > > > On Dec 9, 2019, at 9:05 PM, Julian Hyde wrote: > > > > Yes, virtualization is one of Calcite’s goals. In fact, when I created > > Calcite I was thinking about virtualization + in-memory materialized views. > > Not only the Spark conv

Re: Line endings for source files on Windows

2019-12-12 Thread Julian Hyde
I think a source distribution should contain the raw, unprocessed source files. The contents of the .zip and .tar.gz should be identical. If people want to change line endings they can do it for themselves. Or use an appropriate git setting. > On Dec 12, 2019, at 1:03 AM, Francis Chuang wro

Re: Line endings for source files on Windows

2019-12-12 Thread Julian Hyde
The git repo, at a particular commit, has an objective contents. I suspect that when you use ‘git checkout’ with particular options, you don’t get those objective contents, you get something customized for your line-ending preference. > On Dec 12, 2019, at 7:46 AM, Vladimir Sitnikov > wrote:

Re: Line endings for source files on Windows

2019-12-12 Thread Julian Hyde
The main purpose of the source distribution is to have legal record of the release, and something from which people could re-create the release if GitHub and all mirrors thereof were to disappear. For all other purpose, just use git. So, I see no reason to create different source distributions

Re: Line endings for source files on Windows

2019-12-12 Thread Julian Hyde
No, I’m going to ignore this trolling. > On Dec 12, 2019, at 11:57 AM, Vladimir Sitnikov > wrote: > > Julian>For all other purpose, just use git. > > "use git" contradicts with > http://www.apache.org/legal/release-policy.html#publication > > legal/release-policy> Projects MUST direct outside

Re: [DISCUSS] Tests vs multiline strings

2019-12-15 Thread Julian Hyde
I don't think we should do this. Multi-line strings are a bit unwieldy, but they're not a major problem. Transitioning our tests to a different language (Kotlin) is a drastic solution. It requires developers to understand a new language, and it loses all history from the source files. Julian On

Re: How to keep quotes in SqlIdentifier?

2019-12-15 Thread Julian Hyde
I bet that the SqlIdentifier for the first item in the SELECT clause has one component, and that component is quoted: SqlIdentifier id; id.isComponentQuoted(0); // evaluates true The name of the component will be "sql" (without back-ticks). The second item will also have one component, not q

[DISCUSS] Remove Kotlin

2019-12-16 Thread Julian Hyde
Vladimir proposed that we convert some tests to Kotlin. The general reaction was against the idea[1]. After receiving this feedback, he went ahead anyway[2]. I propose that we remove all Kotlin from our source code, including tests. The benefits of being a hybrid Java+Kotlin project do not outwe

Re: [DISCUSS] Move CalciteAssert and similar "test framework" classes to its own testlib module

2019-12-17 Thread Julian Hyde
It probably makes sense. But I am exhausted, utterly exhausted, with the "moving stuff around" that Vladimir has done over the last few months. For example. I ran into a problem running SqlPrettyWriterTest a few days ago[1] that did not exist a few months ago (before the gradle/junit upgrade). Af

Re: [ANNOUNCE] New Calcite PMC chair: Stamatis Zampetakis

2019-12-19 Thread Julian Hyde
Glad to have you as the new chair, Stamatis! You have been a mature, helpful and moderating voice in the community for quite some time. Well deserved. Francis, thank you for serving as chair. Calcite became better and stronger under your watch. I am delighted that we have had 5 chairs in the f

Re: [DISCUSS] Restart the work of introducing TIME/TIMESTAMP WITH TIME ZONE types to Calcite

2019-12-19 Thread Julian Hyde
It would be great to have a timestamp type with (timeZone, number) data content, and also a timestamp type with (number) content and “instant” semantics, in addition to the current timestamp that has (number) content and “zoneless” semantics. (I’m avoiding labeling these with SQL type names, sin

Re: [DISCUSS] Towards Avatica-Go 5.0.0

2019-12-19 Thread Julian Hyde
Sounds good. > On Dec 18, 2019, at 2:17 PM, Francis Chuang wrote: > > Now that Avatica 1.16.0 is just about to be wrapped up, it's time to talk > about the next release for Avatica-Go, 5.0.0. > > Most of the changes are already in place and I will add Avatica-1.16.0 as a > test target. > > T

Re: [DISCUSS] Remove Kotlin

2019-12-19 Thread Julian Hyde
A live meeting is a good idea. Email discussions tend to make people seem more dogmatic than they really are, because everyone focuses on the 10% of the argument they disagree with, rather than the 90% they agree with. I will endeavor to attend. Julian > On Dec 19, 2019, at 12:06 PM, Kevin Ri

Re: [DISCUSS] CALCITE-2450 reorder predicates to a canonical form

2019-12-30 Thread Julian Hyde
I think this proposed change does more harm than good. I agree with the arguments that Danny and Stamatis have made. We should not do this. > On Dec 30, 2019, at 9:32 AM, Vladimir Sitnikov > wrote: > > Technically speaking, I would love to refrain from using toString for > equals/hashCode, ho

Re: Some question about lattices

2019-12-30 Thread Julian Hyde
(Removing users@. This only needs to be on one list.) Have you tried reading LatticeTest? You can see how APIs are used. I added QuerySqlStatisticProvider recently. Maybe QuerySqlStatisticProvider.SILENT_CACHING_INSTANCE meets your purposes. Julian > On Dec 29, 2019, at 11:03 PM, JiaTao Tao

Re: [QUESTION] How could getTableName(columnIndex) return the correct result?

2020-01-06 Thread Julian Hyde
JDBC table names and column names are of limited use. They tell you where a particular column comes from, and your “a” column does not come (directly) from a table. I think you’ll find that Calcite is implementing the JDBC standard correctly, and is consistent with other databases. What do you

Re: Draft board report for January 2020

2020-01-06 Thread Julian Hyde
Is it worth mentioning that we have a new PMC chair? (Of course you’re too modest to mention it.) I am proud of the fact that we change the chair annually, and are now on our fifth (distinct) chair. Orderly transfer of power is a mark of a stable democracy. > On Jan 5, 2020, at 2:29 AM, Stamat

Re: [discuss] Enhanced MATH Function

2020-01-06 Thread Julian Hyde
I agree, let’s drive from the SQL standard or what other databases do, rather than driving from what Java has. If other DBs support a particular function, and are consistent, then that is a good argument for adding it to Calcite. I rather like the way that we categorize extensions into “librarie

Re: [DISCUSSION] Wrong GROUP_ID function

2020-01-06 Thread Julian Hyde
In the JIRA case, I’ve proposed a rewrite that I think would allow us to implement GROUP_ID without any changes to Aggregate. > On Dec 31, 2019, at 12:07 AM, Feng Zhu wrote: > > Recently, we encounter a problem caused by some inconsistency query results. > After some investigations, I find the

Re: [QUESTION] How could getTableName(columnIndex) return the correct result?

2020-01-06 Thread Julian Hyde
m throw NPE, but empty string from DBs avoid this case. > > > Julian, very appreciated your help. :-) > > > Best wishes, > Trista > > > Juan Pan (Trista) > > Senior DBA & PPMC of Apache ShardingSphere(Incubating) > E-mail: panj...@apache.org > > >

Re: [QUESTION] How could getTableName(columnIndex) return the correct result?

2020-01-07 Thread Julian Hyde
f Calcite? > > > Juan Pan (Trista) > > Senior DBA & PPMC of Apache ShardingSphere(Incubating) > E-mail: panj...@apache.org > > > > > On 01/7/2020 11:17,Julian Hyde wrote: > Yes, we should be returning “” rather than null. > > (Not an excuse, but that meth

Re: [DISCUSS] RelOptTableImpl#toRel vs EnumerableTableScan

2020-01-07 Thread Julian Hyde
The toRel method was intended to save the effort of writing a rule. It's easy to write a rule that matches particular types of RelNode (e.g. a Filter on a TableScan) but it's harder to write a rule that matches a particular kind of Table inside a TableScan. If we can obsolete the toRel method with

Re: [discuss] Implement Presto adapter

2020-01-09 Thread Julian Hyde
Sounds like you are planning to target Presto’s internal engine rather than Presto the database. To clarify, can you give an example of the code that you would generate and send to Presto for a simple SQL query? Julian > On Jan 9, 2020, at 5:07 AM, Forward Xu wrote: > > Hi, Stamatis > > Bec

Re: [discuss] Implement Presto adapter

2020-01-10 Thread Julian Hyde
]. > > > > Best, > > Forward > > > > [1] > > https://www.codota.com/code/java/methods/com.facebook.presto.spi.Plugin/getConnectorFactories > > [2] > > https://www.programcreek.com/java-api-examples/?code=y-lan/presto/presto-master/presto-raptor/src/main

Re: [DISCUSS] Proposal to add API to force rules matching specific rels

2020-01-12 Thread Julian Hyde
> MEMO group (RelSet) represents logically equivalent expressions. > All the expressions in one group should share the same logical > properties, e.g. functional dependency, constraint properties etc. > But they are not sharing it. Computation is done for each individual operator. It's good, and c

Re: Contributors of 2019

2020-01-13 Thread Julian Hyde
The thing that most surprised me was the length of the list. It is impressive that we have so many distinct contributors. Every one of those single-contribution contributors could potentially become a regular contributor. Julian > On Jan 12, 2020, at 6:24 PM, Chunwei Lei wrote: > > Thank you

Re: Why Apache Spark doesn't use Calcite?

2020-01-13 Thread Julian Hyde
In the earliest days they had Shark (a Spark back-end hacked into Hive)[1]. So, they knew some people would want to use SQL. But I don’t think anyone realized how important SQL would become. I think they knew what they were getting with Catalyst. They wanted to make it easy to write transformat

Re: Contributors of 2019

2020-01-13 Thread Julian Hyde
the Calcite community in favor of the same emails cross both > email threads, code contributions and Jira? If so I probably should > update my git config to use the apache.org one. > > > -Rui > > > > > On Mon, Jan 13, 2020 at 12:37 PM Julian Hyde wrote: > >

Re: [DISCUSS] [CALCITE-3271] EMIT syntax proposal for event-timestamp semantic windowing

2020-01-21 Thread Julian Hyde
Does EMIT HAVING have anything to do with aggregate queries (GROUP BY and HAVING), or is it just a coincidence that you use the same word, HAVING? I support the idea of latency controls, but I am nervous about allowing full expressions in the EMIT clause if we don't have to. Aggregate queries hav

Re: [DISCUSS] [CALCITE-3271] EMIT syntax proposal for event-timestamp semantic windowing

2020-01-21 Thread Julian Hyde
columns added by EMIT. (I'm not saying we should do this. But when designing a feature, it's worth calling out whether it adds power or whether it is syntactic sugar.) On Tue, Jan 21, 2020 at 12:34 PM Julian Hyde wrote: > > Does EMIT HAVING have anything to do with aggregate querie

Re: Gradle documentation update

2020-01-21 Thread Julian Hyde
Fine, but be sure to take down 'site-new' when it gets stale. On Tue, Jan 21, 2020 at 9:40 AM Michael Mior wrote: > > Starting with the latest release, I cherry picked the commits which > were added on the site branch. I've pushed this as "site-new". While I > think there may be a better solution

Deprecated calls

2020-01-21 Thread Julian Hyde
Under maven, the build used to fail if code called deprecated methods. Yet apparently this does not happen under gradle: RelToSqlConverter[1] has final Project project2 = LogicalProject.create(sort2, project.getProjects(), project.getRowType()); and that particular LogicalProject.crea

Re: Calcite Adapter Question

2020-01-22 Thread Julian Hyde
I know that Drill uses Calcite for query planning, and therefore I expect that Drill’s adapter model is probably fairly similar to Calcite’s. In fact, I have long wished that we used the same adapter model, so that we could share adapters. Drill already uses Calcite as a runtime library, so tha

Re: Calcite Adapter Question

2020-01-22 Thread Julian Hyde
I know that Drill uses Calcite for query planning, and therefore I expect that Drill’s adapter model is probably fairly similar to Calcite’s. In fact, I have long wished that we used the same adapter model, so that we could share adapters. Drill already uses Calcite as a runtime library, so tha

Re: [DISCUSS] [CALCITE-3271] EMIT syntax proposal for event-timestamp semantic windowing

2020-01-22 Thread Julian Hyde
pport expressions, I hope we > do). > 2. Where is the EMIT clause? Maybe the most clear position is to put it > after FROM. > > > -Rui > > > On Tue, Jan 21, 2020 at 1:09 PM Rui Wang wrote: > >> >> >> On Tue, Jan 21, 2020 at 12:34 PM Julian Hyde

Autostyle errors on Windows

2020-01-28 Thread Julian Hyde
I'm running the build on Windows and getting autostyle failures. I'm using cygwin but otherwise it is a standard build. What am I doing wrong? $ java -version java version "13.0.2" 2020-01-14 $ git clone https://github.com/apache/calcite.git $ cd calcite $ ./gradlew build Execution failed for task

Re: Autostyle errors on Windows

2020-01-29 Thread Julian Hyde
What is in the file is fine, and yet autostyle is complaining. So I think it is a bug in our autostyle setup. I can't figure out how to disable autostyle. I've tried things like "gradlew -PskipAutostyle". Julian On Tue, Jan 28, 2020 at 11:39 PM Vladimir Sitnikov wrote: > > I guess it expects EO

Re: Autostyle errors on Windows

2020-01-29 Thread Julian Hyde
re.eol *from your git config. > > On Wed, Jan 29, 2020 at 10:03 AM Julian Hyde wrote: > > > What is in the file is fine, and yet autostyle is complaining. So I > > think it is a bug in our autostyle setup. > > > > I can't figure out how to disable autostyle. I

Re: Is CBO really useful(you can not estimate cost very well )?

2020-02-04 Thread Julian Hyde
Runtime optimization is important too. Examples include the DB’s buffer cache (predicting future disk accesses based on previous accesses using e.g. LRU2) and self-tuning algorithms such as hybrid hash join (which figures out what key to use to partition, and which side of a join to build, based

Re: Gradle documentation update

2020-02-06 Thread Julian Hyde
No objection to SQLLine printing some helpful instructions, as long as there is a way for more advanced users to turn it off. I can’t think of a mechanism in SQLLine to run a startup script, but there probably is one. > On Feb 6, 2020, at 1:55 AM, Vladimir Sitnikov > wrote: > >> If you notic

Re: [DISCUSS] Towards Calcite 1.22

2020-02-06 Thread Julian Hyde
5]) release. > > Please let me know what you think and apologies for the inconvenience. > > Andrei. > > > On Wed, Dec 4, 2019 at 4:55 PM Julian Hyde wrote: > > > I don’t mind whether the release happens in December or January, but > > either way, let’s start burn

Re: Test results and stacktraces in Gradle output

2020-02-10 Thread Julian Hyde
The coloring is helpful; thanks! I had been finding it difficult to identity failures in a the shell when there is a lot of output. > On Feb 10, 2020, at 10:52 AM, Vladimir Sitnikov > wrote: > > Hi, > > I've recently committed a change that improves test results and stacktraces > in the buil

Re: [DISCUSS] Towards Calcite 1.22

2020-02-10 Thread Julian Hyde
It would be helpful for us to test third-party projects. But equally, it is useful for third-party projects to test against us. (Especially non-open-source ones, which we cannot test.) I strongly suggest that owners of those projects do a build and test against Calcite master about 3 weeks befo

Re: [DISCUSS] Deprecate TableScanRule

2020-02-10 Thread Julian Hyde
Discussion moved to https://issues.apache.org/jira/browse/CALCITE-3769 . (For the benefit of those reading the archive.) > On Feb 4, 2020, at 3:25 AM, Danny Chan wrote: > > The TableScanRule is the only planner rule that for a logical node(e

Re: Current status of Streaming SQL standardrization

2020-02-10 Thread Julian Hyde
The SQL standards process has a working group on streaming SQL. I am a member of that working group, along with people from Beam, Flink and Kafka communities. We are also encouraging folks from Spark to join the working group. The working group is having regular meetings, but things are at an ea

Re: Current status of Streaming SQL standardrization

2020-02-10 Thread Julian Hyde
I don’t think so. > On Feb 10, 2020, at 5:06 PM, Shuyi Chen wrote: > > Hi Julian, Thanks a lot for the info. I am wondering if there is a channel > that I can follow to get update on the status. > > Shuyi > > On Mon, Feb 10, 2020 at 4:51 PM Julian Hyde wrote: > &

Re: Support unnest multiple array columns

2020-02-11 Thread Julian Hyde
I haven't tried it, but I'd guess that you join to each separately, i.e. take the cartesian product: SELECT numbers, animals, n, a FROM ( VALUES (ARRAY[2, 5], ARRAY['dog', 'cat', 'bird']), (ARRAY[7, 8, 9], ARRAY['cow', 'pig']) ) AS x (numbers, animals) CROSS JOIN UNNEST (numbers) AS t1 (

Re: Support unnest multiple array columns

2020-02-12 Thread Julian Hyde
CROSS JOIN UNNEST(array_of_structures_with_properties_a_b_and_c) AS >> some_nonused_identifier(t) >> > > To resolve such differences, we would like to implement a new conformance > and validation logics to reflect differences above. > > Regarding Sql To Rel, I am sti

Re: Support unnest multiple array columns

2020-02-12 Thread Julian Hyde
> Hmm, man, there seems no UNNEST in Hive. But maybe it's introduced in a new > version. I was mistaken. It’s PostgreSQL that has an UNNEST function and allows it in the SELECT clause [1]. Hive allows table functions in the SELECT clause, which has similar problems of multiplying rows [2].

Re: Not able use PostgresDialect.

2020-02-13 Thread Julian Hyde
Note that Calcite's default parser only parses SQL in Calcite's dialect (with a little leeway such as choice of quoting characters). To parse other dialects, use the Babel parser. It can handle (or could handle) SQL extensions that are not in standard SQL and which we don't want to bring into Calc

Re: A case for having pom.xml files: GitHub dependency graph

2020-02-16 Thread Julian Hyde
No, I think we should single-source. Checking in Pom.xml files will cause confusion whether we are a maven or gradle project. Julian > On Feb 16, 2020, at 10:03 AM, Vladimir Sitnikov > wrote: > > Hi, > > GitHub has a dependency graph feature (see [1]) which can show dependency > informatio

Re: Talk about Calcite at University of Cergy-Pontoise (France) on 3 March 2020

2020-02-16 Thread Julian Hyde
I tweeted about this talk: https://twitter.com/ApacheCalcite/status/1228821315005497344 > On Feb 15, 2020, at 3:14 AM, Danny Chan wrote: > > Thanks for the share, look forward to the talk! > > Stamatis Zampetakis 于2020年2月15日 周六下午

Re: [ DISCUSS ] Revert change: CALCITE-3713 Remove column names from Project#digest

2020-02-17 Thread Julian Hyde
I can imagine that changing a lot of log files is painful to the Flink project. There’s no reason to force them to do it right away. I think a config parameter is fine. How about making it deprecated or experimental, to discourage others from using it? And state that it is going to be removed b

Re: Correlation with a variable

2020-02-18 Thread Julian Hyde
It’s worth separating this into (a) what the parser should do (i.e. how we represent this in SqlNode land) and (b) how we represent this in RexNode/RelNode land. I think the parser should generate some flavor of SqlDynamicParam. Currently these only have ‘int index’ but we’d need to hold old/ne

Re: Correlation with a variable

2020-02-19 Thread Julian Hyde
its in keeping a single RexNode class for > parameters so I am fine with whatever decision we take in the end. > > Best, > Stamatis > > On Tue, Feb 18, 2020, 9:18 PM Julian Hyde wrote: > > > It’s worth separating this into (a) what the parser should do (i.e. how we > &

Re: Translation of SQL EXISTS

2020-02-19 Thread Julian Hyde
Agreed, it should be in reverse order. Translate to semi-join (or anti-join for NOT EXISTS), then optionally use a rule to rewrite semi- or anti-join to Join+Aggregate. Note that if the EXISTS is in a disjunction (e.g. "delete from orders where exists (select null from order_items where ...) or sh

[DISCUSS] Refactor how planner rules are parameterized

2020-02-20 Thread Julian Hyde
I have an idea for a refactoring to RelOptRule. I haven’t fully thought it through, but I’m going to sketch it out here to see whether folks agree about the problems/solutions. It will be a breaking change (in the sense that people will have to change their code in order to get it to compile) b

Re: Calcite equivalent for Select CONVERT date formatter

2020-02-20 Thread Julian Hyde
Which DBMS is that SQL for? In standard SQL and Calcite (and Oracle [1]), the CONVERT function changes the encoding of a character string. But I don’t think you mean that. Julian [1] https://docs.oracle.com/cd/B28359_01/server.111/b28286/functions027.htm#SQLRF00620

Re: Date and time formats in the standard operator table

2020-02-20 Thread Julian Hyde
I don’t think there’s a standard, and we wouldn’t be solving the problem if we create our own “standard”. (See https://xkcd.com/927/ .) So it’s better to implement everyone else’s “standard” and let our users choose. It would be a great start if someone were to contribute

Re: [DISCUSS] Towards Calcite 1.22.0

2020-02-20 Thread Julian Hyde
+1 to Danny’s timetable (RC on 2/24, release by 2/29). We can have a quick 1.23 (say 1 month after 1.22) if there are important PRs that we don’t have time for this release. Of course we still have to find reviewers for those PRs. Julian > On Feb 19, 2020, at 11:18 PM, Danny Chan wrote: > >

Re: Translation of SQL EXISTS

2020-02-20 Thread Julian Hyde
bout what you wrote here already Julian, but thanks for mentioning > it. > > Would be great if this could make it into 1.22.0, or is it too late for that > already? > > Am 19.02.2020 um 22:49 schrieb Julian Hyde: >> Agreed, it should be in reverse order. Translate to

[DISCUSS] Commit messages, again

2020-02-21 Thread Julian Hyde
Committers, please remember that every time you accept a change, you are writing the release notes. The commit messages will end up here: https://calcite.apache.org/docs/history.html So, those commit messages need to make sense to end users. This is important because, as a project, we write very

Re: [DISCUSS] Commit messages, again

2020-02-21 Thread Julian Hyde
ould expect at least one +1 from other committers before merging the PR. > Issues with the commit message would have been raised up if there was a > proper code review. > > > > On Feb 21, 2020, at 9:47 AM, Julian Hyde wrote: > > > > Committers, please remember that every

Re: [DISCUSS] Commit messages, again

2020-02-21 Thread Julian Hyde
alcite has well passed that stage. > > >> On Feb 21, 2020, at 1:05 PM, Julian Hyde wrote: >> >> I don't think a code review would necessarily have solved this one. >> Especially if the reviewer focused on the code and tests, as reviewers >> often do. &

Re: Support unnest multiple array columns

2020-02-24 Thread Julian Hyde
! > > On Wed, Feb 12, 2020 at 12:46 PM wmy7ymw <mailto:wmy7...@gmail.com>> wrote: > >> Got it. Good to learn these usages. Thanks for sharing. >> >> On Wed, Feb 12, 2020 at 12:22 PM Julian Hyde > <mailto:jh...@apache.org>> wrote: >> >&g

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

2020-02-25 Thread Julian Hyde
-1 The consensus on the thread of the 1.20 RC 0 vote was that we would fix it by next release, i.e. 1.21. We can't make another release containing category B artifacts. I have logged https://issues.apache.org/jira/browse/CALCITE-3822 to track this. Julian On Tue, Feb 25, 2020 at 7:29 AM Anton

Re: [DISCUSS] Code freeze policy during release

2020-02-26 Thread Julian Hyde
This thread sums up the rationale: https://lists.apache.org/thread.html/b49639d926e64955cdca49aca1d2183f00812b54d2d5957499d39c9f%40%3Cdev.calcite.apache.org%3E If someone commits to master during the release process we either have to rebase master, do a merge commit, or have a release that is not

Re: [VOTE] Release apache-calcite-1.22.0 (release candidate 2)

2020-02-27 Thread Julian Hyde
Danny I agree that a -1 is disheartening. Especially when given for mistaken reasons. Technically a -1 does not kill an RC. We just need 3 more +1 votes than -1 votes. I urge everyone to give detailed rationale for their vote. Even if you vote +1, describe what you checked. Julian > On Fe

Re: [DISCUSS] Code freeze policy during release

2020-02-27 Thread Julian Hyde
I think the best course is that the release manager (Danny) rebases master after the RC has been accepted, just before he re-openes the master branch. The SHAs of your commits will change, but this is unavoidable. > On Feb 27, 2020, at 10:58 AM, Jesus Camacho Rodriguez > wrote: > > I had not

Re: [DISCUSS] Code freeze policy during release

2020-02-27 Thread Julian Hyde
s > > On Thu, Feb 27, 2020 at 1:38 PM Julian Hyde wrote: > >> I think the best course is that the release manager (Danny) rebases master >> after the RC has been accepted, just before he re-openes the master branch. >> The SHAs of your commits will change, but this is u

Re: Travis filed: net.hydromatic.foodmart.queries does not exist

2020-02-27 Thread Julian Hyde
I’ll take a look tomorrow. Julian > On Feb 27, 2020, at 8:06 PM, Danny Chan wrote: > > The Travis failed recently very frequently, such as > https://travis-ci.org/apache/calcite/jobs/656071104?utm_medium=notification&utm_source=github_status > > It always reports net.hydromatic.foodmart.que

Re: Calcite 1.22 maven package

2020-02-28 Thread Julian Hyde
We are in the process of creating release candidates and voting on them. There is a 1.22 tag on GitHub but it is going to change until we have a successful candidate. To find out when there is a release, subscribe to this list (or annou...@apache.org [1]) and look f

Re: [VOTE] Release apache-calcite-1.22.0 (release candidate 2)

2020-02-29 Thread Julian Hyde
The advantage of a release branch is that we don’t need to force-push to master when we make a mistake. Let’s continue to use a release branch. Julian > On Feb 29, 2020, at 07:25, Stamatis Zampetakis wrote: > > In the last release of avatica we didn't release two archives in the end > (but

Re: Travis filed: net.hydromatic.foodmart.queries does not exist

2020-02-29 Thread Julian Hyde
, at 1:12 AM, Danny Chan wrote: > > That was great, thanks Julian for your spare time work ! > > Best, > Danny Chan > 在 2020年2月28日 +0800 PM3:58,Julian Hyde ,写道: >> I’ll take a look tomorrow. >> >> Julian >> >>> On Feb 27, 2020, at 8:06

Re: [ANNOUNCE] New committer: Feng Zhu

2020-02-29 Thread Julian Hyde
Congratulations, thanks, and welcome! Feng, I wasn’t aware of Tencent’s SuperSQL project. It would be a great addition to the “powered by” page. If you would like to add it, please create a PR to add a paragraph to that page (no need for a JIRA case), and provide a link to a logo for Tencent th

Re: [ANNOUNCE] New committer: Feng Zhu

2020-02-29 Thread Julian Hyde
PS This is the “powered by” page: https://calcite.apache.org/docs/powered_by.html <https://calcite.apache.org/docs/powered_by.html> > On Feb 29, 2020, at 3:32 PM, Julian Hyde wrote: > > Congratulations, thanks, and welcome! > > Feng, I wasn’t aware of Tencent’s SuperSQL

Re: Travis filed: net.hydromatic.foodmart.queries does not exist

2020-02-29 Thread Julian Hyde
OK, clearing the cache seems to have done the trick. “master” and “branch-1.22” both had built successfully. > On Feb 29, 2020, at 3:26 PM, Julian Hyde wrote: > > I couldn’t see anything wrong with our code, and the library is still present > in maven central. So the most likely

Re: [VOTE] Release apache-calcite-1.22.0 (release candidate 3)

2020-03-02 Thread Julian Hyde
It's good to find bugs like this, but it's depressing to only be finding them in RC3. The bug probably existed in RC0, RC1 and RC2. If there are lots of release iterations our volunteers start to burn out. Folks, if you have an extensive test suite please run it as early in the process as you can,

Re: [VOTE] Release apache-calcite-1.22.0 (release candidate 3)

2020-03-02 Thread Julian Hyde
On Mon, Mar 2, 2020 at 11:43 AM Anton Haidai wrote: > > Sorry for reporting the bug too late, but the test that detected it was > related to a new feature of our system finalized just days ago so the right > test was not there when I voted on RC1. Ah, makes sense.

Re: [VOTE] Release apache-calcite-1.22.0 (release candidate 3)

2020-03-02 Thread Julian Hyde
+1 (binding) I downloaded, checked LICENSE, NOTICE, copyright dates, built & ran tests using JDK 13 on Ubuntu Linux. Release notes need some work: * Back-quotes around keywords and identifiers, * capitalize SQL keywords, * add brackets around JIRA cases, * wrap lines to ~80, * remove raw HTML cha

Re: SQL has order by, there will be one more column(the sort column) in result plan

2020-03-04 Thread Julian Hyde
There is a class RelRoot that wraps the top-most RelNode, and projects away columns that are only used for sorting. Read through https://issues.apache.org/jira/browse/CALCITE-2999 , where someone had the same misunderstanding that you have.

Re: Increasing number of concurrent queries

2020-03-04 Thread Julian Hyde
Enumerable is flawed because it uses the Volcano execution model, which requires blocking threads. Interpreter might be a better execution model. Take a look at org.apache.calcite.interpreter.Node. The ‘run()’ method returns void but we could make it return boolean, where ‘false’ means ‘I’m not

Re: Why can't RexLiteral.getValue2() get a double/float value?

2020-03-04 Thread Julian Hyde
As the java doc says, RexLiteral.getValue2 returns values in the form that the calculator builder needs them. That may not be the form that you need them. In which case, don’t use that method. If you want a Double, have you tried literal.getValueAs(Double.class)? (We don’t tend to use Float and

Re: [RESULT] [VOTE] Release apache-calcite-1.22.0 (release candidate 3)

2020-03-05 Thread Julian Hyde
ase candidate and given >>> their comments and votes. >>> >>> The tally is as follows. >>> >>> 4 binding +1s: >>> Danny Chan >>> Vladimir Sitnikov >>> Francis Chuang >>> Julian Hyde >>> >>> 5 non-

Re: [DISCUSS] Should RexSimplify retain the order of the predicates or not

2020-03-05 Thread Julian Hyde
Rex is not SQL. The SQL standard does not have a say in what is valid Rex. (Clearly we have to comply with the SQL standard, but we change the Rex that we generate for this.) We need some guarantee of ordering, for example the case you cite, where we check whether a reference is null before we

Re: [Feedback][Release] Some feedback when releasing v1.22.0

2020-03-06 Thread Julian Hyde
+1 to everything Michael said. Also… This release was hard because we let the date slip. Therefore there were more changes for Danny to deal with, more commit messages to edit, more regressions. We have been trying hard to keep the release tempo to two months. Let’s continue to strive for that.

Re: "lazy" optmization?

2020-03-06 Thread Julian Hyde
Runtime optimization is always necessary, because you just don’t have the stats until you run the query. The best DB algorithms are adaptive, and therefore hard to write. The adaptations require a lot of tricky support from the runtime - e.g. propagating bloom filters against the flow of data.

Re: [DISCUSS] Should RexSimplify retain the order of the predicates or not

2020-03-06 Thread Julian Hyde
; In your example with random(), I would expect it to execute twice because > random is not deterministic. > > On Thu, Mar 5, 2020, 13:15 Julian Hyde <mailto:jh...@apache.org>> wrote: > >> Rex is not SQL. The SQL standard does not have a say in what is valid Rex. >&g

Re: "lazy" optmization?

2020-03-09 Thread Julian Hyde
the specific rule: the query result of right table can be used as filters > for the left table? > > Thanks! > > > Julian Hyde 于2020年3月7日周六 上午1:48写道: > > > Runtime optimization is always necessary, because you just don’t have the > > stats until you run the query. The best D

Re: [Feedback][Release] Some feedback when releasing v1.22.0

2020-03-10 Thread Julian Hyde
Danny, Can you fix the tag please? Julian > On Mar 6, 2020, at 10:26 AM, Vladimir Sitnikov > wrote: > >> The RexNode normalization and project names remove from digest did change > a lot of plan from the Apache Flink side > > Hey Danny, I see it is dissatisfying, however, it is really sad y

Re: [Feedback][Release] Some feedback when releasing v1.22.0

2020-03-11 Thread Julian Hyde
My apologies. I had forgotten that “git fetch” does not fully synchronize tags. > On Mar 10, 2020, at 5:23 PM, Danny Chan wrote: > > I already fix that > > Julian Hyde 于2020年3月11日 周三上午2:00写道: > >> Danny, >> >> Can you fix the tag please? >> >>

Re: TableModify does not keep UPSERT keyword

2020-03-16 Thread Julian Hyde
Change the unparse operation for the dialect so that you generate UPSERT rather than MERGE. IIRC we did this for another dialect - maybe Phoenix. Julian > On Mar 16, 2020, at 1:22 AM, Enrico Olivelli wrote: > > Il Lun 16 Mar 2020, 09:06 Stamatis Zampetakis ha > scritto: > >> Hi Enrico, >

Re: TableModify does not keep UPSERT keyword

2020-03-17 Thread Julian Hyde
ostgresql.org/wiki/UPSERT > > Maybe it's worth adding that to the relational model after all? > > Am 17.03.2020 um 07:17 schrieb Enrico Olivelli: > > Il Lun 16 Mar 2020, 23:55 Julian Hyde ha scritto: > > > >> Change the unparse operation for the dialect so that yo

Re: Set of k-cheapest plans

2020-03-18 Thread Julian Hyde
There’s no easy way. You could modify ‘buildCheapestPlan()’ to build all plans below a cost limit. (You’d have to carefully choose a cost limit only a little above the optimal cost, otherwise you’ll get huge numbers of plans.) I fear that you’ll get plans that are different in only trivial or mi

Re: TableModify does not keep UPSERT keyword

2020-03-18 Thread Julian Hyde
t to a MERGE statement, it >> must at least be flagged to require atomicity to be able to generate the >> correct logic for the backend that this is running on. >> > > Please don't do this. > They are different features > MERGE is more powerful and it is also for

Re: STREAM keyword

2020-03-19 Thread Julian Hyde
We currently use “SELECT STREAM …” but we should move to “SELECT … EMIT STREAM” at some point, to be consistent with the paper. Your query is an excellent example of why “EMIT STREAM” is the right abstraction. order_item and product are time-varying relations. The query SELECT STREAM * FROM o

  1   2   3   4   5   6   7   8   9   10   >