[jira] [Created] (CALCITE-6483) Add position and length to PostgreSQL function library

2024-07-17 Thread Norman Jordan (Jira)
Norman Jordan created CALCITE-6483:
--

 Summary: Add position and length to PostgreSQL function library
 Key: CALCITE-6483
 URL: https://issues.apache.org/jira/browse/CALCITE-6483
 Project: Calcite
  Issue Type: Improvement
  Components: core
Reporter: Norman Jordan
Assignee: Norman Jordan


PostgreSQL supports the *POSITION* and *LENGTH* string functions.

[https://www.postgresql.org/docs/14/functions-string.html]

Also check other libraries to see if those functions should be included.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CALCITE-6472) Add degree based trig functions to PostgreSQL function library

2024-07-15 Thread Norman Jordan (Jira)
Norman Jordan created CALCITE-6472:
--

 Summary: Add degree based trig functions to PostgreSQL function 
library
 Key: CALCITE-6472
 URL: https://issues.apache.org/jira/browse/CALCITE-6472
 Project: Calcite
  Issue Type: Improvement
  Components: core
Reporter: Norman Jordan
Assignee: Norman Jordan


PostgreSQL supports the following trigonometric functions that are degree based.
 * COSD
 * SIND
 * TAND
 * ACOSD
 * ASIND
 * ATAND



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CALCITE-6454) Implement array comparison operators

2024-07-02 Thread Norman Jordan (Jira)
Norman Jordan created CALCITE-6454:
--

 Summary: Implement array comparison operators
 Key: CALCITE-6454
 URL: https://issues.apache.org/jira/browse/CALCITE-6454
 Project: Calcite
  Issue Type: Improvement
  Components: core
Reporter: Norman Jordan


The comparison operators <, <=, >, >=, =, <> are not implemented for arrays. 
Here is an example query:

 
{code:java}
SELECT array[2, 2] > array[1, 1]; {code}
[This 
page|https://popsql.com/learn-sql/postgresql/how-to-compare-arrays-in-postgresql]
 describes how the comparisons  work in PostgreSQL.

 

Check if the comparison operators for arrays exist in other DB engines.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CALCITE-6449) Enable PostgreSQL implementations of to_date/to_timestamp

2024-06-26 Thread Norman Jordan (Jira)
Norman Jordan created CALCITE-6449:
--

 Summary: Enable PostgreSQL implementations of to_date/to_timestamp
 Key: CALCITE-6449
 URL: https://issues.apache.org/jira/browse/CALCITE-6449
 Project: Calcite
  Issue Type: Sub-task
  Components: core
Reporter: Norman Jordan


Update the PostgreSQL function library to use PostgreSQL specific 
implementations for *TO_DATE* and {*}TO_TIMESTAMP{*}. These implementations 
should fully support the date/time formatting patterns that PostgreSQL supports.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CALCITE-6444) Add a RedShift SqlLibrary

2024-06-21 Thread Norman Jordan (Jira)
Norman Jordan created CALCITE-6444:
--

 Summary: Add a RedShift SqlLibrary
 Key: CALCITE-6444
 URL: https://issues.apache.org/jira/browse/CALCITE-6444
 Project: Calcite
  Issue Type: Improvement
  Components: core
Affects Versions: 1.34.0
Reporter: Norman Jordan
Assignee: Norman Jordan


The Babel tests assume that RedShift is a union of the Oracle and PostgreSQL 
libraries. This is not accurate. There are functions such as *INCR* that are 
supported by Oracle and not by RedShift. Problems will also occur when Oracle 
and Postgres both support a function of the same name that needs different 
implementations.

[https://github.com/apache/calcite/blob/main/babel/src/test/java/org/apache/calcite/test/BabelQuidemTest.java#L110]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CALCITE-6392) Support all PostgreSQL 14 date/time patterns for to_date/to_timestamp

2024-04-29 Thread Norman Jordan (Jira)
Norman Jordan created CALCITE-6392:
--

 Summary: Support all PostgreSQL 14 date/time patterns for 
to_date/to_timestamp
 Key: CALCITE-6392
 URL: https://issues.apache.org/jira/browse/CALCITE-6392
 Project: Calcite
  Issue Type: Sub-task
Reporter: Norman Jordan
Assignee: Norman Jordan


Many of the date/time format patterns supported by PostgreSQL 14 are not 
supported in Calcite.
 * HH
 * US
 * 
 * S
 * AM
 * A.M.
 * am
 * a.m.
 * PM
 * P.M.
 * pm
 * p.m.
 * Y,YYY
 * YYY
 * Y
 * IYYY
 * IYY
 * IY
 * I
 * BC
 * B.C.
 * bc
 * b.c.
 * AD
 * A.D.
 * ad
 * a.d.
 * MONTH
 * month
 * MON
 * mon
 * DAY
 * day
 * Dy
 * dy
 * IDDD
 * ID
 * TZH
 * TZM
 * OF

There are also template pattern modifiers that need to be supported.
 * FM (prefix)
 * TH (suffix)
 * th (suffix)
 * FX (prefix)
 * TM (prefix)

Some format patterns in Calcite behave differently from PostgreSQL 14.
 * FF1
 * FF2
 * FF4
 * FF5
 * FF6

Also verify that the other existing format strings produce results that match 
PostgreSQL 14.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CALCITE-6358) Support all PostgreSQL 14 date/time patterns

2024-04-10 Thread Norman Jordan (Jira)
Norman Jordan created CALCITE-6358:
--

 Summary: Support all PostgreSQL 14 date/time patterns
 Key: CALCITE-6358
 URL: https://issues.apache.org/jira/browse/CALCITE-6358
 Project: Calcite
  Issue Type: Sub-task
Reporter: Norman Jordan


Many of the date/time format patterns supported by PostgreSQL 14 are not 
supported in Calcite.
 * HH
 * US
 * 
 * S
 * AM
 * A.M.
 * am
 * a.m.
 * PM
 * P.M.
 * pm
 * p.m.
 * Y,YYY
 * YYY
 * Y
 * IYYY
 * IYY
 * IY
 * I
 * BC
 * B.C.
 * bc
 * b.c.
 * AD
 * A.D.
 * ad
 * a.d.
 * MONTH
 * month
 * MON
 * mon
 * DAY
 * day
 * Dy
 * dy
 * IDDD
 * ID
 * TZH
 * TZM
 * OF

Some format patterns in Calcite behave differently from PostgreSQL 14.
 * FF1
 * FF2
 * FF4
 * FF5
 * FF6

Also verify that the other existing format strings produce results that match 
PostgreSQL 14.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)