Re: [VOTE] Release Apache Calcite 1.37.0 (release candidate 4)

2024-04-29 Thread Guillaume Masse
412 > here you can find the jars > > https://repository.apache.org/content/repositories/orgapachecalcite-1231/org/apache/calcite/ > it looks like asm-remapper gives the same result... > > On Mon, Apr 29, 2024 at 8:41 PM Guillaume Masse > wrote: > > > If you t

Re: [VOTE] Release Apache Calcite 1.37.0 (release candidate 4)

2024-04-29 Thread Guillaume Masse
> Ubuntu 22.04.4 LTS, > 1.8.0_372-372 (OpenLogic-OpenJDK 25.372-b07) > > I will also try to look at it with my set up and the info you've provided > > On Mon, Apr 29, 2024 at 8:03 PM Guillaume Masse > wrote: > > > -1 (not binding) > > > > The bytecode of c

Re: [VOTE] Release Apache Calcite 1.37.0 (release candidate 4)

2024-04-29 Thread Guillaume Masse
-1 (not binding) The bytecode of classfile org/apache/calcite/runtime/SqlFunctions.class is invalid (and only this classfile) I tested all class files from the following artifacts: calcite-core-1.37.0.jar calcite-linq4j-1.37.0.jar avatica-core-1.25.0.jar avatica-metrics-1.25.0.jar This will

Re: [DISCUSS] Ensuring that Calcite is consistent with other SQL systems

2024-02-25 Thread Guillaume Masse
rn NaN. If it is > pretending to be MySQL it should return NULL. AFAICT, SQL Logic Test > would regard (at most) one of those responses as correct. If it even > covers SQRT. > > On Sun, Feb 25, 2024 at 12:25 PM Guillaume Masse > wrote: > > > > Write test with SQL logic

Re: [DISCUSS] Ensuring that Calcite is consistent with other SQL systems

2024-02-25 Thread Guillaume Masse
Write test with SQL logic test https://www.sqlite.org/sqllogictest/doc/trunk/about.wiki Then run those tests against each database. (This technique is called oracle testing) On Sun, Feb 25, 2024, 3:13 PM Julian Hyde wrote: > TL;DR: We need to add software engineering processes to ensure that

Re: calcite 1.36.0 release procedures

2024-01-26 Thread Guillaume Masse
9) > >>> > >>> > >>> Sorry that I'm not clear in my previous email. My testing results are > >>> all about #1. > >>> > >>> I tested 1.34.0/1.35.0/1.36.0 with JDK8 on both Linux and Mac for #2, > >>> they all reproduc

javadoc in chinese

2024-01-17 Thread Guillaume Masse
It looks like the javadoc for 1.36.0 was publish in chinese: https://javadoc.io/doc/org.apache.calcite/calcite-core/latest/index.html -- Guillaume Massé [Gee-OHM] (马赛卫)

Re: calcite 1.36.0 release procedures

2023-12-20 Thread Guillaume Masse
gt; > > It seems unrelated to platforms, and I assume it should not either, > > since Java's bytecode should be platform independent. > > > > @Guillaume You said above that with 1.8.0_371-b11 on macos x64, you > > cannot reproduce the problem, can you confirm that? Per my testing, >

Re: calcite 1.36.0 release procedures

2023-12-18 Thread Guillaume Masse
can't really understand why, since the explanation > mentions SqlFunctions-1.35.0, but the issue is with 1.36, do you have more > info on that? > > Best, > Ruben > > > On Fri, Nov 24, 2023 at 10:09 PM Guillaume Masse > wrote: > > > We run spark in AWS EMR and i

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

2023-11-27 Thread Guillaume Masse
Hi, latest jdk 8 is 8u391, 8u371 is two version behind. https://www.oracle.com/java/technologies/javase/8all-relnotes.html#R8u391-BPR On Mon, Nov 27, 2023 at 4:21 AM Istvan Toth wrote: > -1 (non binding) > > I have successfully built and run the PQS test suite with the Avatica RC > with

Re: calcite 1.36.0 release procedures

