Re: Stream SQL Workload

2018-11-20 Thread Julian Hyde
I believe that Beam and Flink use Nexmark http://datalab.cs.pdx.edu/niagara/pstream/nexmark.pdf https://issues.apache.org/jira/browse/BEAM-3147 Julian > On Nov 20, 2018, at 9:43 AM, Sher

Re: Contribution of IN operator handling

2018-11-20 Thread Julian Hyde
nOperator to In-Expression : > https://issues.apache.org/jira/browse/CALCITE-2630 > > Related. full table scans and subQueryThreshold. > https://lists.apache.org/thread.html/1a25c956262633f8ef0d224ed76400761f6797c494a21796579eb4f2@%3Cdev.calcite.apache.org%3E > > > > On Tue, Nov

Re: Contribution of IN operator handling

2018-11-20 Thread Julian Hyde
ach of adapters (Elastic, Geode, Mongo etc.) have to > implement their own version of converters (similar to RexToSqlConverter) ? > If it is a flat RexCall of ORs this should be doable, I guess. > > On Tue, Nov 20, 2018 at 2:14 PM Julian Hyde <mailto:jh...@apache.org>> wrot

Re: Contribution of IN operator handling

2018-11-20 Thread Julian Hyde
. > On Nov 20, 2018, at 1:21 PM, Julian Hyde wrote: > > Yes, the other adapters need to write their own converters, specific to their > target language. DB languages tend to be divergent in how they represent > “column in (constant1, …, constantN)”[1][2], so this makes sense. Of cou

Vote for SQLLine release 1.6.0

2018-11-21 Thread Julian Hyde
Calcite developers and users, I have just started a vote for sqlline-1.6.0 on the SQLLine dev list. If you are a SQLLine committer or user, please participate. Here is the thread: https://groups.google.com/forum/#!topic/sqlline-dev/SWHPzpyBwv0

Re: Vote for SQLLine release 1.6.0

2018-11-21 Thread Julian Hyde
to push this forward :) > > -- > Michael Mior > mm...@apache.org > > > Le mer. 21 nov. 2018 à 17:12, Julian Hyde a écrit : > >> Calcite developers and users, >> >> I have just started a vote for sqlline-1.6.0 on the SQLLine dev list. If >> you are

Re: [DISCUSS] Towards Avatica 1.13.0

2018-11-23 Thread Julian Hyde
e. >>> >>> Francis >>> >>> On 14/11/2018 2:15 am, Kevin Risden wrote: >>>> I checked my PRs and they can't be merged yet for various reasons. >>>> CALCITE-2322 would be good to get in. CALCITE-2412 I think is pretty close >>>

Re: [DISCUSS] Towards Avatica 1.13.0

2018-11-23 Thread Julian Hyde
rCheck > to be appended to all invocations of `mvn`. The fix for CALCITE-2698 removes > this check and allows docker hub to pass the avatica version to be used to > the dockerfile directly during a build. > > On 24/11/2018 5:41 am, Julian Hyde wrote: >> Are you aware that “m

Re: Calcite Streaming API documentation

2018-11-26 Thread Julian Hyde
This is up to date. In fact, in some places it is a little "visionary", that is, it goes further than Calcite actually supports. On Sun, Nov 25, 2018 at 8:08 PM Edmon Begoli wrote: > > Is this documentation the most up to date about Calcite Streaming features > and support, or are there any undocu

Re: MATCH_RECOGNIZE

2018-11-26 Thread Julian Hyde
; bit of support on this topic (In fact, it sounds like fun to us…). >Perhaps theres also the chance to learn something from Flinks > implementation, as you already had some contacts with them, I think? > >Best >Julian > >On 2018/07/23 17:53:57, Julian

Re: [DISCUSS] State of the project 2018

2018-11-26 Thread Julian Hyde
I second Francis’ nomination as PMC chair. I concur with others about what is good and bad about the project. We have a much higher rate of contributions this year than previous years - we are getting a lot of high-quality PRs out of the blue. This is excellent news for the project, because it

Re: [DISCUSS] Towards Avatica 1.13.0

2018-11-28 Thread Julian Hyde
to merge my PR for CALCITE-2698 [1] in > around 12 hours time and make rc0 available for voting. > > Francis > > [1] https://github.com/apache/calcite-avatica/pull/79 > > On 24/11/2018 1:03 pm, Julian Hyde wrote: >> Great, thanks. Just wanted to make sure I wasn’t th

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

2018-11-29 Thread Julian Hyde
+1 (binding) Downloaded, checked sigs, LICENSE & NOTICE, found build instructions via README. Built and ran tests using './mvnw install' as recommended in build instructions, using Oracle JDK 11 on Linux. Ran "mvn apache-rat:rat". Checked that .tar.gz contents match git commit 861d05a2d. Thank

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

