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

[CALCITE-5614] Allow serializing + deserializing Sarg #31

Draft
wants to merge 24 commits into
base: looker
Choose a base branch
from

Conversation

olivrlee
Copy link

No description provided.

julianhyde and others added 20 commits March 24, 2023 15:31
This allows dependent projects to run tests using Bazel. (Previously,
DiffRepository would give errors because Bazel has packaged the .xml
files it needs inside JAR files.)

Close apache#2750
Related to CALCITE-5346.

Previously we relied on the parser to map unrecognized datatypes to a known type using SqlAlienSystemTypeNameSpec. This worked but made it difficult to change or add new types as necessary. One would have to update at least 3 different parsers (babel, core, server) to make a change.

This change allows for declaring user-defined types at the root of a schema model and allows for easy type alias mapping. These data types are shared by all schema in the model so cast and DDL expressions do not need to scope data type references to a particular sub-schema. 

For example:
```
inline: {
  version: '1.0',
  types: [
    {
      name: 'BOOL',
      type: 'BOOLEAN'
    },
    {
      name: 'BYTES',
      type: 'VARBINARY'
    },
...
  ],
```
Allows for `CAST("true" as BOOL)`
…R BY` if the dialect allows" (apache#25)

This reverts commit a990ecc.

Causes too many failures for subtotals and pivots.
…ROLLUP fields" (apache#26)

This reverts commit 90599a6.

There's a lot of custom work in our subtotalers. Would rather just miss out on this change than have to rewrite that and test expectations.
…de node) (apache#28)

* Add tests to fix later

* Update test

* Add in type field to RelJson.toJson and update tests

* CALCITE-5607 / Serialize return type during RelJson.toJson(RexNode node)

* Update test comment

---------

Co-authored-by: Oliver Lee <[email protected]>
@olivrlee olivrlee changed the title Test sargs fix [CALCITE-5614] Serialize Sarg Mar 31, 2023
@olivrlee olivrlee changed the title [CALCITE-5614] Serialize Sarg [CALCITE-5614] Allow serializing + deserializing Sarg Mar 31, 2023
@wnob wnob force-pushed the looker branch 2 times, most recently from 34656f0 to 99b489d Compare November 3, 2023 20:19
@tanclary tanclary force-pushed the looker branch 2 times, most recently from 9ddc668 to 598cb51 Compare February 17, 2024 01:38
@olivrlee olivrlee force-pushed the looker branch 3 times, most recently from 641f5b6 to 5562ec1 Compare October 17, 2024 01:28
@olivrlee olivrlee force-pushed the looker branch 4 times, most recently from f2fb7bf to f8d6474 Compare November 8, 2024 00:17
@Anthrino Anthrino force-pushed the looker branch 2 times, most recently from 79d2ec4 to ab353e4 Compare November 26, 2024 01:18
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.

5 participants