2023-11-24 Thread Guillaume Masse
> > Julian > > On Fri, Nov 24, 2023 at 10:20 AM Guillaume Masse > wrote: > > > > Hi Benchao Li, > > > > thanks for giving me more details like the java version, > > > > I compiled with 1.8.0_371-b11 on macos x64 (emulated) and I was s

Re: calcite 1.36.0 release procedures

2023-11-24 Thread Guillaume Masse
procedure[1]. > > For 1.36.0, the JDK version I'm using is: > $ java -version > java version "1.8.0_371" > Java(TM) SE Runtime Environment (build 1.8.0_371-b11) > Java HotSpot(TM) 64-Bit Server VM (build 25.371-b11, mixed mode) > > [1] https://calcite.apache.org/docs/howto

calcite 1.36.0 release procedures

2023-11-23 Thread Guillaume Masse
Hi all, We recently upgraded to calcite 1.36.0 and it broke our deployment process. We are using java asm to shade (rename packages from the bytecode) since there are multiple dependencies clash when using with Apache Spark. For example, Apache Spark is using a much older

Re: How about enable dependabot?

2023-11-13 Thread Guillaume Masse
To remove some of the friction, we could setup schedule to monthly: https://docs.github.com/fr/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval this would remove the noise, but have a checkpoint where we can bump dependencies

RelNode => Spark Logical Plan converter

