Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use the right short types for IntervalDay and IntervalYear #240 #241

Closed
wants to merge 182 commits into from

Conversation

ajegou
Copy link
Contributor

@ajegou ajegou commented Mar 29, 2024

According to the documentation the short types for IntervalDay and IntervalYear are iday and iyear

https://substrait.io/extensions/#function-signature-compound-names

#240

jacques-n and others added 30 commits April 9, 2022 16:23
- Add gradle action and use for build.
- Update wrapper to gradle 7.4.2
This formats the Gradle Kotlin build files (.kts) via Spotless and applying the Google Format.

This also adds the following Gradle tasks:
```
spotlessApply - Applies code formatting steps to sourcecode in-place.
spotlessCheck - Checks that sourcecode satisfies formatting steps.
spotlessDiagnose
```

Additional info about spotless can be found at https://github.com/diffplug/spotless
…ect (substrait-io#8)

When cloning the repo and running `./gradlew clean jar` the build will
currently fail, because it requires a manual step to init the git
submodule via `git submodule update --init --recursive`.

This commit adds a Gradle task that does that and also includes that
task when compiling the project.
* Adding a simple reflection-based roundtrip test for ExpressionCreator
* Fixing missing propagation of nullability, and improved generic test
* Fixing toBytes() bug where we miss to reset ByteBuffer position and produce empty copy of the data
* minor tweak to generate int, and making Random seeded top-level

Co-authored-by: Carlo Curino <curino@apache.org>
substrait-io#11)

* Support of parsing multiple create table statments. 
* Add tpc-h smoke test (for passing queries).

    The current status of 22 tpc-h queries:
            q1      OK
            q2      RexSubQuery not supported
            q3      OK
            q4      RexSubQuery not supported
            q5      OK
            q6      OK
            q7      Unable to convert call EXTRACT
            q8      ExceptionInInitializerError
            q9      Unable to convert call EXTRACT
            q10     OK
            q11     RexSubQuery not supported
            q12     ExceptionInInitializerError
            q13     Unable to find binding for call COUNT($1)
            q14     OK
            q15     Missing required parameter: '<sql>'
            q16     RexSubQuery not supported
            q17     RexSubQuery not supported
            q18     RexSubQuery not supported
            q19     OK
            q20     RexSubQuery not supported
            q21     RexSubQuery not supported
            q22     Unable to convert call SUBSTRING
When cloning the repo and running `./gradlew clean jar` the build will
currently fail, because it requires a manual step to init the git
submodule via `git submodule update --init --recursive`.

This commit adds a Gradle task that does that and also includes that
task when compiling the project.
Co-authored-by: James Taylor <james@qack.io>
…T from turning into GROUP BY plus JOIN (substrait-io#17)

Co-authored-by: James Taylor <james@qack.io>
* Support subquery in SqlToSubStrait conversion.

Add support to convert query containing the following pattern:
 1) exists (subquery)
 2) unique (subquery)
 3) inpredicate
 4) scalar subquery

13 tpc-h queries can run.
…ubstrait-io#21)

* Update substrait submodule to point to latest release
* Add AggregateFunctionInvocation to pojo model to track distinct
…t-io#25)

* Fix bug causing aggregate function invocation to be dropped
* Add visitor to perform deep traversal across child relations
* Add table lookup entry point to SqlToSubstrait

Co-authored-by: Jacques Nadeau <jacquesnadeau@gmail.com>
…o#27)

* Update substrait submodule to 0.3.0 release and rename visitor
* Support simple plan modifications
* Convert substrait plan to sql.

- SubstraitRelNodeConverter : convert pojo substrait Rel node
to Calcite RelNode.
- ExpressionRexConverter: convert pojo substrait expression
to Calcite RexNode.
- Extend CalciteCallTest and CalciteLiteralTest by doing round trip
conversion and comparision

Support filter/project/scan with scalar function, literal of integer,
string, date, time, timestamp.

Co-authored-by: Jacques Nadeau <jacquesnadeau@gmail.com>
…d decimal types. (substrait-io#32)

- fix prior decimal converstion bug, where encoded bytes was 38 bytes and calculate
of scaled integer is not correct.
- conversion of interval year, interval year month, interval month.
vbarua and others added 27 commits January 3, 2024 14:22
contains static strings for default extensions
cli can now output PROTOJSON, PROTOTEXT and BINARY proto format

* ci: update graalVersion
…ubstrait-io#214)

Substrait Aggregates that contain expressions that are not field
references and/or grouping keys that are not in input order require
extra processing to be converted to Calcite Aggregates successfully AND
correctly

BREAKING CHANGE: signatures for aggregate building utils have changed

* feat: additional builder methods for arithmetic aggregate functions
* feat: sortField builder method
* feat: grouping builder method
* feat: add, subtract, multiply, divide and negate methods for builder
* refactor: extract row matching assertions to PlanTestBase
* feat(isthmus): improved Calcite support for Substrait Aggregate rels
* refactor: builder functions for aggregates and aggregate functions now
consume and return Aggregate.Measure instead of
AggregateFunctionInvocation
…ssions (substrait-io#191)

Introduces the SqlExpressionToSubstrait class for converting SQL expression to Substrait

---------

Co-authored-by: Dane Pitkin <48041712+danepitkin@users.noreply.github.com>
Co-authored-by: Victor Barua <victor.barua@datadoghq.com>
Co-authored-by: Vibhatha Lakmal Abeykoon <vibhatha@users.noreply.github.com>
BREAKING CHANGE: ExpressionVisitor now has a `visit(Expression.EmptyListLiteral)` method
BREAKING CHANGE: LiteralConstructorConverter constructor now requires a TypeConverter
substrait-java AND isthmus can now handle user-defined type literals
…Functions (substrait-io#230)

Calcite planning rules can introduce the Calcite variants of SqlAggFunctions

In substrait-io#180, Substrait specific variants for these function were introduced which
better matched the type inference for these functions as defined in Substrait

Those changes cause failures when converting the Calcite variants to Substrait,
which is what these changes address

---------

Co-authored-by: Victor Barua <victor.barua@datadoghq.com>
Extracted out SortFieldConverter and WindowBoundConverter for easier reuse
… arguments (substrait-io#226)

Add up-converting signature matchers to assist in matching functions containing `any` arguments
BREAKING CHANGE: method ExpressionCreator.cast(Type, Expression) has been removed

---------

Signed-off-by: mbwhite <whitemat@uk.ibm.com>
Co-authored-by: Victor Barua <victor.barua@datadoghq.com>
…rait-io#240

According to the documentation (https://substrait.io/extensions/#function-signature-compound-names)
the short types for IntervalDay and IntervalYear are iday and iyear
@CLAassistant
Copy link

CLAassistant commented Mar 29, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
15 out of 16 committers have signed the CLA.

✅ vbarua
✅ danepitkin
✅ guiyanakuang
✅ MasseGuillaume
✅ arkanovicz
✅ carlyeks
✅ vibhatha
✅ bvolpato
✅ patientstreetlight
✅ YannisBres
✅ davisusanibar
✅ rkondakov
✅ mbwhite
✅ ajegou
✅ cheikhachraf
❌ semantic-release-bot
You have signed the CLA already but the status is still pending? Let us recheck it.

@ajegou ajegou closed this Mar 29, 2024
@ajegou ajegou force-pushed the ajegou/fix-interval-short-types branch from 6c32c6a to 8f3b2e7 Compare March 29, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.