[jira] [Created] (CALCITE-5371) Library grgit 4.0.1 has disappeared from Maven Central

2022-11-07 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5371: Summary: Library grgit 4.0.1 has disappeared from Maven Central Key: CALCITE-5371 URL: https://issues.apache.org/jira/browse/CALCITE-5371 Project: Calcite

Re: Passing non-primitive objects between EnumerableConverter and the Queryable

2022-11-07 Thread Julian Hyde
I put info into DataContext? > 2. Is it safe to do the plan context as I have it working now and are > any of these objects safe to re-use between two queries and or threads? > 1. > CalciteSchema, RelDataTypeFactory, CalciteCatalogReader, SqlValidator > 2. I'm th

Re: Passing non-primitive objects between EnumerableConverter and the Queryable

2022-11-07 Thread Julian Hyde
The goal of Enumerable convention is to create a query plan that is Java source code. Along with that goes the idea that the plan can be run by something like a ‘public static void main’ method, where the only parameters are things you could pass from the command-line. We’re not literally that

[jira] [Created] (CALCITE-5369) In Avatica DateTimeUtils, add support for FLOOR and CEIL to ISOYEAR

2022-11-06 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5369: Summary: In Avatica DateTimeUtils, add support for FLOOR and CEIL to ISOYEAR Key: CALCITE-5369 URL: https://issues.apache.org/jira/browse/CALCITE-5369 Project

[jira] [Created] (CALCITE-5368) Automated site build should not bring changes to SQL reference

2022-11-06 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5368: Summary: Automated site build should not bring changes to SQL reference Key: CALCITE-5368 URL: https://issues.apache.org/jira/browse/CALCITE-5368 Project: Calcite

[jira] [Created] (CALCITE-5364) In materialized view substitution, use custom time frames

2022-11-02 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5364: Summary: In materialized view substitution, use custom time frames Key: CALCITE-5364 URL: https://issues.apache.org/jira/browse/CALCITE-5364 Project: Calcite

[jira] [Created] (CALCITE-5363) Move DATEADD, DATEDIFF, DATE_PART from Babel to Core parser

2022-11-02 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5363: Summary: Move DATEADD, DATEDIFF, DATE_PART from Babel to Core parser Key: CALCITE-5363 URL: https://issues.apache.org/jira/browse/CALCITE-5363 Project: Calcite

Custom time frames

2022-11-02 Thread Julian Hyde
I just pushed a draft PR for custom time frames [1] [2]. Can one or two people review? Julian [1] https://github.com/apache/calcite/pull/2960 [2] https://issues.apache.org/jira/browse/CALCITE-5155

Re: Duplicate ConnectionHandle-id when using Avatica

2022-10-27 Thread Julian Hyde
Are you using a load balancer? On Thu, Oct 27, 2022 at 12:48 AM Zhe Hu wrote: > > Hi, fellows, > I have an issue when using Avatica. > In AvaticaConnection, ConnectionHandle is used to make each connection > unique, whose id is generated by “UUID.randomUUID().toString()”. On the > server

[jira] [Created] (CALCITE-5347) Add 'SELECT ... BY', a syntax extension to eliminate duplicates and sort

2022-10-25 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5347: Summary: Add 'SELECT ... BY', a syntax extension to eliminate duplicates and sort Key: CALCITE-5347 URL: https://issues.apache.org/jira/browse/CALCITE-5347 Project

Re: Migrating away from Travis-CI

2022-10-24 Thread Julian Hyde
+1 > On Oct 24, 2022, at 3:49 PM, Francis Chuang wrote: > > Travis will no longer be available for ASF projects at the end of 2022. > > For Calcite, only the calcite and calcite-avatica repos use travis and those > projects are also using Github Actions already. Perhaps in our case we will >

Re: Regarding access to GitHub

2022-10-21 Thread Julian Hyde
I don’t think you need access to the repo. People generally create a fork of the repo, create a branch in that fork specific to the change, and then create a pull request from that branch. For example https://github.com/apache/calcite/pull/2937 is

Re: Using Calcite in a multi-tenant application

2022-10-20 Thread Julian Hyde
First, remember that the Calcite "interface Schema" is quite low level. It is basically a namespace that contains a set of tables and a set of sub-schemas. You can, and probably should, make it immutable. A Schema instance doesn’t know its own name or path. That allows you to “mount” it (as

Re: RelOptRulesTest.java and RelOptRulesTest.xml

2022-10-20 Thread Julian Hyde
Do you think that RelOptRulesTest should fail if the resources are not sorted alphabetically? (I thought it did that at some point… I may be wrong. Anyway, I am a fan of ‘fail fast’. The person who introduces the error should be the person to fix it.) > On Oct 20, 2022, at 9:20 AM, Alessandro

Re: Avatica Pull Requests

2022-10-19 Thread Julian Hyde
n, Oct 16, 2022 at 10:15 PM Francis Chuang > >> wrote: > >> > >>> Thanks Julian! Would other community members be able to help us here? > >>> > >>> Francis > >>> > >>> On 15/10/2022 5:54 am, Julian Hyd

[jira] [Created] (CALCITE-5338) In Avatica's DateTimeUtils, replace floorDiv and floorMod with equivalents in java.lang.Math

2022-10-19 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5338: Summary: In Avatica's DateTimeUtils, replace floorDiv and floorMod with equivalents in java.lang.Math Key: CALCITE-5338 URL: https://issues.apache.org/jira/browse/CALCITE-5338

Re: Calcite Incorrect syntax for the keyword 'BEGIN'

2022-10-19 Thread Julian Hyde
BEGIN is procedural SQL. We'd like to add it, but it has not been implemented. See https://issues.apache.org/jira/browse/CALCITE-4728. On Wed, Oct 19, 2022 at 8:06 AM Nagaraj Tantri wrote: > > Hi, > > We are trying to use Apache Calcite for one of our projects with the > following configuration,

Re: Help with adding Spark functionality

2022-10-19 Thread Julian Hyde
According to this [1] FIRST is a synonym for FIRST_VALUE, which Calcite already has. Please log a Jira case describing the feature you want. Then design discussions can occur against that case. Have a look through the commit log at how people have added dialect-specific functions. Usually adding

Re: [for help] Should I change my commit user.email?

2022-10-17 Thread Julian Hyde
It happens to the best of us! It turns out that I've used not fewer than 5 different combinations over the years: $ git log --author=hyde|grep Author:|sort |uniq Author: Julian Hyde Author: Julian Hyde Author: Julian Hyde Author: julianhyde Author: julianhyde These days I prefer to use my

[ANNOUNCE] New committer: Bertil Chapuis

2022-10-16 Thread Julian Hyde
Apache Calcite's Project Management Committee (PMC) has invited Bertil Chapuis to become a committer, and we are pleased to announce that he has accepted. Over a few months, Bertil has revitalized Calcite's geospatial support, with commits that switched our geospatial library from ESRI to the

Re: Avatica Pull Requests

2022-10-14 Thread Julian Hyde
I’ll review a couple of PRs if two or three people volunteer to review a couple. Julian > On Oct 13, 2022, at 2:45 PM, Francis Chuang wrote: > > Hey everyone, > > There are currently 13 open pull requests for Avatica[1]. Since we're not in > the middle of a Calcite release, would it be

Re: Query with "WITH" clause is failing after calcite upgrade

2022-10-14 Thread Julian Hyde
I’d be surprised if a query of that shape is sufficient to reproduce the case. So the problem is with your schema. But your “schema” doesn’t look like something that would fit into a Calcite JSON model file. If you can come up with a reproducible test case, you should log a jira case. > On

Re: Consider using bi-directional links in JIRA

2022-10-14 Thread Julian Hyde
+1 Thanks for this reminder, Stamatis. Bi-directional links help us navigate around the graph of related issues, identify duplicate bugs, do forensics, and also to break down the roadmap (aspirational features) into smaller, incremental tasks. I use them a lot. Our Jira instance is an amazing

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

2022-10-10 Thread Julian Hyde
+1 (binding) Thank you for another efficient Go release, Francis. I downloaded; checked checksums/signatures; compared with git; checked README.md, LICENSE, NOTICE, file headers; read release notes and history. (Did not build or run tests.) Julian On Sun, Oct 9, 2022 at 7:21 PM Francis Chuang

Re: Towards Avatica-Go 5.2.0

2022-10-07 Thread Julian Hyde
+1 Thanks Francis. > On Oct 7, 2022, at 1:55 AM, Francis Chuang wrote: > > Hey everyone, > > I think it's a good time to release Avatica-Go 5.2.0 as 5.1.0 was released > around 7 months ago. This should be a straight-forward release and I'll be > making rc0 available for voting early next

Re: Pushing filters with unsafe operations (CAST/DIVISION) below inner joins

2022-10-07 Thread Julian Hyde
100 - 90`, evaluated in this order, overflow, but `100 - >>> 90 >>> + 100` don't - imagine each value comes from a different table and we >>> reorder the joins. Perhaps result of TINYINT addition can be SMALLINT, but >>> what if they are BIGINTs? >>>

Re: Infix cast precedence

2022-10-05 Thread Julian Hyde
recedence table: > https://www.postgresql.org/docs/14/sql-syntax-lexical.html#SQL-PRECEDENCE , > it looks like Calcite is consistent with Postgresql. > > Thanks for the response. > > On Wed, Oct 5, 2022 at 6:52 AM Julian Hyde wrote: > >> Infix cast comes from Postgres.

Re: Infix cast precedence

2022-10-04 Thread Julian Hyde
Infix cast comes from Postgres. Can someone find a table of operator precedence in Postgres? Perhaps write a test case involving operators with slightly higher and lower precedence, so we can check that Calcite is consistent. > On Oct 4, 2022, at 10:20 AM, Itiel Sadeh > wrote: > > Hello, >

Re: [DISCUSS] restrict JDK test matrix

2022-10-03 Thread Julian Hyde
It makes sense to only test on 8, 11, 17 and the latest. Testing on other versions is going to waste time checking on false negatives. I don’t remember whether there’s ever been an issue on, say, 15, that wasn’t also present in 11 or 17. Maybe it’s a distinction without a difference, but I

Re: Draft: board report for 2022 Q3

2022-10-02 Thread Julian Hyde
| contributor_commits | >>> +-+-+-+ >>> | 2022| 7 | 0 | >>> | 2022| 8 | 5 | >>> | 2022| 9 | 15 | >>> +--

Re: Does someone interested in integration calcite + PostgreSQL wire protocol ?

2022-10-01 Thread Julian Hyde
Thanks for trying, Dmitry. This happens a lot in commercial open source (see Calcite’s Spark adapter, for instance) but once in a while you get lucky, and that makes it worthwhile. Julian > On Sep 28, 2022, at 3:18 AM, Dmitry Sysolyatin > wrote: > > Hello! > I had a long discussion with

Re: Retrieve data from JSON file instead of database

2022-09-28 Thread Julian Hyde
I have thought about building a similar capability. The question is, how to package it? Maybe a ‘Replay Adapter’ that looks like a Schema, sits on top of another Schema (which is almost certainly backed by a JDBC adapter). The Replay Adapter has a key-value store of some kind, where the key is

Re: Testing function definitions for the Babel SQL parser

2022-09-28 Thread Julian Hyde
Do the functions have non-standard syntax? If so then will probably have to be in Babel. If not they could go into Core (and SqlLibraryOperators). Please log a jira case for your work. They will need to be specified at some point, the earlier the better. The SqlOperatorTests format is a bit

Re: Going to ApacheCon?

2022-09-27 Thread Julian Hyde
> Hi Julian, > > I will already attend another BoaF session but looking forward to see you > and others from the Calcite community. > > Best regards, > > Martijn > > On Mon, Sep 19, 2022 at 8:50 PM Julian Hyde wrote: > >> Anyone going to Apac

Re: mocking service for Database

2022-09-26 Thread Julian Hyde
gt;> On Mon, Sep 26, 2022 at 12:03 PM Kartik Kudada > >> wrote: > >> > >> > Thanks for the quick response. > >> > > >> > org.apache.calcite.adapter.csv is in the file module. > >> > I tried to add example and file mod

Re: mocking service for Database

2022-09-26 Thread Julian Hyde
Or, better, the file adapter. It also handles CSV files and is not “toy” code. Julian > On Sep 26, 2022, at 08:20, Michael Mior wrote: > > Do you have the calcite-csv package as a dependency of your project? This > must be added in addition to calcite-core. > -- > Michael Mior >

[jira] [Created] (CALCITE-5295) Read the values of plugins (such as connect string properties) from ThreadLocal fields

2022-09-21 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5295: Summary: Read the values of plugins (such as connect string properties) from ThreadLocal fields Key: CALCITE-5295 URL: https://issues.apache.org/jira/browse/CALCITE-5295

[jira] [Created] (CALCITE-5292) Add a policy that can prevent SQL statements from running if they contain certain functions / operators

2022-09-20 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5292: Summary: Add a policy that can prevent SQL statements from running if they contain certain functions / operators Key: CALCITE-5292 URL: https://issues.apache.org/jira/browse

[jira] [Created] (CALCITE-5290) Add DATE_TRUNC function consistent with Postgres

2022-09-19 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5290: Summary: Add DATE_TRUNC function consistent with Postgres Key: CALCITE-5290 URL: https://issues.apache.org/jira/browse/CALCITE-5290 Project: Calcite Issue

Going to ApacheCon?

2022-09-19 Thread Julian Hyde
Anyone going to ApacheCon in New Orleans? Would you be interested in a Birds of a Feather (BoaF) session on Monday evening? We should organize one now, before the best rooms are taken. Julian

Re: Parsing PostgreSQL related operators (BEGIN, DISCARD, SHOW TRANSACTION ISOLATION)

2022-09-19 Thread Julian Hyde
Can you elaborate on why Babel is not the right place? (I don’t agree or disagree, but we need to hear justification. Creating another parser would have continuing maintenance cost.) Julian > On Sep 19, 2022, at 2:59 AM, Dmitry Sysolyatin > wrote: > > Hi! > Babel parser can't parse

Re: Avatica http api

2022-09-17 Thread Julian Hyde
I believe these metadata requests all get an ExecuteResponse [1]. It’s the same response as if you’d executed a SQL query. Julian [1] https://calcite.apache.org/avatica/docs/json_reference.html#executeresponse > On Sep 17, 2022, at 02:04, Henri Godron wrote: > > Hello, > > Is there a

Re: Bug in the Bushy join optimization for outer joins with nullable columns

2022-09-17 Thread Julian Hyde
There are is ’netiquette’ around filing a bug that is often unsaid, so I’ll say it now: 1. When a committer asks you in an email to file a Jira case, you must file the case, and you must reply to the email with the URL of the case. (Rationale: People have expanded time and effort researching

Re: Jira project admin privileges

2022-09-17 Thread Julian Hyde
The following 15 people are administrators in jira: Andrei Sereda Chunwei Lei Danny Chen Francis Chuang Hasheng Yuan Hongze Zhang Jesus Camacho Rogriguez Josh Elser Julian Hyde Kevin Risden Liya Fan Michael Mior Stamatis Zampetakis Vova Vysotskyi In my opinion, any PMC member should be given

Re: Requesting Information Regarding Enumerable

2022-09-16 Thread Julian Hyde
We don’t necessary want you to extend existing classes. If we change the base class in future, your code breaks, and you complain that we have broken semantic versioning. Making things private is, in that sense, a feature. If what you are doing is a feature that would benefit other Calcite

Re: SQL reference is missed in docs

2022-09-16 Thread Julian Hyde
People have noted that the docs disappeared when the site was automatically deployed [1]. I haven’t had chance to look into the cause/solution yet. Julian [1] https://github.com/apache/calcite-site/commit/feffd77674d8ea555b36ccfb235fead34942d945#r84156246 > On Sep 16, 2022, at 6:51 AM,

Re: Understanding SqlTypeFamily of DATETIME

2022-09-14 Thread Julian Hyde
DATETIME is a type family, not a type. (Yeah, I know that some databases have a DATETIME type, but the SQL standard doesn’t.) I don’t know all the details, but I recall that a type family is used as a shorthand for a family of closely related types that can be implicitly converted from one to

[jira] [Created] (CALCITE-5283) Add ARG_MIN, ARG_MAX (aka MIN_BY, MAX_BY) aggregate functions

2022-09-12 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5283: Summary: Add ARG_MIN, ARG_MAX (aka MIN_BY, MAX_BY) aggregate functions Key: CALCITE-5283 URL: https://issues.apache.org/jira/browse/CALCITE-5283 Project: Calcite

Re: Publishing site, javadoc, news

2022-09-10 Thread Julian Hyde
I'll need update the workflow to account for this edge case. Francis On 11/09/2022 2:57 am, Julian Hyde wrote: Does anyone (probably a previous release manager) know whether the site, javadoc, news are published automatically by release scripts? It seems that the site and javadoc are generated

[ANNOUNCE] Apache Calcite 1.32.0 released

2022-09-10 Thread Julian Hyde
at: https://calcite.apache.org/ Thanks to everyone involved! Julian Hyde, on behalf of the Apache Calcite Team

Publishing site, javadoc, news

2022-09-10 Thread Julian Hyde
Does anyone (probably a previous release manager) know whether the site, javadoc, news are published automatically by release scripts? It seems that the site and javadoc are generated automatically on release. But if I add a news item after the release and push it to main, does the site get

[RESULT] [VOTE] Release Apache Calcite 1.32.0 (release candidate 0)

2022-09-10 Thread Julian Hyde
-- > > > Gradle 7.3.3 > > > ---- > > > > > > Build time: 2021-12-22 12:37:54 UTC > > > Revision: 6f556c80f945dc54b50e0be633da6c62dbe8dc71 > > > > > > Kotlin: 1.5.31

[VOTE] Release Apache Calcite 1.32.0 (release candidate 0)

2022-09-09 Thread Julian Hyde
Hi all, I have created a build for Apache Calcite 1.32.0, release candidate 0. Thanks to everyone who has contributed to this release. You can read the release notes here: https://github.com/apache/calcite/blob/calcite-1.32.0-rc0/site/_docs/history.md The commit to be voted upon:

Re: [DISCUSS] Towards Calcite 1.32.0

2022-09-08 Thread Julian Hyde
in > > > > place for taking advantage of MULTISET functionality, much-appreciated > > if > > > > you want to return nested hierarchical results. > > > > > > > > - [CALCITE-4188] Support EnumerableBatchNestedLoopJoin > > inJdbcToEnumerab… >

[jira] [Created] (CALCITE-5278) Upgrade Janino from 3.1.6 to 3.1.8

2022-09-08 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5278: Summary: Upgrade Janino from 3.1.6 to 3.1.8 Key: CALCITE-5278 URL: https://issues.apache.org/jira/browse/CALCITE-5278 Project: Calcite Issue Type: Bug

Re: [DISCUSS] Towards Calcite 1.32.0

2022-09-08 Thread Julian Hyde
en more than one month since our last release. It is a good time > to keep momentum and try to move on with the next one. > > On a separate thread, Julian Hyde volunteered to be Release Manager for > this one (thanks Julian!). > > As usual, there are several unresolved tickets [1]

Re: How to get lineage for virtual column

2022-09-08 Thread Julian Hyde
You know, when people ask ‘Does Calcite support lineage?’, I’m never quite sure. People mean different things by lineage, and it takes a bit of effort to set up the required APIs. I think the way to solve this question is with unit tests. Can write a unit test that fails, or point to an

[jira] [Created] (CALCITE-5275) Release Calcite 1.32.0

2022-09-07 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5275: Summary: Release Calcite 1.32.0 Key: CALCITE-5275 URL: https://issues.apache.org/jira/browse/CALCITE-5275 Project: Calcite Issue Type: Bug

Re: Contribute to Apache Calcite [wenzhuang.zwz]

2022-09-05 Thread Julian Hyde
Please also subscribe to the dev list. Julian > On Sep 5, 2022, at 21:19, Francis Chuang wrote: > > Welcome to Calcite! > > I've added you as a contributor in jira. > > Francis > >> On 6/09/2022 2:17 pm, 朱文状 wrote: >> Hi, >> I want to contribute to Apache Calcite. Would you please give me

[jira] [Created] (CALCITE-5262) Add functions to support WKB (well-known binary) and GeoJSON

2022-09-02 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5262: Summary: Add functions to support WKB (well-known binary) and GeoJSON Key: CALCITE-5262 URL: https://issues.apache.org/jira/browse/CALCITE-5262 Project: Calcite

Re: Is there a way to preserve milliseconds and nanoseconds when use dynamic parameters ?

2022-09-01 Thread Julian Hyde
I don’t think there’s a way to preserve microseconds and nanoseconds. That would require more than 64 bits of numeric precision. Can you log a jira case for the feature that you think would fix this? I think first we need a way to internally represent TIMESTAMP(n) for n > 3. Then we also need

Re: Error while unparsing FLOOR function using Postgres dialect

2022-09-01 Thread Julian Hyde
Parag, I think you’ve found a bug. Please follow the usual process: Log a jira case. Provide a PR with a test case, or, better, a PR with a test case and a fix. > On Sep 1, 2022, at 8:41 AM, Parag Jain wrote: > > I think the biggest difference is I am calling toSql on SqlNode whereas the >

Re: [DISCUSS] Support for MATCH_RECOGNIZE functionality enhancement

2022-08-31 Thread Julian Hyde
https://www.iso.org/standard/84485.html or perhaps in the >> currently under development https://www.iso.org/standard/76583.html ? >> >> Thanks, >> >> Martijn >> >> Op ma 18 jul. 2022 om 07:53 schreef Nicholas Jiang < >> nicholasji...@

[jira] [Created] (CALCITE-5255) gRPC transport for Avatica

2022-08-30 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5255: Summary: gRPC transport for Avatica Key: CALCITE-5255 URL: https://issues.apache.org/jira/browse/CALCITE-5255 Project: Calcite Issue Type: Bug

Re: SqlScopedShuttle basic usage

2022-08-25 Thread Julian Hyde
Short answer is that it was developed for use by Calcite’s validator, not intended for third-party use. > On Aug 24, 2022, at 10:56 AM, Shawn Yarbrough > wrote: > > Hi, > > Why does SqlScopedShuttle only have a constructor taking a > SqlValidatorScope when the SqlValidator used by

Re: JDBC Pushdown Question

2022-08-25 Thread Julian Hyde
Calcite doesn’t currently have that capability. The mapping between functions in Calcite and functions in a JDBC back-end is currently all hard-coded in the JDBC adapter. Julian > On Aug 25, 2022, at 7:36 AM, Charles Givre wrote: > > Hello Calcite devs, > I had a question about pushdowns

Re: Additional parameters to be passed with model json

2022-08-23 Thread Julian Hyde
The general idea is that schemas are created before connections, look the same to everyone, and continue to live after connections close. You’d be breaking that principle, so you should be careful. Maybe you can write a SchemaFactory that can see some of the connection parameters, maybe via a

Re: How are custom UDFs, operators and their implementations provided to Calcite when using JdbcMeta?

2022-08-23 Thread Julian Hyde
Ian, When you say ‘our approach’ and ‘our users’, I guess you are talking about your organization as opposed to the Calcite community in general. You say you are ‘using JdbcMeta’ but I don’t really understand what that means. Can you expand on your use case/environment? I think of Java UDFs

Re: Is column aliasing supported?

2022-08-22 Thread Julian Hyde
radata [1]? Are there any more > semantics to be defined? > > > [1] - > https://docs.teradata.com/r/e79ET77~NzPDz~Ykinj44w/MKSYuTyx2UJWXzdHJf3~sQ > > On Sat, Aug 20, 2022 at 11:53 AM Julian Hyde wrote: > >> Agreed. Aliases-in-where (enabled by a compliance flag) is a

Re: Is column aliasing supported?

2022-08-20 Thread Julian Hyde
> >> >>>> On Aug 19, 2022, at 3:57 PM, Sean Broeder wrote: >>> >>> Thanks for the clarification >>> >>>> On Aug 19, 2022, at 3:23 PM, Julian Hyde > <mailto:jhyde.apa...@gmail.com>> wrote: >>>> >>&g

Re: How can I convert a BindableTableScan with projects and Fitlers back to a Rel Tree with a project node, a filter node and a tablescan node?

2022-08-20 Thread Julian Hyde
It doesn’t seem quite right to convert a physical RelNode directly to SQL. It’s probably better to map it back to logical RelNode(s) first. I don’t know whether we have the software to do that mapping. If we don’t, consider using planner rules. They’re often the right way in Calcite. Julian

Re: Problem with char type after upgrading from 1.30.0 to 1.31.0

2022-08-19 Thread Julian Hyde
sion. I just forgot to > pull the latest changes that I made before vacation :) > It did not work in older versions as well. > > Anyway, I agree with the suggestion to participate on RCs > > > > > On Fri, Aug 12, 2022 at 8:40 PM Julian Hyde wrote: > >> +1 to

Re: Dollar sign in identifiers

2022-08-19 Thread Julian Hyde
* with a dollar > sign, such as "$jk". > > On Tue, Aug 16, 2022 at 9:53 PM Julian Hyde wrote: > >> Probably a documentation mistake. Many databases allow ‘$’ and ‘#’ in >> identifiers. For example the following work on Oracle and MySQL: >> >

Re: Is there a way to add additional information to type ?

2022-08-19 Thread Julian Hyde
I’ve thought about adding annotations to (the internal representation of) Calcite types. We never got very far with it. It would be tricky because we canonize types, and so if you have two instances that represent, say, DECIMAL(10, 3) with different annotations, are they the same type? One

Re: Is column aliasing supported?

2022-08-19 Thread Julian Hyde
Column aliases are only available in the ORDER BY clause. In some dialect-compliance settings, they are also available in the GROUP BY and HAVING clauses. But not in the WHERE clause. > On Aug 19, 2022, at 2:22 PM, Sean Broeder wrote: > > > Hi, > Calcite is capable of handling a simple

Re: IndexOutOfBoundException, WITH and JOIN

2022-08-18 Thread Julian Hyde
> The query is invalid. When validating B there is no K in scope. > > I'm not sure that I understand this statement, could you kindly elaborate a > little more? > > Julian Hyde 于2022年8月18日周四 23:32写道: > >> The query is invalid. When validating B there is no

Re: IndexOutOfBoundException, WITH and JOIN

2022-08-18 Thread Julian Hyde
The query is invalid. When validating B there is no K in scope. This should be throwing a validation error in all Calcite versions. If it happens to run in some Calcite versions that is more luck than design. Can you log a jira case please? Julian > On Aug 18, 2022, at 6:00 AM, Egor Ryashin

Re: Dollar sign in identifiers

2022-08-16 Thread Julian Hyde
Probably a documentation mistake. Many databases allow ‘$’ and ‘#’ in identifiers. For example the following work on Oracle and MySQL: CREATE TABLE t (i INTEGER); SELECT i AS j$k FROM t; And this works on Oracle: SELECT i AS j#k FROM t; Julian > On Aug 16, 2022, at 12:11 AM, Itiel

Re: Calcite Join Optimizer Rule

2022-08-16 Thread Julian Hyde
Deciding join order is a basic function of cost-based query optimizers. It occurs not just with ‘dynamic filters’ or external sources, but with pretty much every join query. Consider this query: SELECT * FROM Emp AS e JOIN Dept AS d ON e.deptno = d.deptno WHERE e.job = ‘CLERK’ Emp is

Re: Why RexUtil.toCnf() has version that takes a limit but RexUtil.toDnf() doesn't ?

2022-08-12 Thread Julian Hyde
Git blame reveals that that line of code was added when fixing https://issues.apache.org/jira/browse/CALCITE-1290 . https://github.com/apache/calcite/commit/77315c06 . I see no reason why

Re: [ANNOUNCE] Andrei Sereda joins Calcite PMC

2022-08-12 Thread Julian Hyde
Congratulations and welcome, Andrei! Thank you for your service to the Calcite community. Julian On Aug 12, 2022, at 10:47 AM, Ruben Q L wrote: I am pleased to announce that Andrei has accepted an invitation to join the Calcite PMC. Andrei has been a consistent and helpful figure in the

Re: Problem with char type after upgrading from 1.30.0 to 1.31.0

2022-08-12 Thread Julian Hyde
ote process, so that we can spot any issue with > a RC as soon as possible, in order to avoid rolling out releases with > potential regressions. > > Best, > Ruben > > > On Fri, Aug 12, 2022 at 5:40 PM Julian Hyde wrote: > >> I don’t know whether we ever official

Re: Problem with char type after upgrading from 1.30.0 to 1.31.0

2022-08-12 Thread Julian Hyde
I don’t know whether we ever officially supported the Java ‘char’ type. It’s worth checking whether there are any tests for it. More generally: if your organization is using Calcite in an unconventional way, consider writing some tests for that area of functionality and contributing them. You

[jira] [Created] (CALCITE-5232) Upgrade protobuf-java from 3.17.1 to 3.21.5

2022-08-11 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5232: Summary: Upgrade protobuf-java from 3.17.1 to 3.21.5 Key: CALCITE-5232 URL: https://issues.apache.org/jira/browse/CALCITE-5232 Project: Calcite Issue Type

Re: Percentile_Disc return type

2022-08-07 Thread Julian Hyde
output will be the appropriate value from the input column. > > We can continue this discussion in the Jira ticket. > > Itiel > On Fri, Aug 5, 2022 at 9:00 PM Julian Hyde <mailto:jhyde.apa...@gmail.com>> wrote: > >> I’m not sure what Postgres has done, but it doe

Re: Technical Queries Regarding Pushing Down Joins & Unions To TableScans, Conventions

2022-08-06 Thread Julian Hyde
pter/jdbc/JdbcToEnumerableConverter.java >> [2] >> https://github.com/apache/calcite/blob/main/mongodb/src/main/java/org/apache/calcite/adapter/mongodb/MongoToEnumerableConverter.java >> [3] >> https://github.com/apache/calcite/blob/main/core/src/main/java/org/apache/cal

Re: Technical Queries Regarding Pushing Down Joins & Unions To TableScans, Conventions

2022-08-05 Thread Julian Hyde
Pranav, Please subscribe to this list. You have asked several questions, received replies, not acknowledged those replies, and asked further questions. Also, since you are not subscribed, each email you post has to go through manual moderation. Julian > On Aug 5, 2022, at 9:38 AM, Pranav

Re: Percentile_Disc return type

2022-08-05 Thread Julian Hyde
rence > cannot use the type of the column "x" when it's inferring the return type. > > Itiel > > On Thu, Aug 4, 2022 at 9:43 PM Julian Hyde wrote: > >> I believer that PERCENTILE_DISC was implemented in >> https://issues.apache.org/jira/browse/CALCITE-

Re: Percentile_Disc return type

2022-08-04 Thread Julian Hyde
I believer that PERCENTILE_DISC was implemented in https://issues.apache.org/jira/browse/CALCITE-4644 . There are open issues to support any sortable type [ https://issues.apache.org/jira/browse/CALCITE-4670

Re: Calcite Release 1.31 started

2022-08-03 Thread Julian Hyde
Sure enough, GitHub’s dependabot has already noticed the release and prompted me to upgrade to it [1]. Many thanks for being release manager, Andrei. It’s a lot of work, but a steady release cadence is vital to keeping the community engaged and the product secure. Julian [1]

Re: [VOTE] Release Apache Calcite 1.31.0 (release candidate 3)

2022-07-29 Thread Julian Hyde
Downloaded, checked sums and signatures, LICENSE, NOTICE, README, howto.md, history.md; compiled and ran tests using OpenJDK 18, Gradle 7.4.2 on Ubuntu Linux 5.4.0 x86_64; ran rat. +1 (binding) Julian > On Jul 29, 2022, at 8:48 AM, Benchao Li wrote: > > +1 (non-binding) > > - checked

[jira] [Created] (CALCITE-5223) AdjustProjectForCountAggregateRule throws ArrayIndexOutOfBoundsException

2022-07-28 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5223: Summary: AdjustProjectForCountAggregateRule throws ArrayIndexOutOfBoundsException Key: CALCITE-5223 URL: https://issues.apache.org/jira/browse/CALCITE-5223 Project

Re: Mysterious build state when modifying parser files

2022-07-28 Thread Julian Hyde
s3.build.cache=false just in case they > are handled differently (cannot check right now). > > Best, > Stamatis > > > [1] > https://github.com/apache/calcite/blob/94dc303ed0a5ccd4e4f972abf7a41f155cbe5546/gradle.properties#L22 > > On Fri, Jul 15, 2022, 3:25 AM J

Re: [VOTE] Release Apache Calcite 1.31.0 (release candidate 0)

2022-07-28 Thread Julian Hyde
> Andrei wrote: > > 1.32 history section is being added as a jekyll comment and is not visible > on the public site Oops, my bad. I didn’t notice the comment markers. I should have reviewed more carefully. I think it’s fine to leave it in. > Overall I'm inclined to create RC1 mainly because of

Re: [VOTE] Release Apache Calcite Avatica 1.22.0 (release candidate 0)

2022-07-26 Thread Julian Hyde
Thanks for being release manager, Francis. Downloaded, checked signatures and hashes, LICENSE, README, howto.md, history.md; compiled and ran tests on Ubuntu Linux, OpenJDK 18, Gradle 7.4.2; ran rat. +1 (binding) Note: * javac emits deprecation warnings under OpenJDK 18. Julian On Tue, Jul

Re: [DISCUSS] Towards Calcite 1.31.0

2022-07-25 Thread Julian Hyde
roperties. Maybe because of the pushRepositoryProvider > override ? > > > > On Fri, Jul 22, 2022 at 10:47 PM Andrei Sereda wrote: > > > Thanks, Julian. I did include GITBOX in the prepare vote command. > > > > $ gradle prepareVote -Prc=0 -Pasf -Pasf.git.pushRepositoryProvider=GITBOX

Re: [Discuss] CommonSubExpressions Optimize

2022-07-22 Thread Julian Hyde
>> FROM "hr"."emps" >> ``` >> >> I'm thinking about using the optimization of Calc, but change CalcToSql. >> What do you think? >> FYI: In my project, I convert HiveSQL to PrestoSQL, and use some >> optimizations of Calcite. >> >

Re: [DISCUSS] Towards Calcite 1.31.0

2022-07-22 Thread Julian Hyde
tPushTask.kt:54) > > On Thu, Jul 21, 2022 at 1:14 AM Andrei Sereda wrote: > > > Hi Julian, > > > > I think it is a great idea. > > > > Please take a look at proposed release notes: > > https://github.com/apache/calcite/pull/2858 > > > >

Re: Serializing parsed SqlNode/AST

2022-07-22 Thread Julian Hyde
I don’t know of any such facility. I suppose someone could do for AST trees what RelJson and RelWriterTest do for RelNode trees. Can you please log a Jira case for this? It’s good to have a placeholder in case someone feels like picking it up in future. Julian [1]

Re: "Proxying" schema that intercepts calls to members and returns stub values?

2022-07-20 Thread Julian Hyde
That is probably very straightforward to write. The nearest thing that currently exists is CloneSchema, which I would describe as a ‘caching proxy’. You could copy it and make each table return a single row of all ones. Or I would be inclined to return the ‘zero’ value for each datatype (0 for

<    1   2   3   4   5   6   7   8   9   10   >