[
https://issues.apache.org/jira/browse/CALCITE-5905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17762271#comment-17762271
]
Mihai Budiu commented on CALCITE-5905:
--------------------------------------
Apparently Oracle has a VARCHAR2 data type, which is (currently) an alias for
VARCHAR:
https://docs.oracle.com/cd/A57673_01/DOC/server/doc/SCN73/ch6.htm#varchar2
The comment in HrSchema that uses VARCHAR2 specifically mentions Oracle, so the
comment seems correct.
But there is no harm in changing it to VARCHAR.
> Documentation for CREATE TYPE is incorrect
> ------------------------------------------
>
> Key: CALCITE-5905
> URL: https://issues.apache.org/jira/browse/CALCITE-5905
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.35.0
> Reporter: Mihai Budiu
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.36.0
>
>
> I have tried to run the example CREATE TYPE statements from this page
> https://calcite.apache.org/docs/reference.html#declaring-objects-for-user-defined-types
> through the compiler:
> {code:sql}
> CREATE TYPE address_typ AS OBJECT (
> street VARCHAR2(30),
> city VARCHAR2(20),
> state CHAR(2),
> postal_code VARCHAR2(6));
> {code}
> Calcite complains in two places: OBJECT and VARCHAR2.
> The following compiles fine:
> {code:sql}
> CREATE TYPE address_typ AS (
> street VARCHAR(30),
> city VARCHAR(20),
> state CHAR(2),
> postal_code VARCHAR(6));
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)