Re: GitHub actions disabled

2021-01-08 Thread Julian Hyde
I have no evidence for this whatsoever, but I have a hunch that GitHub actions could be exploited by bitcoin miners. I would be concerned that someone could create a PR and burn several cents of Apache's (or GitHub's) operational budget. On Fri, Jan 8, 2021 at 9:53 AM Michael Mior wrote: > > I su

Re: [DISCUSS] Apache Calcite Online Meetup January 2021

2021-01-02 Thread Julian Hyde
/view/nwds2021 > On Jan 2, 2021, at 12:47 PM, Julian Hyde wrote: > > I can give a talk “Implementing spatial queries using algebra rewrites”, 20 > minutes. > > But if that makes the meetup too long, I am equally happy to postpone the > talk. How about scheduling another

Re: [DISCUSS] Apache Calcite Online Meetup January 2021

2021-01-02 Thread Julian Hyde
gt;>>>>> Best, >>>>>>> Stamatis >>>>>>> >>>>>>> [1] https://www.meetup.com/Apache-Calcite/ >>>>>>> [2] https://s.apache.org/uhrzo >>>>>>> >>>>>>> Tentative Age

GitHub actions disabled

2020-12-28 Thread Julian Hyde
As of yesterday, GitHub actions are disabled for any non-Apache repository. I think this means that GitHub actions will not fire for PRs (which are typically in the contributor’s repository). See https://issues.apache.org/jira/browse/INFRA-21234

Re: Proposal to extend Calcite into a incremental query optimizer

2020-12-28 Thread Julian Hyde
Botong, This is very exciting; congratulations on this research, and thank you for contributing it back to Calcite. The research touches several areas in Calcite: streaming, materialized view maintenance, and multi-query optimization. As we have already some solutions in those areas (Sigma and

[jira] [Created] (CALCITE-4449) When converting Sarg 'x IS NULL OR x NOT IN (1, 2)', generate better SQL

2020-12-28 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4449: Summary: When converting Sarg 'x IS NULL OR x NOT IN (1, 2)', generate better SQL Key: CALCITE-4449 URL: https://issues.apache.org/jira/browse/CALCITE-4449

[jira] [Created] (CALCITE-4446) Implement three-valued logic for SEARCH operator

2020-12-23 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4446: Summary: Implement three-valued logic for SEARCH operator Key: CALCITE-4446 URL: https://issues.apache.org/jira/browse/CALCITE-4446 Project: Calcite Issue

Re: how to set string representation in calcite SQL;

2020-12-18 Thread Julian Hyde
Right. Something like SqlParser.configBuilder(SqlParser.Config.DEFAULT) .withCharLiteralStyles(EnumSet.of(CharLiteralStyle.BQ_DOUBLE)) .build(); will do the trick. Or use lex=BIG_QUERY, as I mentioned previously. Julian > On Dec 18, 2020, at 2:12 AM, Stamatis Zampetakis wrote: >

Re: [ANNOUNCE] New Calcite PMC chair: Haisheng Yuan

2020-12-17 Thread Julian Hyde
Congratulations, Haisheng! Thank you for your service, Stamatis. Julian > On Dec 17, 2020, at 5:48 AM, Stamatis Zampetakis wrote: > > Calcite community members, > > I am pleased to announce that we have a new PMC chair and VP as per our > tradition of rotating the chair once a year. I have r

Re: how to avoid query database column meta when I execute select query?

2020-12-16 Thread Julian Hyde
Maybe the JDBC adapter needs a new mode that will read metadata more conservatively. People could use it for certain classes of large schemas, such as this one with 5 million columns. Maybe additional modes would be needed for other kinds of large schemas (e.g. one with lots of tables but few colum

Re: how to set string representation in calcite SQL;

2020-12-16 Thread Julian Hyde
Alessandro is correct. But also, you can set using connect-string parameters: lex=BIG_QUERY will, I believe, have the desired effect. On Wed, Dec 16, 2020 at 3:13 AM Alessandro Solimando wrote: > > Hello, > you can achieve what you want via the SqlParser configuration > (.setQuoting() method), fo

[jira] [Created] (CALCITE-4434) Cannot implement 'CASE row WHEN row ...'

2020-12-10 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4434: Summary: Cannot implement 'CASE row WHEN row ...' Key: CALCITE-4434 URL: https://issues.apache.org/jira/browse/CALCITE-4434 Project: Calcite Issue

[jira] [Created] (CALCITE-4433) Add UNPIVOT operator to SQL

2020-12-09 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4433: Summary: Add UNPIVOT operator to SQL Key: CALCITE-4433 URL: https://issues.apache.org/jira/browse/CALCITE-4433 Project: Calcite Issue Type: Bug

Re: [HELP] Local build fails

2020-12-09 Thread Julian Hyde
va is detected: > > * What went wrong: > Apache Calcite requires Java 1.8.0u202 or later. The current Java version > is 1.8.0_152 > > The relevant Gradle issue is https://github.com/gradle/gradle/issues/15464 > Vladimir > > > ср, 9 дек. 2020 г. в 09:19, Julian Hyde :

Re: grouping() function occurs value large than 1

2020-12-08 Thread Julian Hyde
urns a value of 1 if the value of expr in > the row is a null representing the set of all values. Otherwise, it returns > zero. > > > > ref1: > https://docs.oracle.com/cd/B28359_01/server.111/b28286/functions064.htm#SQLRF00647 > > Regards! > > Aron Tao >

Re: [HELP] Local build fails

2020-12-08 Thread Julian Hyde
ssReader.readMethod(ClassReader.java:1481) >at > de.thetaphi.forbiddenapis.asm.ClassReader.accept(ClassReader.java:711) >at > de.thetaphi.forbiddenapis.asm.ClassReader.accept(ClassReader.java:394) > at > de.thetaphi.forbiddenapis.Checker.checkClass(Checker.java:414) >

Re: grouping() function occurs value large than 1

2020-12-08 Thread Julian Hyde
GROUPING is defined in the SQL standard. If it has N arguments, it returns an integer bitmask with N bits. PostgreSQL has the same behavior: see example in https://www.postgresql.org/docs/9.5/functions-aggregate.html. Julian On Tue, Dec 8, 2020 at 12:30 AM JiaTao Tao wrote: > > Hi > After Aggre

Re: [HELP] Local build fails

2020-12-08 Thread Julian Hyde
I just hit the same problem. I upgraded from jdk1.8.0_152 to jdk1.8.0_271, restarted all gradle daemons, and the problem does not go away. Execution failed for task ':plus:forbiddenApisMain': Caused by: de.thetaphi.forbiddenapis.ForbiddenApiException: Failed to parse class 'org.apache.

[DISCUSS] ISO-compliant behavior of SUBSTRING function

2020-12-07 Thread Julian Hyde
We've noticed that the SUBSTRING function complies with BigQuery "standard SQL" semantics but not ISO standard SQL semantics. I am proposing to fix it, and that necessitates some breaking changes that I have outlined in https://issues.apache.org/jira/browse/CALCITE-4427. If you care about this, pl

Re: Convert sqlnode to relRoot cost 14s

2020-12-07 Thread Julian Hyde
I am always skeptical of caches. They make some things better, and some things worse, and they make the whole system more complicated. There are other cases where we were converting expressions to left-deep or right-deep trees, which resulted in a cartesian (O(N^2)) algorithm, and we were able to

Re: TpchTest#testQuery07 timeout when running continuous-integration/appveyor/pr

2020-12-03 Thread Julian Hyde
I think Vladimir is very likely correct that the performance regression was due to algorithmic changes, that getRelList should not be used, and that improving its performance is not solving the real problem. So, I will not merge a fix for getRelList performance until after the algorithmic problem h

[jira] [Created] (CALCITE-4427) Make SUBSTRING operator comply with ISO standard SQL

2020-12-03 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4427: Summary: Make SUBSTRING operator comply with ISO standard SQL Key: CALCITE-4427 URL: https://issues.apache.org/jira/browse/CALCITE-4427 Project: Calcite

Re: TpchTest#testQuery07 timeout when running continuous-integration/appveyor/pr

2020-12-03 Thread Julian Hyde
A long time ago, we stored the list of RelNodes in each RelSubset, and changed to a shared list in RelSet. I still think it makes sense, especially when subsets are not disjoint (e.g. if a set has one subset sorted by (x) and another subset sorted by (x, y) then all of the RelNodes in the latter wi

Re: Decouple core from linq4j and Avatica

2020-11-27 Thread Julian Hyde
I’m not a fan of shading. It doesn’t make things simpler; it makes them complicated in a different way. But of course people can take the Calcite/Avatica jars and create their own shaded/fat artifacts. I think that’s the simplest and least disruptive solution for people who don’t like adding the

Re: [DISCUSS][CALCITE-4199] Ensure nullness verification via checkerframework

2020-11-24 Thread Julian Hyde
I’m done. Feel free to squash into your own commits if it makes sense and yields a clean history. The SqlParserPos thing should stay as a separate commit (still part of this change). I’ve been meaning to do that for some time. It’s a hot code path for the parser. Julian > On Nov 24, 2020, at

Re: [DISCUSS][CALCITE-4199] Ensure nullness verification via checkerframework

2020-11-24 Thread Julian Hyde
Vladimir, I have added some commits in https://github.com/apache/calcite/pull/2278 that fix the three points I raised. Julian > On Nov 23, 2020, at 4:08 PM, Vladimir Sitnikov > wrote: > > Julian>I can’t tell whether you sincerely want my help.

Re: [DISCUSS][CALCITE-4199] Ensure nullness verification via checkerframework

2020-11-23 Thread Julian Hyde
> Are you willing to help with fixing the bits that you identified? > Could you suggest timeframes when you can implement that? I can’t tell whether you sincerely want my help. I’ll create a patch fixing the three items. I’m fearful that you will take issue with what I put in the patch and my

Re: [DISCUSS][CALCITE-4199] Ensure nullness verification via checkerframework

2020-11-23 Thread Julian Hyde
hich >> is a >> Fan Liya>large amount of effort. >> >> The added nullability annotations have minimal impact on Calcite API and >> its behavior. >> All the existing tests pass, and I change only a few test files. >> >> Of course, I do not like the idea of

Re: [DISCUSS] Does anybody think this is debuging unfriendly: "call.transformTo(relBuilder.build())"

2020-11-23 Thread Julian Hyde
I am -0 on this change. Most code is read many more times than it is debugged. If you expand code so that it takes more screen area, the reader has to read more code in order to figure out what’s going on. Of course you can take that philosophy too far. If I have a multi-line expression, with

[jira] [Created] (CALCITE-4418) Allow Interpreter to read from JDBC input

2020-11-23 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4418: Summary: Allow Interpreter to read from JDBC input Key: CALCITE-4418 URL: https://issues.apache.org/jira/browse/CALCITE-4418 Project: Calcite Issue Type

Re: [DISCUSS][CALCITE-4199] Ensure nullness verification via checkerframework

2020-11-18 Thread Julian Hyde
Regardless of how it got there, the change to 2020-10-06-release-1.26.0.md is currently in the change that you are proposing to commit (see the top of https://patch-diff.githubusercontent.com/raw/apache/calcite/pull/2268.patch), and it shouldn't be. Julian On Wed, Nov 18, 2020 at 1:12 PM Vladimir

Re: [DISCUSS] State of the project 2020

2020-11-18 Thread Julian Hyde
I think Haisheng is a great choice for chair, if he is willing. Thanks for serving as chair this year, Stamatis. You've done a great job keeping the community civilized and on track. Julian On Sat, Nov 14, 2020 at 10:23 PM Forward Xu wrote: > > Hi Stamatis, > > Thanks for your great work. > > >

Re: [DISCUSS][CALCITE-4199] Ensure nullness verification via checkerframework

2020-11-18 Thread Julian Hyde
Vladimir, Please remove the change you made to site/_posts/2020-10-06-release-1.26.0.md in this PR. It is not related to CALCITE-4199. Julian On Wed, Nov 18, 2020 at 9:53 AM Vladimir Sitnikov wrote: > > Here's a recent issue identified by the checker framework. The bug was > committed in CALCIT

[jira] [Created] (CALCITE-4405) Search/Sarg does not handle UNKNOWN correctly

2020-11-17 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4405: Summary: Search/Sarg does not handle UNKNOWN correctly Key: CALCITE-4405 URL: https://issues.apache.org/jira/browse/CALCITE-4405 Project: Calcite Issue Type

Re: Search/Sarg: untested feature merged to the default branch

2020-11-16 Thread Julian Hyde
sense if we push 1.27.0 back a few weeks until maybe after > new year? In the mean time, perhaps we can focus on getting these issues > fixed and improve the reliability of search/sarge? Perhaps even to the > extent where we divert some resources from other features and put more > foc

Re: Search/Sarg: untested feature merged to the default branch

2020-11-16 Thread Julian Hyde
And yet more passive-aggressive bulls**t from Vladimir: https://github.com/apache/calcite/commit/c6b3fb7ddbf8aed981ff3fb0632c77216dbe68d6 I've force-pushed to remove it. I plan to respond to Stamatis' thoughtful email later today. Also, I think I may have a test case that demonstrates the issues

Re: Search/Sarg: untested feature merged to the default branch

2020-11-14 Thread Julian Hyde
Vladimir, I’ve reverted your revert. A commit war is no way to proceed. Julian > On Nov 14, 2020, at 2:55 AM, Vladimir Sitnikov > wrote: > > I've reverted SEARCH. Sorry for the inconvenience. > > Here's the PR that re-adds SEARCH: > https://github.com/apache/calcite/pull/2263 > Please feel

Re: Search/Sarg: untested feature merged to the default branch

2020-11-13 Thread Julian Hyde
I have not spoken up because others have expressed my thoughts. Namely: 1. While there are problems with Search/Sarg it is a net benefit. Removing it at this point would be disruptive. 2. Everyone except Vladimir opposes committing Vladimir’s PR to revert the change. 3. It would be helpful if

[jira] [Created] (CALCITE-4394) When generating code for a function call, take the inferred operand type into account

2020-11-11 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4394: Summary: When generating code for a function call, take the inferred operand type into account Key: CALCITE-4394 URL: https://issues.apache.org/jira/browse/CALCITE-4394

Re: ProjectReduceExpressionsRule vs matchNullability: should RelRule be allowed to change field nullability?

2020-11-09 Thread Julian Hyde
Probably RelRule should not change nullability. But we have done so in the past, and I suspect we continue to do so today. It would be interesting to find a list of rules that do this. Deducing that a field is never null is very useful. With that knowledge, further optimizations become possible. S

[jira] [Created] (CALCITE-4389) Calls to ROW and anonymous row operators sometimes print too many spaces

2020-11-08 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4389: Summary: Calls to ROW and anonymous row operators sometimes print too many spaces Key: CALCITE-4389 URL: https://issues.apache.org/jira/browse/CALCITE-4389 Project

[jira] [Created] (CALCITE-4383) In RelBuilder, optimize Union(all, Values, Values) to Values

2020-11-06 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4383: Summary: In RelBuilder, optimize Union(all, Values, Values) to Values Key: CALCITE-4383 URL: https://issues.apache.org/jira/browse/CALCITE-4383 Project: Calcite

Re: [HELP] NPE on WebSphere 9 when starting application using calcite library (potential circular dependency in class initialization)

2020-11-06 Thread Julian Hyde
DEFAULT_CALL could also be converted to a method. There’s no harm if such SqlCall objects are created each time we need them. > On Nov 6, 2020, at 11:05 AM, Vladimir Sitnikov > wrote: > > Just in case, I've added a GitHub job that runs Calcite tests with OpenJ9 > JVM 1.8 in > https://github.co

Re: [HELP] NPE on WebSphere 9 when starting application using calcite library (potential circular dependency in class initialization)

2020-11-05 Thread Julian Hyde
>> a Jira if there is in fact something to be addressed on Calcite's side. >> Ruben >> >> >> On Fri, Nov 6, 2020 at 12:10 AM Julian Hyde >> wrote: >> >>> As you’re using Websphere, it’s possible you’re using IBM’s Java runtime. >>&

[jira] [Created] (CALCITE-4380) Make class SqlNodeList implement List

2020-11-05 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4380: Summary: Make class SqlNodeList implement List Key: CALCITE-4380 URL: https://issues.apache.org/jira/browse/CALCITE-4380 Project: Calcite Issue Type: Bug

Re: [DISCUSS] Make SqlNodeList implement List<SqlNode>

2020-11-05 Thread Julian Hyde
> I am in favor of making SqlNodeList implement List. >>> +1 to the proposal. >>> >>> Haisheng Yuan >>> >>> On 2020/11/05 02:32:01, Chunwei Lei wrote: >>>> Thank you for raising this, Julian. >>>> >>>> How much per

Re: [HELP] NPE on WebSphere 9 when starting application using calcite library (potential circular dependency in class initialization)

2020-11-05 Thread Julian Hyde
As you’re using Websphere, it’s possible you’re using IBM’s Java runtime. Is that so? Julian > On Nov 5, 2020, at 2:23 PM, Stamatis Zampetakis wrote: > > Hi Ruben, > > Since you mentioned WebSphere I am wondering if it is related to some weird > problem in the ClassLoader. > If it was only a

Re: How to parse sql of DDL

2020-11-04 Thread Julian Hyde
The core parser does not parse DDL. This is intentional. There are other parsers, e.g. server, that parse a limited subset of DDL. It may or may not be the subset that you want. Julian On Wed, Nov 4, 2020 at 2:08 AM Viliam Durina wrote: > > You might have a look at how we're adding DDL to Hazel

Re: Avatica's Meta.Frame appears to be unable to serialize float and char column values

2020-11-04 Thread Julian Hyde
Thanks for the clarification. Yes, open a PR. Please don't assume that it will be me that reviews the PR. Julian On Wed, Nov 4, 2020 at 7:14 AM Dmitri Bourlatchkov wrote: > > Hi Julian, > > Apologies for pinging directly. Does the information below answer your > previous question about this or

[DISCUSS] Make SqlNodeList implement List

2020-11-04 Thread Julian Hyde
Currently class SqlNodeList [1] implements Iterable but it does not implement List. How do people feel about doing that? (Or Collection?) The main potential benefit is performance. Consider this code: SqlNodeList nodeList; ImmutableList immutableList1 = ImmutableList.copyOf(nodeList); List

Re: Search/Sarg: untested feature merged to the default branch

2020-11-03 Thread Julian Hyde
It's going to be difficult to find time to do this. I would appreciate some help. Julian On Sun, Nov 1, 2020 at 11:46 PM Vladimir Sitnikov wrote: > > Hey Julian, thank you for rolling search/sarg expression. I believe it is a > valuable feature. > > Unfortunately, the new feature causes noticeab

Re: [DISCUSS] Support Oracle Polymorphic Table Function Syntax

2020-11-02 Thread Julian Hyde
come ambiguous > if there are name clashes. > > Assumes there is a table named TT and a table function named TT(param_a, > param_b), they are under the same namespace, do you mean > > "FROM TT(param_a, param_b)" or "FROM TT(TABLE TT, param_b)" &g

[jira] [Created] (CALCITE-4370) Ensure that all aggregate functions work in windowed aggregates

2020-10-31 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4370: Summary: Ensure that all aggregate functions work in windowed aggregates Key: CALCITE-4370 URL: https://issues.apache.org/jira/browse/CALCITE-4370 Project: Calcite

Re: Avatica's Meta.Frame appears to be unable to serialize float and char column values

2020-10-30 Thread Julian Hyde
I guess this happened because, as you say, 'float' and 'char' never happen in the JDBC world. The next question is: do they ever legitimately occur in the SQL world? To be clear, this sounds like this is a bug, and I think we should fix it, but I wanted to get a better idea what circumstances caus

Re: [DISCUSS] Support Oracle Polymorphic Table Function Syntax

2020-10-30 Thread Julian Hyde
Best, > > Jark > > > > [1]: https://stackoverflow.com/a/21022682/4915129 > > > > > > On Fri, 30 Oct 2020 at 09:48, Danny Chan wrote: > > > > > > Let's not use TUMBLE (or HOP, or SESSION) as the main example. It is > > > somewhat bui

Re: [DISCUSS] Support Oracle Polymorphic Table Function Syntax

2020-10-29 Thread Julian Hyde
tting TABLE from the parameter, which is > SELECT * > FROM TUMBLE(Bid, DESCRIPTOR(bidtime), INTERVAL '10' MINUTES); > > Do we want to achieve both or just one of these? If for one the grammar is > too complicated to change but for another the grammar is easier to be > changed,

[jira] [Created] (CALCITE-4366) LatticeSuggester should treat UNION / VALUES sub-expressions as tables

2020-10-29 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4366: Summary: LatticeSuggester should treat UNION / VALUES sub-expressions as tables Key: CALCITE-4366 URL: https://issues.apache.org/jira/browse/CALCITE-4366 Project

Re: [DISCUSS] Support Oracle Polymorphic Table Function Syntax

2020-10-29 Thread Julian Hyde
Can we drop the word "polymorphic" from the discussion? Polymorphic table functions are a valid ask, but can be a separate discussion. This is about calling table functions without the TABLE keyword, right? Which is what I said to you four years ago: https://issues.apache.org/jira/browse/CALCITE-1

Re: Calcite JDBC-Spark Integration

2020-10-27 Thread Julian Hyde
Your image did not come through. Please paste the stack trace as text. Julian On Tue, Oct 27, 2020 at 12:02 PM Prabhat Singh wrote: > > Hi, > > I have a requirement to query the multiple data sources in a single SQL > query. I saw Calcite provides this with a JDBC adapter. While running this, I

[DISCUSS] Screenshots of stack traces, code, and debugger sessions

2020-10-27 Thread Julian Hyde
There is a growing trend of attaching screenshots of stack traces, code, and debugger sessions to JIRA cases and email threads. I don't like it. I think we should have a policy discouraging screenshots. In my opinion, the text is almost always preferable. It can be found by search engines. It can

Re: List of columns that are inserted to

2020-10-26 Thread Julian Hyde
The mapping isn't as simple as you may think. Calcite checks the catalog to see whether each column has a default expression. NULL is just the default initializer expression. By the way, can access the initializer expression functionality without leaving columns out of the column list: you can wri

Re: RelBuilder#project should try keep alias in optimizer

2020-10-23 Thread Julian Hyde
t; > > > > > > Regards! > > > > > > Aron Tao > > > > > > > > > JiaTao Tao 于2020年10月22日周四 下午4:13写道: > > > > > >> Thanks, Julian > > >> One more question is that I can see many > > >> RelBuilder#proj

Re: Potential issue with RexSimplify/Sarg in Calcite 1.26

2020-10-22 Thread Julian Hyde
s. > > Regards, Igor > > On 10 Oct 2020, 12:56 +0300, Igor Lozynskyi , wrote: > > Hi! > > I created a JIRA ticket regarding this issue: > https://issues.apache.org/jira/browse/CALCITE-4325 > > Regards, > Igor Lozynskyi > On 9 Oct 2020, 23:24 +0300, Julian Hyde , wro

Re: RelBuilder#project should try keep alias in optimizer

2020-10-22 Thread Julian Hyde
le) >> calling in some rules, does this meets the expect, if we don't want to keep >> alias in optimizer. >> >> >> Regards! >> >> Aron Tao >> >> >> Julian Hyde 于2020年10月22日周四 下午3:29写道: >> >>> See my comments in 1

Re: Generate a empty Aggregate after RelFieldTrimmer#trim

2020-10-22 Thread Julian Hyde
I agree with you that a LogicalAggregate with no fields is problematic. This is the topic of https://issues.apache.org/jira/browse/CALCITE-4317 . Let’s continue discussion there. Julian > On Oct 20, 2020, at 8:29 PM, JiaTao Tao wrote: > > H

Re: RelBuilder#project should try keep alias in optimizer

2020-10-22 Thread Julian Hyde
See my comments in 1584. I think that answers your question. Julian > On Oct 21, 2020, at 23:35, JiaTao Tao wrote: > > Hi Danny > Thanks for your reply, can you explain "Calcite only optimize based on the > field input refs, if we always keep the alias, there are many cases that > can not be p

[jira] [Created] (CALCITE-4349) Support GROUP_CONCAT aggregate function for MySQL

2020-10-21 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4349: Summary: Support GROUP_CONCAT aggregate function for MySQL Key: CALCITE-4349 URL: https://issues.apache.org/jira/browse/CALCITE-4349 Project: Calcite Issue

Re: [QUESTION] Does SQL standard allows project nested fields for aggregate ?

2020-10-20 Thread Julian Hyde
I think that your first query, SELECT f0.a, max(f1) FROM t1 GROUP BY f0 should be valid. I don't know whether the SQL standard thinks it should be valid, or whether Calcite can handle it. And I don't know why PostgreSQL has a problem with it. Julian On Mon, Oct 19, 2020 at 9:41 PM Danny Chan

Re: why DECIMAL is in SqlTypeName#EXACT_TYPES but DOUBLE is in SqlTypeName#APPROX_TYPES

2020-10-19 Thread Julian Hyde
Calcite aims to cover the SQL standard, but it is not limited to it. So, given that the MOD operator in the standard does not cover DOUBLE, the conversation should shift to which other DBs support it. Is there a consensus as to the semantics? Are there related features that we should do too? Juli

Re: How to test new datasource without "in memory/mock" implementation

2020-10-17 Thread Julian Hyde
This would be inconvenient for me personally. My company does not allow me to run Docker on my work computer. Julian > On Oct 17, 2020, at 11:31 PM, Tugdual Grall wrote: > > Hi > > I have created this PR to share with the community what could be done: > * https://github.com/apache/calcite/p

Re: How to test new datasource without "in memory/mock" implementation

2020-10-17 Thread Julian Hyde
We need a solution that everyone can use easily. Ideally, contributors to the rest of Calcite - say Calcite core - should not have to spend extra effort, or experience any extra delay or flakiness, in order to verify that they have not broken the Redis adapter. The nearest example we have today is

Re: [DISCUSS] Apache Calcite Online Meetup January 2021

2020-10-15 Thread Julian Hyde
Nice idea, Stamatis. I'm happy to give a talk if people want to hear it - possible topics include geospatial in Calcite, quick intro to RelBuilder, and lattices/materialized views. On Thu, Oct 15, 2020 at 10:35 AM Rui Wang wrote: > > I can give a small talk (10 to 20 mins) about changes of Calcit

Re: DISCUSS: the concept of duplicate insensitive aggregate functions

2020-10-13 Thread Julian Hyde
ptimizations can be > applied. > Any feedback is appreciated. > > Best, > Liya Fan > > > > On Wed, Oct 14, 2020 at 2:59 AM Julian Hyde wrote: > > > I agree. ANY_VALUE and SINGLE_VALUE are duplicate-insensitive. > > > > > On Oct 13, 2020, at 2:17

Re: DISCUSS: the concept of duplicate insensitive aggregate functions

2020-10-13 Thread Julian Hyde
ANY_VALUE and SINGLE_VALUE also belong to the category of > duplicate insensitive functions. > What do you think? > > Best, > Liya Fan > > > > On Tue, Oct 13, 2020 at 4:55 PM Julian Hyde wrote: > >> We already have this concept. See SqlAggFunction.getDistinctO

Re: DISCUSS: the concept of duplicate insensitive aggregate functions

2020-10-13 Thread Julian Hyde
We already have this concept. See SqlAggFunction.getDistinctOptionality(), added in https://issues.apache.org/jira/browse/CALCITE-3159 . Julian > On Oct 13, 2020, at 12:54 AM, Fan Liya wrote: > > Hi all, > > I would like to introduce the i

[jira] [Created] (CALCITE-4335) Aggregate functions for BigQuery

2020-10-12 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4335: Summary: Aggregate functions for BigQuery Key: CALCITE-4335 URL: https://issues.apache.org/jira/browse/CALCITE-4335 Project: Calcite Issue Type: Bug

[jira] [Created] (CALCITE-4334) TRUE_AGG, an aggregate function that always returns TRUE

2020-10-12 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4334: Summary: TRUE_AGG, an aggregate function that always returns TRUE Key: CALCITE-4334 URL: https://issues.apache.org/jira/browse/CALCITE-4334 Project: Calcite

Re: Draft board report for October 2020

2020-10-09 Thread Julian Hyde
Stamatis, Your "commits by non-committers" metric is a good one. I think it might also be nice to call out, by name, the committers who are committing non-committers' PRs. (Much more constructive than shaming committers who are committing their own changes but no one else's.) Vladimir, Very nic

[jira] [Created] (CALCITE-4324) sqlline is broken

2020-10-09 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4324: Summary: sqlline is broken Key: CALCITE-4324 URL: https://issues.apache.org/jira/browse/CALCITE-4324 Project: Calcite Issue Type: Bug Reporter

[jira] [Created] (CALCITE-4323) View with ORDER BY throws AssertionError during view expansion

2020-10-09 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4323: Summary: View with ORDER BY throws AssertionError during view expansion Key: CALCITE-4323 URL: https://issues.apache.org/jira/browse/CALCITE-4323 Project: Calcite

Re: Potential issue with RexSimplify/Sarg in Calcite 1.26

2020-10-09 Thread Julian Hyde
Those cases you have found are indeed regressions. Please log a JIRA case. For the record, I am still a strong believer in the Sarg approach. Expressions such as (deptno <> 20 OR deptno IS NULL) AND deptno = 10 are complex when expressed as ANDs and ORs but can become a single Sarg and therefo

Re: CALCITE-2269 Enable Error-Prone checking

2020-10-06 Thread Julian Hyde
Fine, but please create a new JIRA case. https://issues.apache.org/jira/browse/CALCITE-2269 was fixed and closed 18 months and should have remained closed. On Tue, Oct 6, 2020 at 2:23 PM Vladimir Sitnikov wrote: > > Hi, > > I've added Error-Prone verification to GitHub Actions CI in > https://git

Re: DISCUSS: release vote text (was [VOTE] Release apache-calcite-1.26.0)

2020-10-06 Thread Julian Hyde
d the links) of the email. > FYI, I have created https://issues.apache.org/jira/browse/CALCITE-4312 to > track this issue. > > Best, > Ruben > > > On Tue, Oct 6, 2020 at 7:15 PM Julian Hyde wrote: > > > The release email has been getting longer and longer because eac

Re: Draft board report for October 2020

2020-10-06 Thread Julian Hyde
The report looks good. The backlog of pull requests continues to be a concern. I think we should track a metric so we know how we are doing, and strive to improve it. How about "percentage of pull requests that are open after three months"? Julian On Tue, Oct 6, 2020 at 7:37 AM Stamatis Zampetak

Re: DISCUSS: release vote text (was [VOTE] Release apache-calcite-1.26.0)

2020-10-06 Thread Julian Hyde
The release email has been getting longer and longer because each release manager seems to want to add 'helpful' stuff. But we need to stay focused on the goal of the release vote: verify the integrity of the source distribution. The extra stuff in the email can be a distraction from that task. I

[jira] [Created] (CALCITE-4305) Implicit column alias for single-column UNNEST

2020-10-03 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4305: Summary: Implicit column alias for single-column UNNEST Key: CALCITE-4305 URL: https://issues.apache.org/jira/browse/CALCITE-4305 Project: Calcite Issue

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

2020-10-03 Thread Julian Hyde
Thanks for preparing an RC. Here's a link to the release notes: https://github.com/apache/calcite/blob/cfa37c3fd6ae18894035721d9f1eacde40e6b268/site/_docs/history.md These release vote emails are getting longer and longer. I don't think that's a good thing, and we should discuss it in another thr

[jira] [Created] (CALCITE-4298) Avoid disabling hostname verification on HTTPS connections

2020-09-30 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4298: Summary: Avoid disabling hostname verification on HTTPS connections Key: CALCITE-4298 URL: https://issues.apache.org/jira/browse/CALCITE-4298 Project: Calcite

Re: Code of Spark in the Core

2020-09-30 Thread Julian Hyde
The SparkContext is a bit embarrassing. Most adapters are able to create a connection based on purely textual credentials, but the Spark adapter has to start off from an object. So, SparkContext is part of the Calcite instance. It could perhaps be cleaned up, but on the other hand it is not doin

Re: Sqlline error when openning a model-based connection

2020-09-30 Thread Julian Hyde
I’ve not run Calcite using AdoptOpenJDK, so that would be my chief suspect. Does this problem occur if you use regular OpenJDK 13? Note that the runtime is able to find the required classes, it just doesn’t like what it finds. > On Sep 30, 2020, at 11:58 AM, Gramana, Zachary (GE Digital) > wr

Re: [DISCUSS] Towards Calcite 1.26.0

2020-09-30 Thread Julian Hyde
> PS. I wonder what everybody think of > https://github.com/apache/calcite/pull/2182 (enable error-prone > verifications) I’m in favor it, but since it’s a large change (and therefore potential for merge conflicts), timing will be important. Early in 1.27 is probably the best timing. Julian

Re: [DISCUSS] Sarg (search argument) to generalize and replace IN in RexCall

2020-09-29 Thread Julian Hyde
antime let's also request them to promote the respective APIs > from beta. > > Best, > Stamatis > > [1] https://github.com/google/guava/wiki/PhilosophyExplained > > On Tue, Sep 29, 2020 at 9:31 PM Julian Hyde wrote: > >> For the record, the Druid adapter has used R

Re: [DISCUSS] Towards Calcite 1.26.0

2020-09-29 Thread Julian Hyde
us on 4279 (SEARCH operator into Druid)? > > Ruben > > > > Le mar. 29 sept. 2020 à 19:51, Julian Hyde a > écrit : > >> Thursday sounds good. >> >> I am working on getting 3752 (PIVOT) and 4238 (parser configuration) >> passing CI and merged. (4238

Re: [DISCUSS] Sarg (search argument) to generalize and replace IN in RexCall

2020-09-29 Thread Julian Hyde
For the record, the Druid adapter has used RangeSet for a long while, and it made sense, because Druid was doing tricky computations on date ranges. Introducing Sargs brought that style to other parts of Calcite. If someone was to build an adapter similar to the Druid adapter, based on 1.26, ex

Re: [DISCUSS] Sarg (search argument) to generalize and replace IN in RexCall

2020-09-29 Thread Julian Hyde
> On Sep 29, 2020, at 11:40 AM, Vladimir Sitnikov > wrote: > > Julian>Suppose - worst case scenario - that Guava 30 removes RangeSet. The > solution would be for us to copy RangeSet and enough dependent classes into > Calcite to serve our needs > > Then all the clients would have to adjust p

Re: [DISCUSS] Towards Calcite 1.26.0

2020-09-29 Thread Julian Hyde
local feature branch): >>>>git rebase -i master >>>> (editor will be opened, "pick" first commit, "squash" the rest; then >> edit >>>> your final squashed commit message) >>>> Then you can force push. In your PR it shou

Re: [DISCUSS] Sarg (search argument) to generalize and replace IN in RexCall

2020-09-29 Thread Julian Hyde
I knew the risks going in, and I’m not very concerned. Suppose - worst case scenario - that Guava 30 removes RangeSet. The solution would be for us to copy RangeSet and enough dependent classes into Calcite to serve our needs. Our support for Guava 30 would be delayed by a month or two. Sarg is

[jira] [Created] (CALCITE-4294) Use JTS rather than ESRI as the underlying library for geospatial (ST_) functions

2020-09-29 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-4294: Summary: Use JTS rather than ESRI as the underlying library for geospatial (ST_) functions Key: CALCITE-4294 URL: https://issues.apache.org/jira/browse/CALCITE-4294

Re: [CassandraAdapter] selecting tuple elements always returns "null"

2020-09-28 Thread Julian Hyde
kQueue.runTask(ForkJoinPool.java:1056) >> at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) >> at >> java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) >> Suppressed: org.apache.calcite.util.TestUtil$ExtraInformation: With >> materiali

Re: [DISCUSS] The date to release Calcite 1.26.0

2020-09-28 Thread Julian Hyde
t;> >>>>> >>>>> >>>>>> Ruben , can we make sure that the next release happens before 8th >>>>> October? >>>>> >>>>>> I would do local tests for it before that. &

<    7   8   9   10   11   12   13   14   15   16   >