2018-11-30 Thread Julian Hyde
PS I also confirmed that Calcite runs correctly against the candidate release; https://issues.apache.org/jira/browse/CALCITE-2716 references the Calcite branch. On Thu, Nov 29, 2018 at 10:31 AM Julian Hyde wrote: > > +1 (binding) > > Downloaded, checked sigs, LICENSE & NOT

Re: [DISCUSS] Towards Calcite 1.18

2018-11-30 Thread Julian Hyde
f so, I am able to be release manager for Avatica if no one else is >> interested. >> >> On 21/10/2018 6:13 PM, Michael Mior wrote: >>> Thanks for continuing to push releases forward! Unfortunately I won't be >>> able to volunteer to be release manager t

Re: Review Request (CALCITE-2689). ElasticSearch Adapter. Grouping on date / number fields.

2018-12-01 Thread Julian Hyde
Interesting. One of the benefits that a SQL layer such as Calcite can bring is that it hides the details necessary to make operations like this work. Julian > On Dec 1, 2018, at 5:22 AM, Kevin Risden wrote: > > I haven't had a chance to review but saw that Elastic has the same issue > with a

Re: [DISCUSS] Towards Calcite 1.18

2018-12-02 Thread Julian Hyde
Michael Mior wrote: > > Thanks Julian! Unfortunately with family visiting this weekend, my > > bandwidth is currently fairly low but I'll try to churn through some PRs > > early this coming week. > > > > On Fri, Nov 30, 2018, 23:00 Julian Hyde > > >>

Re: [DISCUSS] Support Higher-order functions

2018-12-03 Thread Julian Hyde
When someone mentions higher-order functions in SQL, I get excited and start thinking about the stuff in a good functional language like ML that I’m missing from SQL. For example, we might do something like this, using SQL’s “WITH" as the equivalent of ML’s “let” construct[1]: WITH VAL two

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

2018-12-04 Thread Julian Hyde
Hi all, I have created a build for Apache Calcite 1.18.0, release candidate 0. Thanks to everyone who has contributed to this release. With over 200 commits from 36 contributors, this is the largest Calcite release ever! You can read the release notes here: https://github.com/apache/calcite/blob/

Re: calcite git commit: Site: Link to SHA512 digest and remove link to Github commit per ASF policy

2018-12-04 Thread Julian Hyde
Hey, please don't commit to master while there's a vote pending. We'll have to merge or rebase master after the vote closes. On Tue, Dec 4, 2018 at 2:22 PM wrote: > > Repository: calcite > Updated Branches: > refs/heads/master efec74deb -> 30646adaa > > > Site: Link to SHA512 digest and remove l

Re: Mirroring JIRA/GitHub comments

2018-12-04 Thread Julian Hyde
I suspect that my practices are out of step with Michael's practices (and maybe other people's too). I prefer to work in JIRA as much as possible, using git's review mechanism only for critiques of individual lines. I do this because I like being able to see how a contribution evolved, and the reas

Re: calcite git commit: Site: Link to SHA512 digest and remove link to Github commit per ASF policy

2018-12-04 Thread Julian Hyde
I've created a JIRA case, a branch in my github fork containing your commit, and a PR. Let's commit this using the regular process after the release finishes. https://github.com/apache/calcite/pull/955 https://issues.apache.org/jira/browse/CALCITE-2725 I deleted the branch in ASF git. I don't th

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

2018-12-05 Thread Julian Hyde
ry is failing >> with >>>>> incorrect results. >>>>> >>>>> >>>> >>> >> https://github.com/apache/hive/blob/8e30b5e029570407d8a1db67d322a95db705750e/ql/src/test/queries/clientpositive/in_typecheck_mixed.q#L12 >>&

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

2018-12-05 Thread Julian Hyde
I am canceling the vote due to https://issues.apache.org/jira/browse/CALCITE-2726 <https://issues.apache.org/jira/browse/CALCITE-2726>. Thanks to all who voted. I should have a new RC in the next day or so. > On Dec 5, 2018, at 9:36 AM, Julian Hyde wrote: > > I co

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

2018-12-06 Thread Julian Hyde
OK, let's try again. I have created a build for Apache Calcite 1.18.0, release candidate 1. Thanks to everyone who has contributed to this release. Since RC 0, we have fixed the following issues: * [CALCITE-2726] ReduceExpressionRule oversimplifies filter conditions containing nulls * [CALCITE-2

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

