Re: Preserving alias/Frames in RelBuilder when extending RelBuilder?

2024-06-24 Thread Julian Hyde
I don’t want to encourage people to subclass RelBuilder. It is not designed to be extended by subclassing. Having said that, it seems reasonable to provide a way to find the table aliases. In https://issues.apache.org/jira/browse/CALCITE-4946 I added the method RelBuilder.size(); I was

Re: About CommunityOverCode Asia 2024 Share on calcite

2024-06-23 Thread Julian Hyde
Do you know the story of the blind men and the elephant? [1] Each man touches a different part of the elephant, so they assume they are touching a different animal. Well, Calcite is like that elephant. We all experience different parts of it. (I don’t experience Calcite in production very

[jira] [Created] (CALCITE-6447) extract common expressions for disjunctions in Join

2024-06-23 Thread ruanhui (Jira)
ruanhui created CALCITE-6447: Summary: extract common expressions for disjunctions in Join Key: CALCITE-6447 URL: https://issues.apache.org/jira/browse/CALCITE-6447 Project: Calcite Issue Type:

[jira] [Created] (CALCITE-6446) Add CONCAT_WS function (enabled in Spark library)

2024-06-23 Thread EveyWu (Jira)
EveyWu created CALCITE-6446: Summary: Add CONCAT_WS function (enabled in Spark library) Key: CALCITE-6446 URL: https://issues.apache.org/jira/browse/CALCITE-6446 Project: Calcite Issue Type:

[jira] [Created] (CALCITE-6445) Add REVERSE function (enabled in Spark library)

2024-06-23 Thread EveyWu (Jira)
EveyWu created CALCITE-6445: Summary: Add REVERSE function (enabled in Spark library) Key: CALCITE-6445 URL: https://issues.apache.org/jira/browse/CALCITE-6445 Project: Calcite Issue Type:

Using a STREAM to read Kafka does not print data

2024-06-22 Thread Yang Zhou
Thanks everyone for checking my email. I encountered a problem. Let me explain the environment first: 1. I built a Kafka cluster and created a topic of yzhoujsontp01 2. I packaged and compiled Sqlline, and wrote a startup script (start_sqlline.bat) to add all the related dependency jars

Subscribe Calcite

2024-06-22 Thread xinzhuxiansheng

Function library for Amazon Redshift

2024-06-21 Thread Julian Hyde
Case https://issues.apache.org/jira/browse/CALCITE-6444 proposes a library for Redshift. This would be welcome, but I see a potential problem. Redshift and Postgres are so similar that almost every function in Postgres is also in Redshift. I'd rather not have to log bugs every time someone adds a

Re: SqlParser.config applied to model lattices but not views

2024-06-21 Thread Julian Hyde
Oops. I should have read your message more thoroughly. It looks as if views are correctly using the ‘internal connection’ and lattices are not but should be. > On Jun 21, 2024, at 3:52 PM, Julian Hyde wrote: > > It’s possible that the behavior you see is correct. A model should be correct >

Re: SqlParser.config applied to model lattices but not views

2024-06-21 Thread Julian Hyde
It’s possible that the behavior you see is correct. A model should be correct (or incorrect) for all users of the model. Therefore, the model should not be parsed using the connection parameters (e.g. case-sensitivity of identifiers) of the particular connection that uses the model, but rather

[jira] [Created] (CALCITE-6444) Add a RedShift SqlLibrary

2024-06-21 Thread Norman Jordan (Jira)
Norman Jordan created CALCITE-6444: -- Summary: Add a RedShift SqlLibrary Key: CALCITE-6444 URL: https://issues.apache.org/jira/browse/CALCITE-6444 Project: Calcite Issue Type: Improvement

Re: SqlParser.config applied to model lattices but not views

2024-06-21 Thread Hugh Pearse
The issue can be traced to here: https://github.com/apache/calcite/blob/calcite-1.36.0/core/src/main/java/org/apache/calcite/prepare/CalcitePrepareImpl.java#L200-L203 Which is caused by using:

SqlParser.config applied to model lattices but not views

2024-06-21 Thread Hugh Pearse
I have noticed an inconsistency for the following ==[START model]== { "version": "1.0", "defaultSchema": "foodmart", "schemas": [ { "name": "foodmart", "type": "custom", "factory": "example.Factory", "operand": { "tables": [ {

Re: Sortlimit and limit examples

2024-06-21 Thread Eric Berryman
That’s perfect https://github.com/apache/calcite/blob/main/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraRules.java#L401 Thank you for such a quick response! Eric On Fri, Jun 21, 2024 at 09:14 Michael Mior wrote: > Eric, > > Could you give a more specific example of

Re: Sortlimit and limit examples

2024-06-21 Thread Michael Mior
Eric, Could you give a more specific example of the failure scenario you're experiencing? For a simple example of how limits can be pushed down, this is done in the Cassandra adapter with CassandraLimitRule. It matches an EnumerableLimit on top of a CassandraToEnumerableConverter and then

Sortlimit and limit examples

2024-06-21 Thread Eric Berryman
Hello! When I add limit to my relbuilder object, the planner gives up. But works fine without it. I wasn’t able to find any examples of using limit and pushing the limit values down to a data source. Could someone help with some links on this subject? Thank you! Eric

Preserving alias/Frames in RelBuilder when extending RelBuilder?

2024-06-20 Thread Ian Bertolacci
Hello, We have a class which extends RelBuilder to add some extra functionality, but we are having issues with aliases being erased when popping the builder stack, and there isn’t much recourse since the Frame stack is all private. For example, this is valid: ```

[jira] [Created] (CALCITE-6443) Create view based on LookML model

2024-06-20 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-6443: Summary: Create view based on LookML model Key: CALCITE-6443 URL: https://issues.apache.org/jira/browse/CALCITE-6443 Project: Calcite Issue Type:

Failure when inferring types of Dynamic parameters

2024-06-19 Thread Neo Michael
Hello Calcite devs, I run into a problem (possible bug) pertaining to dynamic parameters that perhaps you can help me with. Given table t: create table t (n int); queries like this properly infer the type of the dynamic parameter: select x = ? from t; select (x = ?) and (y = ?) from t; but

[jira] [Created] (CALCITE-6442) Validator rejects FILTER in OVER windows

2024-06-18 Thread Mihai Budiu (Jira)
Mihai Budiu created CALCITE-6442: Summary: Validator rejects FILTER in OVER windows Key: CALCITE-6442 URL: https://issues.apache.org/jira/browse/CALCITE-6442 Project: Calcite Issue Type: Bug

About CommunityOverCode Asia 2024 Share on calcite

2024-06-18 Thread Cancai Cai
Hello, everyone in the calcite community. CommunityOverCode Asia 2024 will be held in Hangzhou, China at the end of July, and I am glad that I can go there to share some of my open source experience. I plan to share what I have learned from streampark and calcite. Unfortunately, I rarely use

[jira] [Created] (CALCITE-6441) Add BOOLAGG_AND, BOOLAGG_OR aggregate functions (enabled in Snowflake library)

2024-06-17 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-6441: Summary: Add BOOLAGG_AND, BOOLAGG_OR aggregate functions (enabled in Snowflake library) Key: CALCITE-6441 URL: https://issues.apache.org/jira/browse/CALCITE-6441

[jira] [Created] (CALCITE-6440) Add optimization to returns empty when The Order By parameter in the Sort operator is empty

2024-06-16 Thread Caican Cai (Jira)
Caican Cai created CALCITE-6440: --- Summary: Add optimization to returns empty when The Order By parameter in the Sort operator is empty Key: CALCITE-6440 URL: https://issues.apache.org/jira/browse/CALCITE-6440

[jira] [Created] (CALCITE-6439) FILTER_INSTANCE in RelOptRule does not take effect

2024-06-15 Thread Caican Cai (Jira)
Caican Cai created CALCITE-6439: --- Summary: FILTER_INSTANCE in RelOptRule does not take effect Key: CALCITE-6439 URL: https://issues.apache.org/jira/browse/CALCITE-6439 Project: Calcite Issue

[jira] [Created] (CALCITE-6438) Add optimization to returns empty when the filter operator is a false instance

2024-06-15 Thread Caican Cai (Jira)
Caican Cai created CALCITE-6438: --- Summary: Add optimization to returns empty when the filter operator is a false instance Key: CALCITE-6438 URL: https://issues.apache.org/jira/browse/CALCITE-6438

[jira] [Created] (CALCITE-6437) For druid sql JSON_OBJECT() function results in RUNTIME_FAILURE when querying INFORMATION_SCHEMA.COLUMNS

2024-06-13 Thread AlbericByte (Jira)
AlbericByte created CALCITE-6437: Summary: For druid sql JSON_OBJECT() function results in RUNTIME_FAILURE when querying INFORMATION_SCHEMA.COLUMNS Key: CALCITE-6437 URL:

[jira] [Created] (CALCITE-6436) Missing round brackets in WHERE condition which contains calculations

2024-06-13 Thread Ulrich Kramer (Jira)
Ulrich Kramer created CALCITE-6436: -- Summary: Missing round brackets in WHERE condition which contains calculations Key: CALCITE-6436 URL: https://issues.apache.org/jira/browse/CALCITE-6436 Project:

[jira] [Created] (CALCITE-6435) SqlToRel conversion of IN expressions may lead to incorrect simplifications

2024-06-13 Thread Zoltan Haindrich (Jira)
Zoltan Haindrich created CALCITE-6435: - Summary: SqlToRel conversion of IN expressions may lead to incorrect simplifications Key: CALCITE-6435 URL: https://issues.apache.org/jira/browse/CALCITE-6435

Re: [Question] Long Runtime for SubqueryRemoveRule, vs Expanding Subqueries

2024-06-12 Thread JinxTheKid
Hi Julian, Thanks for the quick response! Glad to know that I'm at least not mis-using the APIs. Investigate and cut a ticket if I find anything interesting. Thanks, Logan On Wed, Jun 12, 2024, 4:59 AM Julian Hyde wrote: > It’s possible thst you’re running into a performance bug - such as a

SIGMOD

2024-06-12 Thread Julian Hyde
I'm at the SIGMOD 2024 conference this week in Santiago, Chile, presenting a paper "Measures in SQL", which I co-authored with John Fremlin from Google [1][2][3]. It has received a lot of interest & discussion. If you're in the Calcite community (contributor or just interested bystander) and are

Re: [Question] Long Runtime for SubqueryRemoveRule, vs Expanding Subqueries

2024-06-12 Thread Julian Hyde
It’s possible thst you’re running into a performance bug - such as a loop that is O[n ^ 2) in the number of SqlNodes - that has never been noticed before. Can you do some investigation? Say, double the size or depth of the query and see if the running time more than doubles. Or run the

[Question] Long Runtime for SubqueryRemoveRule, vs Expanding Subqueries

2024-06-11 Thread JinxTheKid
Hi Calcite community, I'm running into some challenges using SubqueryRemoveRule and was hoping the community could help me understand any gaps in my understanding. I am attempting to remove subqueries from row expressions in a relational plan. My motivation for doing this is that I want to call

[jira] [Created] (CALCITE-6434) Specify identifier quoting for HiveSqlDialect and SparkSqlDialect

2024-06-11 Thread xiong duan (Jira)
xiong duan created CALCITE-6434: --- Summary: Specify identifier quoting for HiveSqlDialect and SparkSqlDialect Key: CALCITE-6434 URL: https://issues.apache.org/jira/browse/CALCITE-6434 Project: Calcite

[jira] [Created] (CALCITE-6433) SUBSTRING can return incorrect empty result for some parameters

2024-06-11 Thread Iurii Gerzhedovich (Jira)
Iurii Gerzhedovich created CALCITE-6433: --- Summary: SUBSTRING can return incorrect empty result for some parameters Key: CALCITE-6433 URL: https://issues.apache.org/jira/browse/CALCITE-6433

Re: Questions about numeric type conversion

2024-06-09 Thread Cancai Cai
Hi Julian, Thank you for your answer Best regards, Cancai Cai Julian Hyde 于2024年6月10日周一 05:38写道: > I believe that there are many overlapping problems, many of which are that > each DBMS has its own semantics. > > In order to emulate a particular DBMS, we need to understand its > semantics,

Re: Questions about numeric type conversion

2024-06-09 Thread Julian Hyde
I believe that there are many overlapping problems, many of which are that each DBMS has its own semantics. In order to emulate a particular DBMS, we need to understand its semantics, document that semantics by writing tests, and then follow that semantics (if Calcite is in a mode that should

Questions about numeric type conversion

2024-06-09 Thread Cancai Cai
Hello calcite community, I would like to ask a question. Actually, I am not sure whether it is appropriate to ask this question in the calcite community. It is mainly about the database's handling of numeric types. [10:53:45]TiDB root:test> explain select id = 8145308033243873280 from test;

[jira] [Created] (CALCITE-6432) Infinite loop for JoinPushTransitivePredicatesRule when there are multiple project expressions reference the same input field

2024-06-08 Thread asdfgh19 (Jira)
asdfgh19 created CALCITE-6432: - Summary: Infinite loop for JoinPushTransitivePredicatesRule when there are multiple project expressions reference the same input field Key: CALCITE-6432 URL:

[jira] [Created] (CALCITE-6431) Implement the SINGLE_VALUE aggregation in HiveSqlDialect And SparkSQLDialect

2024-06-07 Thread xiong duan (Jira)
xiong duan created CALCITE-6431: --- Summary: Implement the SINGLE_VALUE aggregation in HiveSqlDialect And SparkSQLDialect Key: CALCITE-6431 URL: https://issues.apache.org/jira/browse/CALCITE-6431

[jira] [Created] (CALCITE-6430) SINGLE_VALUE rewrite to wrong sql when the sub-query return one not-null value and NULL value in PostgreSQL、MySQL、HSQL dialect

2024-06-07 Thread xiong duan (Jira)
xiong duan created CALCITE-6430: --- Summary: SINGLE_VALUE rewrite to wrong sql when the sub-query return one not-null value and NULL value in PostgreSQL、MySQL、HSQL dialect Key: CALCITE-6430 URL:

replacing fields with case nodes in logical trees

2024-06-06 Thread ARKADI SHALAGINOV
Hello Is it possible to replace a field in JdbcTableScan node of a logical relational tree with case RexNode without rebuilding the whole tree? This functionality allows one to investigate how some particular value affects final results without changing database records. The tricky thing

Jenkins build is back to normal : Calcite » Calcite-snapshots #900

2024-06-04 Thread Apache Jenkins Server
See

Build failed in Jenkins: Calcite » Calcite-snapshots #899

2024-06-04 Thread Apache Jenkins Server
See Changes: [mbudiu] [CALCITE-6422] Query with '<>' throws NullPointerException during materialized view matching -- [...truncated 473.26 KB...]

Re: Casting Decimal literals problem

2024-06-04 Thread Mihai Budiu
This is a very old issue in Calcite. I hope to be able to merge the fix soon: https://github.com/apache/calcite/pull/3733 However, the fix itself has uncovered a bunch of other issues, so things are not quite so straightforward. Mihai From: Alessandro Solimando

Re: arrow-adapter component creation in Jira

2024-06-04 Thread Alessandro Solimando
Thanks Michael, understood! Best regards, Alessandro On Tue, Jun 4, 2024, 18:40 Michael Mior wrote: > Alessandro, > > I believe only PMC members can do this. I created the arrow-adapter > component. > -- > Michael Mior > mm...@apache.org > > > On Tue, Jun 4, 2024 at 12:05 PM Alessandro

Re: arrow-adapter component creation in Jira

2024-06-04 Thread Michael Mior
Alessandro, I believe only PMC members can do this. I created the arrow-adapter component. -- Michael Mior mm...@apache.org On Tue, Jun 4, 2024 at 12:05 PM Alessandro Solimando < alessandro.solima...@gmail.com> wrote: > Hello, > it seems I don't have right to create new "components" in Jira. >

arrow-adapter component creation in Jira

2024-06-04 Thread Alessandro Solimando
Hello, it seems I don't have right to create new "components" in Jira. The arrow adapter has been contributed a while back, it would be nice to have it available as a component in Jira. How does that work in general? Who has the right to create it? Best regards, Alessandro

[jira] [Created] (CALCITE-6429) Arrow adapter should default to the Enumerable convention for unsupported features

2024-06-04 Thread Alessandro Solimando (Jira)
Alessandro Solimando created CALCITE-6429: - Summary: Arrow adapter should default to the Enumerable convention for unsupported features Key: CALCITE-6429 URL:

Re: Casting Decimal literals problem

2024-06-04 Thread Alessandro Solimando
Hi Neo, this is a known issue, you can check CALCITE-6322 and related tickets. Best regards, Alessandro On Tue, 4 Jun 2024 at 11:58, Neo Michael wrote: > Hello Calcite devs, > I have come across some strange behavior when Decimal literals

Casting Decimal literals problem

2024-06-04 Thread Neo Michael
Hello Calcite devs, I have come across some strange behavior when Decimal literals are being casted to a different precision and scale. For example for something like: : jdbc:calcite:model=src/test/resources/mode> select cast(1.11 as numeric(3,1)); ++ | EXPR$0 | ++ | 1.11 |

Re: EnumerableTableScan array/multiset handling

2024-06-04 Thread Christian Beikov
Hi Julian, it seems to me that org.apache.calcite.rel.type.RelDataTypeFactoryImpl.JavaType, which is a subtype of RelDataType, would be the best place to model this. How about I add an Accessor contract and a field to JavaType to take care of producing expressions for the enumerable

[jira] [Created] (CALCITE-6428) Typo in adapter documentation

2024-06-03 Thread Thad Guidry (Jira)
Thad Guidry created CALCITE-6428: Summary: Typo in adapter documentation Key: CALCITE-6428 URL: https://issues.apache.org/jira/browse/CALCITE-6428 Project: Calcite Issue Type: Improvement

[jira] [Created] (CALCITE-6427) Use a higher precision for DECIMAL intermediate results for some aggregate functions like STDDEV

2024-06-03 Thread Mihai Budiu (Jira)
Mihai Budiu created CALCITE-6427: Summary: Use a higher precision for DECIMAL intermediate results for some aggregate functions like STDDEV Key: CALCITE-6427 URL:

[jira] [Created] (CALCITE-6426) When performing starrocks dialect conversion for cast (xxx as int) and cast (xxx as bigint), it defaults to using MySQL dialect

2024-06-03 Thread fanluo (Jira)
fanluo created CALCITE-6426: --- Summary: When performing starrocks dialect conversion for cast (xxx as int) and cast (xxx as bigint), it defaults to using MySQL dialect Key: CALCITE-6426 URL:

[jira] [Created] (CALCITE-6425) Attributes

2024-06-02 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-6425: Summary: Attributes Key: CALCITE-6425 URL: https://issues.apache.org/jira/browse/CALCITE-6425 Project: Calcite Issue Type: Improvement Reporter:

Re: SqlParser Lexical State

2024-06-02 Thread Julian Hyde
It is not supposed to work for Quoting.SINGLE. I don’t know any SQL dialect where identifiers (table and column names and such) are enclosed in single quotes (apostrophes) so why should we support that? Julian > On Jun 2, 2024, at 3:59 PM, Yogendra Sharma wrote: > > Hello, > > I am

SqlParser Lexical State

2024-06-02 Thread Yogendra Sharma
Hello, I am using Calcite 1.36; and I stumbled upon an issue and seeking some explanation on the code below in Calcite: While instantiating SqlParser, the constructor has following line: parser.switchTo(SqlAbstractParserImpl.LexicalState.forConfig(config)); Essentially it tries to acquire an

Re: [Question] Left Semi Join and SqlToRelConverter

2024-05-31 Thread Julian Hyde
The Babel parser contains the stuff that some people want to be able to parse (because it's in some other engine) but Calcite doesn't want to implement. On Wed, May 22, 2024 at 8:16 PM JinxTheKid wrote: > > Hi all, > > I'm exploring extensions to Calcites parser and saw that the Babel parser >

Re: EnumerableTableScan array/multiset handling

2024-05-30 Thread Julian Hyde
Thanks for doing these experiments, Christian, and documenting what you found. I think you’re running into the limitations of ReflectiveSchema. It works with POJOs (java classes with public fields) but hasn’t been tested for richer variations and therefore just doesn’t work. In many cases, it

Re: How to PARSER the SPARK SQL

2024-05-30 Thread Walaa Eldin Moustafa
Hi Yujia, You might take inspiration from Coral https://github.com/linkedin/coral. It is based on Calcite but uses the Hive parser (which is compatible with Spark SQL) to generate the SQL and Rel nodes. There is a PR that uses the native Spark parser as well

Re: How to PARSER the SPARK SQL

2024-05-30 Thread Mihai Budiu
The SQL language has several sublanguages: the query language, the data definition language, and the data manipulation language. The core of Calcite is mostly about the query language, but there are Calcite components that deal with the other languages as well (e.g., server, babel). Both these

[jira] [Created] (CALCITE-6424) Enable RLIKE function in MySQL library

2024-05-30 Thread xiong duan (Jira)
xiong duan created CALCITE-6424: --- Summary: Enable RLIKE function in MySQL library Key: CALCITE-6424 URL: https://issues.apache.org/jira/browse/CALCITE-6424 Project: Calcite Issue Type:

Re: GROUP BY ordinals with expand star

2024-05-29 Thread Julian Hyde
OK, please log a jira case. Please describe cases where it should give an error. Describe any pertinent flags. > On May 29, 2024, at 8:58 AM, Itiel Sadeh > wrote: > > Thanks for the response Julian. > > I agree that it is a pretty unuseful use case, but it is a valid SQL as far > as I can

Re: GROUP BY ordinals with expand star

2024-05-29 Thread Itiel Sadeh
Thanks for the response Julian. I agree that it is a pretty unuseful use case, but it is a valid SQL as far as I can tell. PostgreSQL does support it. Maybe Calcite shouldn't support it, but I think that the error message is a bit unintuitive in this case. Thanks again, Itiel On Tue, May 28,

Re: GROUP BY ordinals with expand star

2024-05-28 Thread Julian Hyde
It doesn’t seem particularly useful to use “*” in a “GROUP BY” query. The query will be invalid if you don’t include all the columns in the GROUP BY clause. (In a few databases, one of which is MySQL, the query “SELECT empno, deptno, sal FROM emp GROUP BY empno” would be valid if “empno” is a

[jira] [Created] (CALCITE-6423) Invalid unparse for CHAR without precision in MySQLDialect

2024-05-28 Thread xiong duan (Jira)
xiong duan created CALCITE-6423: --- Summary: Invalid unparse for CHAR without precision in MySQLDialect Key: CALCITE-6423 URL: https://issues.apache.org/jira/browse/CALCITE-6423 Project: Calcite

GROUP BY ordinals with expand star

2024-05-28 Thread Itiel Sadeh
Hello calcite team, Consider the following: Let's say I have a table "t" with two columns: "CREATE TABLE t(x int, y int);" Now, the following query will result in validation error: "SELECT * FROM t GROUP BY 1,2", But if I'm not using "*" it will work: "SELECT x, y FROM t GROUP BY 1,2" The issue

[jira] [Created] (CALCITE-6422) RexLiteral.isNullLiteral should be called before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable

2024-05-27 Thread Mou Wu (Jira)
Mou Wu created CALCITE-6422: --- Summary: RexLiteral.isNullLiteral should be called before RexLiteral.booleanValue in SubstitutionVisitor.mayBeSatisfiable Key: CALCITE-6422 URL:

[jira] [Created] (CALCITE-6421) Calcite Avatica support JDK 22

2024-05-26 Thread Sergey Nuyanzin (Jira)
Sergey Nuyanzin created CALCITE-6421: Summary: Calcite Avatica support JDK 22 Key: CALCITE-6421 URL: https://issues.apache.org/jira/browse/CALCITE-6421 Project: Calcite Issue Type: Bug

EnumerableTableScan array/multiset handling

2024-05-24 Thread Christian Beikov
Hello, in my recent experiments I ran into some issues when trying to unnest an array of struct. The query is roughly this: select t.id, e.value1 from MyTable t, unnest(t.structArray) e EnumerableTableScan#fieldExpression will then try to generate code that converts the value of the

[jira] [Created] (CALCITE-6420) Fix confusing MappingType enum

2024-05-24 Thread ZiJie Song (Jira)
ZiJie Song created CALCITE-6420: --- Summary: Fix confusing MappingType enum Key: CALCITE-6420 URL: https://issues.apache.org/jira/browse/CALCITE-6420 Project: Calcite Issue Type: Improvement

[jira] [Created] (CALCITE-6419) Invalid unparse for VARCHAR without precision in HiveSqlDialect And SparkSqlDialect

2024-05-24 Thread xiong duan (Jira)
xiong duan created CALCITE-6419: --- Summary: Invalid unparse for VARCHAR without precision in HiveSqlDialect And SparkSqlDialect Key: CALCITE-6419 URL: https://issues.apache.org/jira/browse/CALCITE-6419

[jira] [Created] (CALCITE-6418) Expression with ALL aggregate return unexpected result.

2024-05-23 Thread Evgeny Stanilovsky (Jira)
Evgeny Stanilovsky created CALCITE-6418: --- Summary: Expression with ALL aggregate return unexpected result. Key: CALCITE-6418 URL: https://issues.apache.org/jira/browse/CALCITE-6418 Project:

[jira] [Created] (CALCITE-6417) Map value constructor and Array value constructor unparsed incorrectly for HiveSqlDialect

2024-05-23 Thread xiong duan (Jira)
xiong duan created CALCITE-6417: --- Summary: Map value constructor and Array value constructor unparsed incorrectly for HiveSqlDialect Key: CALCITE-6417 URL: https://issues.apache.org/jira/browse/CALCITE-6417

[jira] [Created] (CALCITE-6416) Remove unnecessary SUBSTRING rewrite in SparkSqlDialect

2024-05-23 Thread xiong duan (Jira)
xiong duan created CALCITE-6416: --- Summary: Remove unnecessary SUBSTRING rewrite in SparkSqlDialect Key: CALCITE-6416 URL: https://issues.apache.org/jira/browse/CALCITE-6416 Project: Calcite

[Question] Left Semi Join and SqlToRelConverter

2024-05-22 Thread JinxTheKid
Hi all, I'm exploring extensions to Calcites parser and saw that the Babel parser impl has some nice things I want to work with, namely support for Spark-style LEFT_SEMI_JOINs syntax. Using this parser works for me, but I noticed that when using SqlToRelConverter, converting LEFT_SEMI_JOIN is not

[jira] [Created] (CALCITE-6415) Invalid unparse for TIMESTAMP with HiveSqlDialect

2024-05-22 Thread xiong duan (Jira)
xiong duan created CALCITE-6415: --- Summary: Invalid unparse for TIMESTAMP with HiveSqlDialect Key: CALCITE-6415 URL: https://issues.apache.org/jira/browse/CALCITE-6415 Project: Calcite Issue

RE: Re: CoreFilters.FILTER_REDUCE_EXPRESSIONS issue

2024-05-22 Thread jeffreywinter
> You say that >… > isn't valid SQL. What's wrong with it? It looks valid and correct to > me. Right, this was phrased poorly. I assume this is valid ANSI SQL, but it is not for the versions of Oracle and SQL Server I’m currently working with. To this point I haven’t run into any issues

Re: CoreFilters.FILTER_REDUCE_EXPRESSIONS issue

2024-05-21 Thread Julian Hyde
You say that SELECT code, CASE WHEN code = 'test_val' THEN ABS(val) ELSE NULL END AS absval FROM TEST WHERE CASE WHEN code = 'test_val' THEN ABS(val) > 0 ELSE FALSE END isn't valid SQL. What's wrong with it? It looks valid and correct to me. (I acknowledge that it's neither pretty nor

CoreFilters.FILTER_REDUCE_EXPRESSIONS issue

2024-05-21 Thread jeffreywinter
I'm having an issue with CoreFilters.FILTER_REDUCE_EXPRESSIONS. I'm wondering if this is a problem with the rule, or with how I've set up my logical tree. Conceptually I am trying to use the equivalent of a computed column in a WHERE. Since this isn't legal: SELECT code, CASE WHEN code =

[jira] [Created] (CALCITE-6414) Resolve Snoflake SQL generation of BOOL_OR, BOOL_AND

2024-05-21 Thread Justin Swett (Jira)
Justin Swett created CALCITE-6414: - Summary: Resolve Snoflake SQL generation of BOOL_OR, BOOL_AND Key: CALCITE-6414 URL: https://issues.apache.org/jira/browse/CALCITE-6414 Project: Calcite

[jira] [Created] (CALCITE-6413) SqlValidator does not invoke type coercion for both NATURAL and USING join conditions

2024-05-21 Thread Maksim Zhuravkov (Jira)
Maksim Zhuravkov created CALCITE-6413: - Summary: SqlValidator does not invoke type coercion for both NATURAL and USING join conditions Key: CALCITE-6413 URL: https://issues.apache.org/jira/browse/CALCITE-6413

[jira] [Created] (CALCITE-6412) SqlToRelConverter fails to convert SqlMerge AST to relational expression

2024-05-21 Thread Pavel Pereslegin (Jira)
Pavel Pereslegin created CALCITE-6412: - Summary: SqlToRelConverter fails to convert SqlMerge AST to relational expression Key: CALCITE-6412 URL: https://issues.apache.org/jira/browse/CALCITE-6412

Build failed in Jenkins: Calcite » Calcite-snapshots #887

2024-05-20 Thread Apache Jenkins Server
See Changes: [Alessandro Solimando] [CALCITE-6340] RelBuilder drops traits when aggregating over duplicate projected fields -- [...truncated 9.10 KB...]

Build failed in Jenkins: Calcite » Calcite-snapshots #886

2024-05-19 Thread Apache Jenkins Server
See Changes: [guohongyu217] [CALCITE-6400] MAP_ENTRIES function should throw if a key value is null -- [...truncated 473.99 KB...] 5.3sec,3

[jira] [Created] (CALCITE-6411) Support Collect in ToLogicalConverter

2024-05-19 Thread Caican Cai (Jira)
Caican Cai created CALCITE-6411: --- Summary: Support Collect in ToLogicalConverter Key: CALCITE-6411 URL: https://issues.apache.org/jira/browse/CALCITE-6411 Project: Calcite Issue Type:

Re: Apache at Visa Summit

2024-05-14 Thread Julian Hyde
I shall also be speaking at the SF Distributed Systems Meetup in downtown SF on Wednesday May 22nd [3]. This talk will be on a different topic, SQL with Measures. (A preview of the talk that I shall give at SIGMOD in Santiago, Chile, in June.) SF Distributed Systems is a new meetup that I have

Apache at Visa Summit

2024-05-14 Thread Julian Hyde
Visa is a major sponsor of the ASF and is hosting a one-day conference in Foster City, CA, on Thursday (May 16th) to showcase Apache projects [1]. I am giving a talk "Open Source Software Innovation in Advanced Databases and Analytics" [2]. I believe registration is free for ASF committers, and

Community over Code EU 2024: The countdown has started!

2024-05-14 Thread Ryan Skraba
[Note: You're receiving this email because you are subscribed to one or more project dev@ mailing lists at the Apache Software Foundation.] We are very close to Community Over Code EU -- check out the amazing program and the special discounts that we have for you. Special discounts You still

Build failed in Jenkins: Calcite » Calcite-snapshots #885

2024-05-13 Thread Apache Jenkins Server
See Changes: [mbudiu] [CALCITE-6313] Add POWER function for PostgreSQL -- [...truncated 504.19 KB...] at

[jira] [Created] (CALCITE-6410) dateadd(MONTH, 3, date '2016-02-24') parsing failed

2024-05-12 Thread Caican Cai (Jira)
Caican Cai created CALCITE-6410: --- Summary: dateadd(MONTH, 3, date '2016-02-24') parsing failed Key: CALCITE-6410 URL: https://issues.apache.org/jira/browse/CALCITE-6410 Project: Calcite Issue

[jira] [Created] (CALCITE-6409) Character types and Boolean types are comparable

2024-05-12 Thread Caican Cai (Jira)
Caican Cai created CALCITE-6409: --- Summary: Character types and Boolean types are comparable Key: CALCITE-6409 URL: https://issues.apache.org/jira/browse/CALCITE-6409 Project: Calcite Issue

[jira] [Created] (CALCITE-6408) Not-null ThreadLocal

2024-05-10 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-6408: Summary: Not-null ThreadLocal Key: CALCITE-6408 URL: https://issues.apache.org/jira/browse/CALCITE-6408 Project: Calcite Issue Type: Improvement

Re: [Question][RelTree] Collecting Column Origins Deeply

2024-05-10 Thread JinxTheKid
Hi Stamatis, Thanks for the quick reply, this seems to be exactly what I was looking for! Is there any literature / articles you could recommend on this topic of optimizations and preprocessing? I've found reading through Calcite docs and source code to be a tad tedious, and wondering if there is

[jira] [Created] (CALCITE-6407) DECIMAL types with scale > precision should be tested

2024-05-10 Thread Mihai Budiu (Jira)
Mihai Budiu created CALCITE-6407: Summary: DECIMAL types with scale > precision should be tested Key: CALCITE-6407 URL: https://issues.apache.org/jira/browse/CALCITE-6407 Project: Calcite

[jira] [Created] (CALCITE-6406) Negative scales for DECIMAL types are not tested

2024-05-10 Thread Mihai Budiu (Jira)
Mihai Budiu created CALCITE-6406: Summary: Negative scales for DECIMAL types are not tested Key: CALCITE-6406 URL: https://issues.apache.org/jira/browse/CALCITE-6406 Project: Calcite Issue

[jira] [Created] (CALCITE-6405) TO_TIMESTAMP doesn't work

2024-05-10 Thread Oleg Alekseev (Jira)
Oleg Alekseev created CALCITE-6405: -- Summary: TO_TIMESTAMP doesn't work Key: CALCITE-6405 URL: https://issues.apache.org/jira/browse/CALCITE-6405 Project: Calcite Issue Type: Bug

Re: [Question][RelTree] Collecting Column Origins Deeply

2024-05-10 Thread Stamatis Zampetakis
Hey Logan, Many parts of Calcite such as rules and metadata providers rely on the assumption that the RelNode tree does not contain subqueries. This is achieved by using the SubQueryRemoveRule [1] early on during the optimization process. Another pretty common preprocessing step is query

[Question][RelTree] Collecting Column Origins Deeply

2024-05-09 Thread JinxTheKid
Hi all, I am new to Calcite so apologies for what might be a basic question. I'm working with the RelTree, and trying to understand the standard way to collect column origins for a RelNode. My current strategy to collect column origins for some arbitrary node is to use the node's metadataQuery

Re: Custom non-sql data types?

2024-05-09 Thread Luke VanderHart
That's exactly the kind of input I'm looking for! Functions certainly could work for me, as long as the optimization propagates just as well as it would with a literal (and sounds like yes, if that's the basis for geospatial support). On Thu, May 9, 2024 at 1:55 PM Julian Hyde wrote: > Are you

  1   2   3   4   5   6   7   8   9   10   >