You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ZheHu (Jira)" <ji...@apache.org> on 2023/05/04 10:30:00 UTC

[jira] [Updated] (CALCITE-5685) Support MySQL CONVERT function that works on data types

     [ https://issues.apache.org/jira/browse/CALCITE-5685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ZheHu updated CALCITE-5685:
---------------------------
    Description: 
CONVERT function in MySQL has two usage:
 # convert(s USING transcodingName): as described in [CALCITE-5664|https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-5664]
 # convert(value, type): equivalent to CAST function that converts value to specific type.

Here are some examples:
 * convert(150, CHAR)
 * convert(now(), DATE)
 * convert('9.5', DECIMAL(10, 2))

Noted: for CONVERT or CAST function in MySQL, they only support converting to some specific data types(binary、char、date、time、datetime、decimal、signed、unsigned).

 

  was:
CONVERT function in MySQL has two usage:
 # convert(s USING transcodingName): as described in [CALCITE-5664|https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-5664]
 # convert(value, type): equivalent to CAST function that converts value to specific type.

Here are some examples:
 * convert(150, CHAR)
 * convert(now(), DATE)
 * convert('9.5', DECIMAL(10, 2))

Noted: for CONVERT or CAST function in MySQL, they only support converting to some specific date types(binary、char、date、time、datetime、decimal、signed、unsigned).

 


> Support MySQL CONVERT function that works on data types
> -------------------------------------------------------
>
>                 Key: CALCITE-5685
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5685
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.34.0
>            Reporter: ZheHu
>            Assignee: ZheHu
>            Priority: Minor
>
> CONVERT function in MySQL has two usage:
>  # convert(s USING transcodingName): as described in [CALCITE-5664|https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-5664]
>  # convert(value, type): equivalent to CAST function that converts value to specific type.
> Here are some examples:
>  * convert(150, CHAR)
>  * convert(now(), DATE)
>  * convert('9.5', DECIMAL(10, 2))
> Noted: for CONVERT or CAST function in MySQL, they only support converting to some specific data types(binary、char、date、time、datetime、decimal、signed、unsigned).
>  



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