There are essentially two ways to add an interval to a datetime vaue in
Calcite
Call the timestampadd() function:
select {fn timestampadd(year, 1, hire_date)}...
Use datetime_plus interval arithmetic:
select hire_date + interval '1' year
Note that timestampadd's second argument does not need to
h features to transform to datetime_plus.
On Mon, May 28, 2018 at 6:52 PM, Julian Hyde wrote:
> I think we should use the datetime_plus operator. It is standard, and
> sufficiently general. Its second argument needs to be an interval
> value, not necessarily an interval literal.
>
&
uggest creating
> a Google Doc with the contents.
>
> --
> Michael Mior
> mm...@uwaterloo.ca
>
>
> Le mer. 30 mai 2018 à 04:23, James Duong a écrit :
>
> > I've recorded my thoughts on this in the attached document
> >
> > A few notes:
> > - Time
Datetime_plus only such as Oracle.
On Wed, May 30, 2018 at 7:32 AM, James Duong wrote:
> Thanks Michael.
>
> Here is a link to a Google Doc:
> https://docs.google.com/document/d/1j0wa0pZ2senQhAoy_
> 3W_Ev2vHqIhm3ob19BGy4nBJkI/edit?usp=sharing
>
> On Wed, May 30, 2018 at
Hi,
According to the ODBC spec (
https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/time-date-and-interval-functions?view=sql-server-2017),
when the return type inference for timestampadd should be:
1. If the datetime type is a date, and the time unit is a time, promote to
timestamp. (
Hi,
Can I get someone to review CALCITE-2359:
https://issues.apache.org/jira/browse/CALCITE-2359
The PR is here:
https://github.com/apache/calcite/pull/730
Hi,
During the process of unparsing a SqlNode tree, is there a way to unparse a
subtree to a String then cache its value?
I was thinking I could spawn another SqlWriter from the SqlWriter object
supplied to unparse(), then pull the SQL string fragment from it. But the
SqlWriter isn't cloneable, s
Hi,
I'm trying to write a rule for a subclass of Join where I need to check the
properties of the two children of the node.
How might I write a rule operand to capture this scenario?
Thanks
Hi Calcite dev,
I’m working on adding support for more PostgreSQL functions based on PostgreSQL
14 – See https://issues.apache.org/jira/browse/CALCITE-6308.
Some functions such as LOG have different semantics depending on which database
is used:
* In PostgreSQL, LOG with one argument is to
see it referenced in the PR it was introduced in so it appears to be
superfluous? I must be missing something – is this invoked with reflection
somewhere?
Thanks
From: James Duong
Date: Friday, March 8, 2024 at 12:12 PM
To: dev@calcite.apache.org
Subject: Supporting a function with different
cepts.
Julian
> On Mar 8, 2024, at 1:40 PM, James Duong
> wrote:
>
> Incidentally, in the PR that added the FloorCeil approach, it was suggested
> based on the SqlStdOperatorTable.like(boolean, boolean) function.
>
> However I don’t see this method referenced anywhere in eithe
I’ll help take a look at some of the open Avatica and Calcite PRs.
From: Mihai Budiu
Date: Monday, March 18, 2024 at 9:48 AM
To: dev@calcite.apache.org
Subject: Re: [DISCUSS] Towards Calcite 1.37.0
This would be great, I am fixing two very basic bugs.
Was busy with some other stuff, so I didn't
James Duong created CALCITE-2299:
Summary: TIMESTAMPADD(SQL_TSI_FRAC_SECOND) should be nanoseconds
not microseconds
Key: CALCITE-2299
URL: https://issues.apache.org/jira/browse/CALCITE-2299
Project
James Duong created CALCITE-2359:
Summary: Inconsistent behavior when casting interval literals to
integer
Key: CALCITE-2359
URL: https://issues.apache.org/jira/browse/CALCITE-2359
Project: Calcite
James Duong created CALCITE-2396:
Summary: TIMESTAMPADD and DATETIME_PLUS should allow NULL intervals
Key: CALCITE-2396
URL: https://issues.apache.org/jira/browse/CALCITE-2396
Project: Calcite
James Duong created CALCITE-2397:
Summary: Column Index not getting set on correlationIds
Key: CALCITE-2397
URL: https://issues.apache.org/jira/browse/CALCITE-2397
Project: Calcite
Issue
James Duong created CALCITE-2398:
Summary: SqlSelect does not use SqlDialect when unparsing
Key: CALCITE-2398
URL: https://issues.apache.org/jira/browse/CALCITE-2398
Project: Calcite
Issue
James Duong created CALCITE-2399:
Summary: Allow SqlImplementor classes to be extended
Key: CALCITE-2399
URL: https://issues.apache.org/jira/browse/CALCITE-2399
Project: Calcite
Issue Type
James Duong created CALCITE-2603:
Summary: Error double literal with exponential when unparsing with
RelToSqlConverter
Key: CALCITE-2603
URL: https://issues.apache.org/jira/browse/CALCITE-2603
James Duong created CALCITE-2614:
Summary: Converting datetime_plus to timestampadd should be done
recursively
Key: CALCITE-2614
URL: https://issues.apache.org/jira/browse/CALCITE-2614
Project
James Duong created CALCITE-6308:
Summary: Add PostgreSQL functions up to PostgreSQL v14
Key: CALCITE-6308
URL: https://issues.apache.org/jira/browse/CALCITE-6308
Project: Calcite
Issue Type
James Duong created CALCITE-6309:
Summary: Support PostgreSQL REGEXP_LIKE
Key: CALCITE-6309
URL: https://issues.apache.org/jira/browse/CALCITE-6309
Project: Calcite
Issue Type: Sub-task
James Duong created CALCITE-6310:
Summary: Support PostgreSQL REGEXP_REPLACE
Key: CALCITE-6310
URL: https://issues.apache.org/jira/browse/CALCITE-6310
Project: Calcite
Issue Type: Sub-task
James Duong created CALCITE-6313:
Summary: Support PostgreSQL POW
Key: CALCITE-6313
URL: https://issues.apache.org/jira/browse/CALCITE-6313
Project: Calcite
Issue Type: Sub-task
James Duong created CALCITE-6311:
Summary: Support PostgreSQL DATE_PART
Key: CALCITE-6311
URL: https://issues.apache.org/jira/browse/CALCITE-6311
Project: Calcite
Issue Type: Sub-task
James Duong created CALCITE-6312:
Summary: Support PostgreSQL LOG
Key: CALCITE-6312
URL: https://issues.apache.org/jira/browse/CALCITE-6312
Project: Calcite
Issue Type: Sub-task
James Duong created CALCITE-6315:
Summary: Support PostgreSQL TO_CHAR, TO_DATE, TO_TIMESTAMP
Key: CALCITE-6315
URL: https://issues.apache.org/jira/browse/CALCITE-6315
Project: Calcite
Issue
James Duong created CALCITE-6314:
Summary: Support PostgreSQL RANDOM
Key: CALCITE-6314
URL: https://issues.apache.org/jira/browse/CALCITE-6314
Project: Calcite
Issue Type: Sub-task
James Duong created CALCITE-6391:
Summary: Apply mapping to RelCompositeTrait does not apply it to
wrapped traits
Key: CALCITE-6391
URL: https://issues.apache.org/jira/browse/CALCITE-6391
Project
James Duong created CALCITE-6465:
Summary: Rework code generator
Key: CALCITE-6465
URL: https://issues.apache.org/jira/browse/CALCITE-6465
Project: Calcite
Issue Type: New Feature
30 matches
Mail list logo