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

Jark Wu commented on FLINK-31906:
---------------------------------

What's the problem of returning data type with nullability?  We should be 
careful when deciding to make such breaking changes. 

> typeof should only return type exclude nullable 
> ------------------------------------------------
>
>                 Key: FLINK-31906
>                 URL: https://issues.apache.org/jira/browse/FLINK-31906
>             Project: Flink
>          Issue Type: Improvement
>    Affects Versions: 1.18.0
>            Reporter: jackylau
>            Priority: Major
>
> nullable is table level constraint, which can only show by showing schema
>  
> pg [https://www.postgresql.org/docs/9.3/functions-info.html]
> spark :https://spark.apache.org/docs/latest/api/sql/index.html#typeof
> {code:java}
> // code placeholder
> select typeof(1Y), typeof(1S), typeof(1), typeof(1L)
> -- !query schema
> struct<typeof(1):string,typeof(1):string,typeof(1):string,typeof(1):string>
> -- !query output
> tinyint    smallint   int    bigint
> -- !query
> select typeof(cast(1.0 as float)), typeof(1.0D), typeof(1.2)
> -- !query schema
> struct<typeof(CAST(1.0 AS 
> FLOAT)):string,typeof(1.0):string,typeof(1.2):string>
> -- !query output
> float  double decimal(2,1) {code}



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

Reply via email to