[CALCITE-5614] Allow serializing + deserializing Sarg - #31
Draft
olivrlee wants to merge 24 commits into
Draft
Conversation
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)`
…ME, TIMESTAMP, DATETIME (apache#27)
…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 <oliverlee@google.com>
olivrlee
force-pushed
the
test-sargs-fix
branch
from
March 30, 2023 17:50
de86cf4 to
c531f48
Compare
wnob
force-pushed
the
looker
branch
2 times, most recently
from
November 3, 2023 20:19
34656f0 to
99b489d
Compare
tanclary
force-pushed
the
looker
branch
2 times, most recently
from
February 17, 2024 01:38
9ddc668 to
598cb51
Compare
olivrlee
force-pushed
the
looker
branch
3 times, most recently
from
October 17, 2024 01:28
641f5b6 to
5562ec1
Compare
olivrlee
force-pushed
the
looker
branch
4 times, most recently
from
November 8, 2024 00:17
f2fb7bf to
f8d6474
Compare
Anthrino
force-pushed
the
looker
branch
2 times, most recently
from
November 26, 2024 01:18
79d2ec4 to
ab353e4
Compare
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@calcite.apache.org list. Thank you for your contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.