You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Muhammad Gelbana (JIRA)" <ji...@apache.org> on 2019/06/02 08:35:00 UTC

[jira] [Comment Edited] (CALCITE-3108) Babel parser should parse the PostgreSQL TEXT type

    [ https://issues.apache.org/jira/browse/CALCITE-3108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16853916#comment-16853916 ] 

Muhammad Gelbana edited comment on CALCITE-3108 at 6/2/19 8:34 AM:
-------------------------------------------------------------------

My branches got mixed up and I added this feature to an unmurged PR that supports the {{::}} operator. Please refer to the description for the updated sample query.

I added {{TEXT}} as a keyword so the returned result set column type name would be {{TEXT}} as returned from a PostgreSQL DB.

I don't usually like touching the parser so you're suggestion sounds more Java oriented, as I'll have to acquire the {{<identifier>}} and act accordingly. Is it possible to easily return the column type name as TEXT if I follow that approach ?

I still have to provide casting rules to support casting types to that identifier.


was (Author: mgelbana):
My branches got mixed up and I added this feature to an unmurged PR that supports the {{::}} operator. Please refer to the description for the updated sample query.

I added {{TEXT}} as a keyword so the returned result set column type name would be {{TEXT}} as returned from a PostgreSQL DB.

I don't usually like touching the parser so you're suggestion sounds more Java oriented, as I'll have to acquire the {{<identifier>}} and act accordingly. Is it possible to easily return the column type name as TEXT if I follow that approach ?

> Babel parser should parse the PostgreSQL TEXT type
> --------------------------------------------------
>
>                 Key: CALCITE-3108
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3108
>             Project: Calcite
>          Issue Type: Bug
>          Components: babel, core
>    Affects Versions: 1.19.0
>            Reporter: Muhammad Gelbana
>            Assignee: Muhammad Gelbana
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.20.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Casting to PostgreSQL TEXT (ie. VARCHAR) isn't currently supported. The following query would fail in parsing and execution.
> {code:sql}SELECT CAST(EXPR$0 AS text) FROM (VALUES (1, 2, 3)){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)