2023-10-12 Thread Guillaume Masse
Hi All, We use Apache Calcite to transform SQL then we want to run the logical plan on our spark cluster. Currently we use RelToSqlConverter and execute the result with Spark SQL. I was wondering if we could just execute from a Spark logical plan (

Re: fields injected after validation

2023-10-03 Thread Guillaume Masse
; do column pruning and therefore the queries are equivalent. > > > On Oct 3, 2023, at 3:53 PM, Guillaume Masse < > masse.guilla...@narrative.io.INVALID> wrote: > > > > It's because column2 is a column I created artificially to allow the > > validation of a query. I no

Re: fields injected after validation

2023-10-03 Thread Guillaume Masse
ly explained because the intermediate table has an extra > column, LOWER($1). That pushes up the offset of all columns coming from the > right-hand table. > > > On Oct 3, 2023, at 3:14 PM, Guillaume Masse < > masse.guilla...@narrative.io.INVALID> wrote: > > > > H

fields injected after validation

2023-10-03 Thread Guillaume Masse
Hi All, I have two tables: t1 and t2 both have a column1 of type t and a column2 that I'm not using I have a function f: t -> t defined in the catalog After validation if I print the logical plan I get the following result: select t1.column1, t2.column1 from company_data."1" t1 join

Re: Type inference for CASE expressions

2023-07-18 Thread Guillaume Masse
Hi Milhai, you can obtain this behavior by overriding shouldConvertRaggedUnionTypesToVarying to true in RelDataTypeSystem. https://calcite.apache.org/javadocAggregate/org/apache/calcite/rel/type/RelDataTypeSystem.html#shouldConvertRaggedUnionTypesToVarying()

Re: [DISCUSS] Towards Calcite 1.35.0

2023-07-10 Thread Guillaume Masse
Hi All, I did a second pass at named_struct runtime implementation: https://github.com/apache/calcite/pull/3295 The idea is to branch on the implementation when the runtime structure is not a java class (the item operator would use reflection to fetch the field). In this case, I send to the

Re: [DISCUSS] Towards Calcite 1.35.0

2023-07-04 Thread Guillaume Masse
I finished CALCITE-5701 Add NAMED_STRUCT function (enabled in Spark library) I hope it's not too late for the release: https://github.com/apache/calcite/pull/3295 The CI passes, it just needs a re-run on the last commit. On Fri, Jun 30, 2023 at 5:26 PM Gian Merlino wrote: > Of the open

structs

2023-05-15 Thread Guillaume Masse
Hi All, I created a ticket to implement an Apache Spark function called named_struct https://issues.apache.org/jira/browse/CALCITE-5701 I'm wondering if there is already a construct for creating nested structures and their types. I saw an open PR for nested row types:

Re: calcite lsp server

2023-04-07 Thread Guillaume Masse
ditors, but I never took the next step of wrapping it as a service. > > Julian > > [1] > https://calcite.apache.org/javadocAggregate/org/apache/calcite/sql/advise/SqlAdvisor.html > > > On Apr 6, 2023, at 1:30 PM, Guillaume Masse < > masse.guilla...@narrative.io.inva

calcite lsp server

2023-04-06 Thread Guillaume Masse
Hi, I'm wondering if anyone has built a full fledge language server protocol using Calcite validator. I saw Dreamio has an autocomplete service: https://github.com/dremio/dremio-oss/tree/master/services/autocomplete -- Guillaume Massé [Gee-OHM] (马赛卫)

Re: register a custom udf

2023-03-21 Thread Guillaume Masse
Hi, one last question regarding udf. on SchemaPlus it's also possible to register udf as ScalarFunction with a function body. How does it relate to SqlOperators? Do I need to define both? Thanks On Tue, Mar 21, 2023 at 12:21 AM Guillaume Masse < masse.guilla...@narrative.io> wrote: &g

Re: register a custom udf

2023-03-20 Thread Guillaume Masse
Best, > Dan Zou > > > 2023年3月21日 02:59,Guillaume Masse 写道: > > > > I found the solution here: > > > https://stackoverflow.com/questions/58268828/apache-calcite-registering-udfs-for-use-in-relbuilder > > > > The idea is to use > > > > `S

Re: register a custom udf

2023-03-20 Thread Guillaume Masse
, Mar 20, 2023 at 1:39 PM Guillaume Masse < masse.guilla...@narrative.io> wrote: > ah this is Scala, it's a bit shorter to write > > On Mon, Mar 20, 2023 at 1:12 PM Julian Hyde > wrote: > >> What language is this? >> >> > On Mar 20, 2023, at

Re: register a custom udf

2023-03-20 Thread Guillaume Masse
ah this is Scala, it's a bit shorter to write On Mon, Mar 20, 2023 at 1:12 PM Julian Hyde wrote: > What language is this? > > > On Mar 20, 2023, at 9:01 AM, Guillaume Masse < > masse.guilla...@narrative.io> wrote: > > > > Hi All, > > > > How can we

register a custom udf

2023-03-20 Thread Guillaume Masse
Hi All, How can we register a custom udf? I found some solutions on Stackoverflow but they are out of date ( https://stackoverflow.com/questions/44147819/adding-a-user-defined-function-to-calcite ) So far what I have: // top level class class CustomUdf { def foo(in: Double): Double = in + 1 }

scope of rex expressions

2023-02-21 Thread Guillaume Masse
Hi All, I have a question regarding how to get a rex expression scoped to a select list: Let's say I have a table t: CREATE TABLE t ( foo int, bar int ); And a simple query: SELECT foo FROM t And some standalone expressions related to that query/table stored elsewhere that I want to

Re: scope of rex expressions

2023-02-21 Thread Guillaume Masse
b 21, 2023 at 6:12 PM Guillaume Masse < masse.guilla...@narrative.io> wrote: > Hi All, > > I have a question regarding how to get a rex expression scoped to a select > list: > > Let's say I have a table t: > > CREATE TABLE t ( > foo int, > bar int

Keeping fully qualified identifier with RelToSqlConverter

2023-02-15 Thread Guillaume Masse
Hi, I would like to know if there is a way to keep identifiers fully qualified, for example: sql = parse("SELECT t1.field FROM t1") rel = sql2rel(sql) sql2 = rel2sql(rel) sql2 obtained: "SELECT field FROM t1" expected: "SELECT t1.field FROM t1" If I'm working on a join query, identifiers are

Re: Keeping fully qualified identifier with RelToSqlConverter

2023-02-15 Thread Guillaume Masse
, Feb 14, 2023 at 7:31 PM Guillaume Masse < masse.guilla...@narrative.io> wrote: > Hi, > > I would like to know if there is a way to keep identifiers fully > qualified, for example: > > sql = parse("SELECT t1.field FROM t1") > rel = sql2rel(sql) > sql2 = r

array literal in spark dialect

2023-01-27 Thread Guillaume Masse
Array literals are unparsed incorrectly for the spark dialect. They should be in the form: array(1, 2, 3) However, they are unparsed as ARRAY[1, 2, 3] https://spark.apache.org/docs/latest/api/sql/#array I would be happy to submit a fix, Guillaume