2018-12-07 Thread Julian Hyde
t think I'll be uncovering any more > issues. > > Zoltan > > On 12/6/18 9:18 AM, Julian Hyde wrote: > > OK, let's try again. > > > > I have created a build for Apache Calcite 1.18.0, release candidate 1. > > > > Thanks to everyone who has

Re: [NOTICE] Mandatory relocation of Apache git repositories on git-wip-us.apache.org

2018-12-07 Thread Julian Hyde
+1 on early move It should be low-impact; probably only committers are using git-wip-us.apache.org anyway, everyone else is using github.com/apache/calcite. > On Dec 7, 2018, at 10:41 AM, Kevin Risden wrote: > > I'm +1 in moving before being forced to. I know a

[CANCEL] [VOTE] Release apache-calcite-1.18.0 (release candidate 1)

2018-12-07 Thread Julian Hyde
n Dec 7, 2018, at 10:17 AM, Julian Hyde wrote: > > OK, this is another showstopper. When you have a fix for > https://issues.apache.org/jira/browse/CALCITE-2731, can you please run > the full Hive test suite on the snapshot before we roll the next RC. > On Fri, Dec 7, 2018

Re: Sessionizing raw events / does Calcite support ARRAY_AGG?

2018-12-15 Thread Julian Hyde
As of https://issues.apache.org/jira/browse/CALCITE-2224 (to be released shortly in 1.18) Calcite supports the WITHIN GROUP clause (that allows you to specify the order in which values are supplied to an aggregate function) and the COLLECT aggregate function (similar to ARRAY_AGG but returns a nest

Re: Problems about subsets clause order for MATCH_RECOGNIZE

2018-12-15 Thread Julian Hyde
I don’t understand MATCH_RECOGNIZE well enough to give an opinion. Is there a query that gives different results on Oracle if you change the order of items in SUBSET? It seems that the parser preserves the order of items in the subset, but the SqlToRelConverter does not, hence the line "subsets

Re: [DISCUSS] Towards Calcite 1.18

2018-12-16 Thread Julian Hyde
for the artifacts to propagate across > the mirrors before I make a formal announcement and push the website. > > Francis > > On 3/12/2018 10:08 am, Julian Hyde wrote: > > Francis, > > > > Much appreciated! The nexus push was successful, and I was able to use >

Re: [DISCUSS] Towards Calcite 1.18

2018-12-17 Thread Julian Hyde
Zoltan, Can you give us a status update please? The release train is waiting for you. Julian > On Dec 16, 2018, at 12:20 PM, Julian Hyde wrote: > > An update on release 1.18. > > We have had two release candidates RC0 and RC1, and both votes have > been cancelled due

Re: Relational algebra and signal processing

2018-12-18 Thread Julian Hyde
treaming >>relational algebra could be a good fit here. >> >>https://calcite.apache.org/docs/stream.html >>-- >>Michael Mior >> mm...@apache.org >> >> >>Le dim. 16 déc. 2018 à 18:39, Julian Feinauer < >> j.feina.

[VOTE] Release apache-calcite-1.18.0 (release candidate 2)

2018-12-18 Thread Julian Hyde
Hi all, I have created a build for Apache Calcite 1.18.0, release candidate 2. Since the previous release candidate (RC1), issues https://issues.apache.org/jira/browse/CALCITE-2730 and https://issues.apache.org/jira/browse/CALCITE-2731 have been fixed, and Zoltan indicates that the Hive test suit

Re: [DISCUSS] Towards Calcite 1.18

2018-12-18 Thread Julian Hyde
iced a bug going away :) > > cheers, > Zoltan > > On 12/18/18 3:21 AM, Julian Hyde wrote: >> Zoltan, >> Can you give us a status update please? >> The release train is waiting for you. >> Julian >>> On Dec 16, 2018, at 12:20 PM, Julian Hyde wrote: >

Re: Calcite example code

2018-12-19 Thread Julian Hyde
For old idiots like me, can you explain how the notebook works? The file you checked into GitHub, does it contain the input and output or just the input? Is there a way to edit or use the notebook interactively? It certainly seems a better way to introduce people to examples than saying “go loo

Re: [ANNOUNCE] New Calcite PMC chair: Francis Chuang

2018-12-20 Thread Julian Hyde
Congratulations, Francis! Well deserved. Michael, Thank you for serving as chair. I especially appreciate what you did to welcome newcomers, resolve disputes and make us communicate better with each other. The Calcite community is stronger because of your efforts. Julian > On Dec 20, 2018, at

[RESULT] [VOTE] Release apache-calcite-1.18.0 (release candidate 2)

