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

Fixup for MetaColumn constructor changes from [CALCITE-5549] #3448

Closed
wants to merge 13 commits into from

Conversation

olivrlee
Copy link
Contributor

No description provided.

julianhyde and others added 13 commits September 28, 2023 17:26
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)`
…de node) (#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>
…K, WEEK(WEEKDAY) (#32)

* [CALCITE-5449] Allow EXTRACT() to accept time frames

* Fix getMonotonicity() override

* Lint

* Refactor DAYOFWEEK, DAYOFYEAR

---------

Co-authored-by: tanclary <116591231+tanclary@users.noreply.github.com>
Co-authored-by: Tanner Clary <tannerclary@google.com>
@olivrlee olivrlee closed this Sep 28, 2023
@olivrlee olivrlee deleted the meta_column_fixup branch September 28, 2023 19:03
@olivrlee olivrlee restored the meta_column_fixup branch September 28, 2023 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants