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

[OPTIQ-282] {fn QUARTER(date)} is unsupported #13

Closed
wants to merge 1 commit into from

Conversation

benoyantony
Copy link

No description provided.

@benoyantony
Copy link
Author

Hello Committers,

Could you please review ?

@julianhyde
Copy link
Contributor

I added a test for null values

    tester.checkNull("quarter(cast(null as date))");

and got an error. I think that if you change

    RexNode res =
        rexBuilder.makeCall(
            resType,
            SqlStdOperatorTable.EXTRACT_DATE,
            ImmutableList.of(rexBuilder.makeFlag(TimeUnitRange.MONTH), x));

and remote the resType argument it will correctly infer that the return type when applied to a nullable argument is a nullable BIGINT.

@julianhyde
Copy link
Contributor

I also wanted to check whether the JDBC escape syntax works. I added

    tester.checkScalar("{fn QUARTER(DATE '1969-1-1')}", null, "");

and it failed. You need to add an entry to JdbcToInternalLookupTable.

The patch looks good, and we're close. Fix these two things and I will commit.

@asfgit asfgit closed this in a059f76 Dec 11, 2014
@julianhyde
Copy link
Contributor

Checked in as a059f76.

ldming pushed a commit to ldming/mycalcite that referenced this pull request Sep 13, 2018
sukumaar pushed a commit to sukumaar/calcite that referenced this pull request Feb 20, 2019
olivrlee pushed a commit to olivrlee/calcite that referenced this pull request Feb 24, 2023
olivrlee pushed a commit to olivrlee/calcite that referenced this pull request Mar 1, 2023
olivrlee pushed a commit to olivrlee/calcite that referenced this pull request Mar 28, 2023
olivrlee pushed a commit to olivrlee/calcite that referenced this pull request Apr 6, 2023
wnob pushed a commit to wnob/calcite that referenced this pull request May 3, 2023
wnob pushed a commit to wnob/calcite that referenced this pull request Jun 6, 2023
tanclary pushed a commit to tanclary/calcite that referenced this pull request Jun 7, 2023
wnob pushed a commit to wnob/calcite that referenced this pull request Jun 21, 2023
mkou pushed a commit to mkou/calcite that referenced this pull request Jul 27, 2023
olivrlee pushed a commit to olivrlee/calcite that referenced this pull request Aug 18, 2023
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.

2 participants