2018-12-20 Thread Julian Hyde
Thanks to everyone who has tested the release candidate and given their comments and votes[1]. The tally is as follows. 6 binding +1s: Francis, Jesus, Julian, Kevin, Michael, Volodymyr 4 non-binding +1s: Andrei, Enrico, Sergey, Stamatis No 0s or -1s. Therefore I am delighted to announce that

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

2018-12-20 Thread Julian Hyde
Oops, I just realized that I terminated the vote 24 hours early. Votes will still be accepted until noon Friday, Pacific time, i.e. another 22 hours and 52 minutes from now. Julian > On Dec 20, 2018, at 12:50 PM, Julian Hyde wrote: > > Thanks to everyone who has tested the release

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

2018-12-21 Thread Julian Hyde
d the artifacts that people voted on were based on the correct commit. The vote result stands. I will send an announcement shortly. Julian On Thu, Dec 20, 2018 at 1:08 PM Julian Hyde wrote: > > Oops, I just realized that I terminated the vote 24 hours early. Votes will > still be ac

[ANNOUNCE] Apache Calcite 1.18.0 released

2018-12-21 Thread Julian Hyde
://calcite.apache.org/downloads/ We welcome your help and feedback. For more information on how to report problems, and to get involved, visit the project website at https://calcite.apache.org Julian Hyde, on behalf of the Apache Calcite Team

New JIRA label "pull-request-available"

2018-12-22 Thread Julian Hyde
I went through JIRA and added the label "pull-request-available" to about 30 PRs that had been marked "fix for 1.18" but we didn't get to[1]. I suggest that we start using the "pull-request-available" label more often. But my bigger point is that we letting our community down when we have such a

Re: [NOTICE] Mandatory relocation of Apache git repositories on git-wip-us.apache.org

2018-12-25 Thread Julian Hyde
Regarding the “site” branch. After a release, it should always point to the same as “master”. (It may diverge later, if there are changes made to the web site in master branch that we do not wish to immediately publish.) Sorry I forgot to push to site. Regarding gitbox. How should I set up my e

Re: MATCH_RECOGNIZE

2018-12-25 Thread Julian Hyde
”). > >I have some problems getting it to run. >Is it possible that there are some files missing in the commit or are > there some things to consider? > >Thanks! >Julian (F) > >On 2018/11/26 20:09:00, Julian Hyde > mailto:j...@apache.org>> w

Re: "single or null" aggregation function for elastic

2018-12-26 Thread Julian Hyde
case when max(x) = min(x) then max(x) end Julian > On Dec 26, 2018, at 16:22, Andrei Sereda wrote: > > Hello, > > I’m looking for a way to simulate “single or null” (on distinct values) > aggregation function in elastic. > Example of a query > > -- for multiple distinct values return nullsel

Re: ElasticSearch adapter. Exposing meta fields (like _id, _uid etc.)

2018-12-27 Thread Julian Hyde
I added comments to the case. I did not look at the PR, sorry. > On Dec 26, 2018, at 1:56 PM, Andrei Sereda wrote: > > Hello, > > Can somebody pls take a look at the following PR: > > PR: https://github.com/apache/calcite/pull/982 > JIRA: https://issues.apache.org/jira/browse/CALCITE-2755 > >

Re: DISTINCT not being handled correctly in RelToSqlConverter

2018-12-27 Thread Julian Hyde
Sounds like a bug. Please log it. Re-stating what you just said. My understanding is that SELECT DISTINCT sum(x) OVER (PARTITION BY y) FROM t is valid (per SQL standard) but SELECT sum(x) OVER (PARTITION BY y) FROM t GROUP BY sum(x) OVER (PARTITION BY y) is not. For example, given the

Re: MATCH_RECOGNIZE

2018-12-27 Thread Julian Hyde
://docs.oracle.com/database/121/DWHSG/pattern.htm#DWHSG8956 > [2] https://github.com/JulianFeinauer/calcite/tree/1935-match-recognize > [3] https://github.com/julianhyde/calcite/tree/1935-match-recognize > > Am 26.12.18, 08:49 schrieb "Julian Hyde" : > >You are

Re: [NOTICE] Mandatory relocation of Apache git repositories on git-wip-us.apache.org

2018-12-27 Thread Julian Hyde
gt; and Apache accounts here: https://gitbox.apache.org/ ? > > On 26/12/2018 6:35 pm, Julian Hyde wrote: >> Regarding the “site” branch. After a release, it should always point to the >> same as “master”. (It may diverge later, if there are changes made to the >> web site in maste

Re: MATCH_RECOGNIZE

2018-12-27 Thread Julian Hyde
on the branch? We should synchronize to avoid > duplicate work. > > [1] https://github.com/JulianFeinauer/calcite/tree/1935-match-recognize > > Am 27.12.18, 21:21 schrieb "Julian Hyde" : > >I think you can implement “^” by adding a special BEGIN state to the &

Re: [NOTICE] Mandatory relocation of Apache git repositories on git-wip-us.apache.org

2018-12-28 Thread Julian Hyde
e on this. > > Julian, I'd like to deploy the site, but when I build, I see the latest > release announcement disappear. Given your reminder that site and master > should be the same after a release, I'll try to sort through what's going > on later today. > > On Thu

Re: Spatial Functions

2018-12-28 Thread Julian Hyde
Sounds like an interesting project. I would be open to this replacing the current set of functions based on ESRI, if the quality and performance were superior. As a database guy, and in particular an optimizer guy, I am very interested in recognizing certain patterns and rewriting them to use i

Re: Calcite Time Conversion doubt

2018-12-28 Thread Julian Hyde
The root of the problem is that SQL’s TIMESTAMP type has no time zone (not even UTC) whereas Java’s Timestamp represents an instant in time, internally represented as an offset from the UTC epoch. Therefore translation between java.sql.Timestamp and SQL TIMESTAMP always needs a time zone. > On

Re: MATCH_RECOGNIZE

2018-12-28 Thread Julian Hyde
ow (as of commit > https://github.com/julianhyde/calcite/pull/15/commits/358ca1c5928b57cc96c8b39be8d017872d870dcf > ). > > Best > JulianF > > Am 28.12.18, 02:19 schrieb "Julian Hyde" : > >I think we should get one example working end-to-end before moving to the > n

Re: MATCH_RECOGNIZE

2018-12-28 Thread Julian Hyde
28, 2018, at 4:29 PM, Julian Hyde wrote: > > I hesitated to make the automaton deterministic because the DFA can have > exponentially more states than its corresponding NFA, and I was concerned > that this worst case might occur in real-world queries. I could imagine a > query wit

Re: [DISCUSS] Draft board report for January 2019

2019-01-02 Thread Julian Hyde
Even though you probably don’t want to blow your own trumpet, Francis, I think we should call out the change of VP, and the fact that we have had a "peaceful transition of power” to a new person every year since graduation. I am proud of this particular Calcite tradition, and one excellent side

Re: Support of Regex in CalciteAssert

2019-01-02 Thread Julian Hyde
I wouldn’t do regex by default. Quite a few characters are regex meta characters (e.g. “(“ and “.”) and it’s a pain to have to remember to escape them when copy-pasting output into the test. So, my vote is for > .returns(regexMatch("id=\\p{Graph}+; a=1")) // separate consumer I don’t have an

Re: [DISCUSS] Draft board report for January 2019

2019-01-02 Thread Julian Hyde
t; - avatica-1.13.0 was released on Tue Dec 04 2018 > - avatica-go-3.2.0 was released on Mon Sep 17 2018 > > ## JIRA activity: > > - 154 JIRA tickets created in the last 3 months > - 105 JIRA tickets closed/resolved in the last 3 months > > > > On 3/01/20

Re: Disabling of "merge commits" and "squash merge" on Github

2019-01-04 Thread Julian Hyde
> On Jan 4, 2019, at 6:37 AM, Michael Mior wrote: > > What we've done in the past is to add the original author's name in > parentheses to the commit message. Not ideal, but better than losing the > attribution entirely. Let’s not do that. The author’s name must be in the git commit’s “author

Re: CALCITE-2593 / CALCITE-2764. Composite collations: review / comment request

2019-01-07 Thread Julian Hyde
I don’t think the [] means “no collation”. It means “order by zero columns”. The list of columns is present, but it is empty. Of course, this “empty collation” provides no guarantees as to the ordering of rows. It is a collation; it’s just the weakest possible collation. > On Jan 7, 2019, at 1

Re: Breaking change in Avatica-Go when handling null and empty strings for Apache Phoenix

2019-01-07 Thread Julian Hyde
How this behavior enabled? Apache Phoenix’s behavior contravenes the SQL standard (which states that empty strings and null strings are different) and so clients must not get this behavior unless they ask for it. It would be OK if they get it by default for Phoenix, but even then, there should

Re: CALCITE-2593 / CALCITE-2764. Composite collations: review / comment request

2019-01-07 Thread Julian Hyde
No, it is not the “unknown collation” subset. It is more like the “don’t care” subset. Traits are a form of quality-of-service. Like when you order a package, you can pay extra for 2-day shipping, and even more for 1-day shipping. You pay more for a tighter guarantee. The subset with collation

Re: CALCITE-2593 / CALCITE-2764. Composite collations: review / comment request

2019-01-07 Thread Julian Hyde
I don’t know how this is possible. It may be a bug. I’m sorry that I am not fully reading these threads, nor running the test cases in the debugger. My time to spend on Calcite is very limited. I am trying to contribute my wisdom / experience / intuition. Discussion threads where I am forced to

"Patch" flag vs. "pull-request-available" label

2019-01-07 Thread Julian Hyde
There seem to be two mechanisms to indicate that a pull-request is available for a JIRA case. 1. The “Patch” flag (13 issues); see https://issues.apache.org/jira/issues/?jql=project%20%3D%20CALCITE%20AND%20flags%20%3D%20%22Patch%22

Re: Info need on the lib encryption

2019-01-07 Thread Julian Hyde
Sorry, my bad moderating it through this time. > On Jan 7, 2019, at 1:34 PM, Josh Elser wrote: > > Please read Michael's reply to you from the first time you sent this message > instead of sending it again. > > Let's not moderate this through a third time. > > On 1/7/19 4:06 PM, Hemakumar Gok

Re: Breaking change in Avatica-Go when handling null and empty strings for Apache Phoenix

2019-01-07 Thread Julian Hyde
s > during runtime. > > For the Go client, there is simply no way to distinguish between a null or a > "" in the returned type. I don't think the Avatica server even sees this > information, as Phoenix is simply sending a Rep_Type of Null and Null = true > to

Re: Current State of MATCH_RECOGNIZE Implementation

2019-01-09 Thread Julian Hyde
I saw your PR https://github.com/julianhyde/calcite/pull/16 . Can you please create a PR against Apache, then I’ll rebase it onto my 1935 branch. Are we able to run a SQL query yet? My plan was to get a very basic query working end-to-end, then sta

Re: Breaking change in Avatica-Go when handling null and empty strings for Apache Phoenix

2019-01-09 Thread Julian Hyde
Breaking changes should be part of release notes, i.e. https://calcite.apache.org/avatica/docs/go_history.html . We’ve not been very disciplined in doing this, but let’s do better. I see no reason why we could not start writing the releas

Re: Current State of MATCH_RECOGNIZE Implementation

2019-01-10 Thread Julian Hyde
a hint on how to implement this, I'll try to do that. > > JulianF > > Am 09.01.19, 19:23 schrieb "Julian Hyde" : > > I saw your PR https://github.com/julianhyde/calcite/pull/16 > <https://github.com/julianhyde/calcite/pull/16>. Can you please create a

Re: [CALCITE-2454] RexLiteral digest

2019-01-13 Thread Julian Hyde
Thanks Vladimir. I have reviewed and added comments to https://issues.apache.org/jira/browse/CALCITE-2454. On Sun, Jan 13, 2019 at 11:51 AM Vladimir Sitnikov wrote: > > Hi, > > Historically RexLiteral digest did not include type. It caused confusion > for cases like Project(x=1) where 1 might be

Re: SemiJoin is not considered during join ordering.

2019-01-13 Thread Julian Hyde
I don't see any reason in principle why LoptOptimizeJoinRule could not handle semi-joins. Of course it will have to remember that these are semi-joins so that it can re-create them as semi-joins afterwards. And there may be complications because a semi-join eliminates duplicates in its right-hand i

Re: Will the number of traits in the traitSet affect the time of Volcano optimization?

2019-01-14 Thread Julian Hyde
In most cases increasing the number of traits from one to two will increase the planning time by a negligible amount. But it can increase the size of the search space. Suppose a particular relational expression has 5 possible sort orders (order by x, order by x, y, order by (), order by z, orde

Re: ElasticSearch Adapter. converting APPROX_COUNT_DISTINCT into Elastic cardinality

2019-01-22 Thread Julian Hyde
Yes, I think it makes sense to disable AggregateExpandDistinctAggregatesRule when optimizing for Elastic. I’m surprised that Druid’s logic is too complicated. If believe that Druid’s capabilities for approximate distinct-count are similar to Elastic, and I believe they require similar things fr

Re: ElasticSearch Adapter. converting APPROX_COUNT_DISTINCT into Elastic cardinality

2019-01-22 Thread Julian Hyde
nction", > SqlStdOperatorTable.APPROX_COUNT_DISTINCT.getName()); > throw new InvalidRelException(message); > } > > Should (Can) it be handled differently ? > > On Tue, Jan 22, 2019 at 5:44 PM Julian Hyde wrote: > >> Yes, I think it makes sense to d

Re: Principle of least astonishment when dealing with Rules and RelBuidlerFactory

2019-01-28 Thread Julian Hyde
RelBuilderFactory (and RelBuilder) is concerned with creating RelNodes not matching rules, so doesn’t seem the right place for the getConvention() method. Also, I try not to give Convention special treatment that is not given to other traits. I wonder whether this could be generalized to other t

Re: calcite sql applied on spark dataframes

2019-01-29 Thread Julian Hyde
Did you see this: https://issues.apache.org/jira/browse/CALCITE-1737 ? > On Jan 29, 2019, at 8:55 AM, Ben Teeuwen > wrote: > > Hi all, > > I'm interested in trying out Calcite with the goal of being able to apply > the same SQL statement i

Re: [ANNOUNCE] New committer: Zoltan Haindrich

2019-01-30 Thread Julian Hyde
Welcome, Zoltan! You’ve already contributed plenty of great work, and I look forward to further contributions! Julian > On Jan 30, 2019, at 10:05 AM, Jesus Camacho Rodriguez > wrote: > > Apache Calcite's Project Management Committee (PMC) has invited Zoltan > Haindrich to become a committer,

Re: [ANNOUNCE] New committer: Stamatis Zampetakis

2019-01-30 Thread Julian Hyde
Welcome, Stamatis! In addition to your code contributions, I have been appreciating your wise & moderating contributions to technical discussions, and answers to people’s questions on the dev list. Julian > On Jan 30, 2019, at 10:01 AM, Jesus Camacho Rodriguez > wrote: > > Apache Calcite's

Re: How to run Quidem test

2019-01-30 Thread Julian Hyde
Run the main method of org.apache.calcite.test.CoreQuidemTest (or one of the other sub-classes of QuidemTest) and pass the path of the script (e.g. “sql/agg.iq”) as the argument. You can also run CoreQuidemTest as a Junit test. It is parameterized, and generates a list of all .iq files (e.g. sq

Release managers

2019-01-31 Thread Julian Hyde
Calcite needs to make regular releases, and we have established a cadence of every 2 - 3 months that everyone seems to like. But to keep that running, each release needs a release manager, and finding a release manager always seems to be a chore. I wonder if we have trouble recruiting release m

Re: Integrating MySQL's JSON functions

2019-01-31 Thread Julian Hyde
+1 In the reference doc, let’s make it clear that these are in MySQL but not in the standard. (Unlike some of their other extensions to standard SQL, MySQL seem to have done a good job - they are well-designed and well-documented.) > On Jan 31, 2019, at 10:20 AM, Hongze Zhang wrote: > > Hi al

Re: Planner state vs CannotPlanException vs humans

2019-02-01 Thread Julian Hyde
It bugs me, too, that you sometimes get a CannotPlanException. (Usually “you” as a developer of a planner, less often “you” as an end user, but not never.) It really bugs me that it takes a couple of hours of careful reading of the log to figure out that for your new Foo Convention you have a Fo

Re: Principle of least astonishment when dealing with Rules and RelBuidlerFactory

2019-02-01 Thread Julian Hyde
Regarding https://github.com/apache/calcite/pull/1019 . I can see it might be useful to categorize rules as “converters” (change convention, or some other trait, but preserve the same pattern), and “single-convention” (all matched rels must have the

Re: Principle of least astonishment when dealing with Rules and RelBuidlerFactory

2019-02-03 Thread Julian Hyde
So many threads. Vladimir asked whether I thought it was OK that a Logical RelNode should have an input that is not logical. Yes, I do. LogicalFilter(JdbcTableScan) for example (and, more generally, our use of toRel to create a table that is not logical, but has a particular convention). Allow

Re: getting all the equivalent query plans of an sql query

2019-02-04 Thread Julian Hyde
Michael is correct that to get all alternative plans you can create your own visitor. However note that the number of plans is typically very large. Consider a query that starts of as Scan -> Project -> Filter and broadens to 3 equivalence sets with 3 RelNodes in each: {R11, R12, R13} ->

Re: Intention behind RelNode.accept(RexShuttle)

2019-02-04 Thread Julian Hyde
RexShuttle does not have a watertight specification. It does what it needs to do for the cases that use it. Generally, if the sub-elements of a RelNode are sub-types of RexNode, RexShuttle processes them, otherwise it ignores them. But pragmatically, as long as what you do doesn’t break the test

Re: Principle of least astonishment when dealing with Rules and RelBuidlerFactory

2019-02-04 Thread Julian Hyde
None of your 4 points prove that anything is fundamentally broken. In particular, the ability to represent cyclic graphs is a feature, not a bug. It’s not “too late” if a rule fires and creates a RelNode and that RelNode’s constructor asserts. Because that rule is being run in a debugger, as par

Re: Error connecting Calcite to Elasticsearch

2019-02-05 Thread Julian Hyde
Looks good. One remark about your change: a missing property, e.g. "'coordinates' is missing in configuration”, is a user error. We should not be using Preconditions.checkState to check for these conditions, because that is for internal (coding) errors. https://github.com/apache/calcite/pull/1

Re: Error connecting Calcite to Elasticsearch

2019-02-05 Thread Julian Hyde
Feb 5, 2019, at 9:52 AM, Andrei Sereda wrote: > > We should not be using Preconditions.checkState to check for these > conditions > > IllegalArgumentException is preferred ? > > On Tue, Feb 5, 2019 at 12:50 PM Julian Hyde wrote: > >> Looks good. >> >> One

Re: Table-Value Functions

2019-02-05 Thread Julian Hyde
Use the following (standard) SQL syntax: select * from table (generate_series(1, 32, 1)) Julian > On Feb 5, 2019, at 7:08 AM, Paul Trepagnier wrote: > > Is there any support in the calcite parser for table-value functions? For > instance, this valid postgres query does not seem to be able

Re: CALCITE-2832 Create RuleOperandBuilder for building RelOptRule operands

2019-02-06 Thread Julian Hyde
I think this would be useful. A builder will allow us to extend the operand model, and evolution will not tend to break existing code. If someone takes this one, I’d like to see some mock-ups: one or two existing rules rewritten to use the proposed new API. Let's iterate on that, and agree an A

Re: [Discuss] (CALCITE-2696) Make it easier to configure SqlToRelConverter.Config.getInSubQueryThreshold()

2019-02-06 Thread Julian Hyde
Is there a way to inject a custom org.apache.calcite.prepare.Planner? PlannerImpl contains a FrameworkConfig, and in that they can override SqlToRelConverter.Config. Of course they want really, really easy. But sub-query threshold is a planning parameter and I don’t want this stuff to be reall

Re: Intention behind RelNode.accept(RexShuttle)

2019-02-06 Thread Julian Hyde
can brake silently. > > Piotrek > >> On 4 Feb 2019, at 20:04, Julian Hyde wrote: >> >> RexShuttle does not have a watertight specification. It does what it needs >> to do for the cases that use it. Generally, if the sub-elements of a RelNode >> are sub-types o

Re: Release managers

2019-02-06 Thread Julian Hyde
Thu, Jan 31, 2019 at 6:14 PM Stamatis Zampetakis >> wrote: >> >>> Release Target date Release manager >>> === === === >>> 1.192019-02 >>> 1.202019-04 >>> 1.212019-06Stamatis >>> 1.222019-08 >>> 1.232019-10 &

Re: [calcite] branch master updated: Improve assert messages for CalciteAssert-based tests

2019-02-06 Thread Julian Hyde
This change is not an improvement. If I make a code change and get 100 failures, I would rather see, as part of the stack, the SQL that was being run in each of those cases. Then I can notice that all of them have a HAVING clause. After this change, it is a little easier to see the assert (alth

Re: [calcite] branch master updated: Improve assert messages for CalciteAssert-based tests

2019-02-06 Thread Julian Hyde
You removed this code: - } catch (Exception e) { -throw new RuntimeException( -"exception while executing [" + sql + "]", e); - } Therefore the error stack from a test case that used to contain the SQL statement being run will no longer contain that SQL. Julian >

Re: [calcite] branch master updated: Improve assert messages for CalciteAssert-based tests

2019-02-06 Thread Julian Hyde
Ah, I was mistaken. I see that you have not removed the other exceptions, just moved them to a different order in the exception stack. Sorry about that. > On Feb 6, 2019, at 1:27 PM, Vladimir Sitnikov > wrote: > > Julian> will no longer contain that SQL. > > I'm afraid you are wrong, sir. >

Broken Travis

2019-02-08 Thread Julian Hyde
The Travis build has been broken for 3 cycles: https://travis-ci.org/apache/calcite/builds It occurs on the JDK11 JDOC=Y build, and started happening with https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=21fe666e9634ab9a752c7cc328924b68f6143afe. Vladimir, can you please take a loo

Re: Broken Travis

2019-02-08 Thread Julian Hyde
Does someone else have time to take a look? > On Feb 8, 2019, at 11:17 AM, Vladimir Sitnikov > wrote: > > Julian> Vladimir, can you please take a look? > > As you see, the commit did not touch "Calcite Plus", so I don't really > think the commit is to blame here. It looks more like JDK-821223

Re: Broken Travis

2019-02-08 Thread Julian Hyde
4 >>>>> - Failed - Java version: 11.0.2, vendor: Oracle Corporation, >>>>> runtime: /usr/lib/jvm/java-11-openjdk-amd64 >>>>> >>>>> Testing with this locally to see how this reproduces and can look into >>>>> fixing. >>

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