Flink SQL> select JSON_OBJECT('product_type' VALUE product_type)
> from income_fee
> ;
[ERROR] Could not execute SQL statement. Reason:
org.apache.calcite.sql.validate.SqlValidatorException: No match found for 
function signature JSON_OBJECT(<null>, <CHARACTER>, <NUMERIC>)

Flink SQL> select JSON_OBJECT('product_type' VALUE product_type)
> from sp_income_fee
> where enabled = 1
> group by id;
[ERROR] Could not execute SQL statement. Reason:
org.apache.calcite.sql.validate.SqlValidatorException: No match found for 
function signature JSON_OBJECT(<null>, <CHARACTER>, <NUMERIC>)

Flink SQL> select JSON_ARRAYAGG(product_type)
> from income_fee
> where f_enabled = 1;
[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.table.api.TableException: Unsupported Function: 
'JSON_ARRAYAGG_ABSENT_ON_NULL'

闫云鹏
DXM 支付业务部 
地址:北京市海淀区西北旺东路度小满金融总部  
邮编:100085   
手机:13693668213             
邮箱:[email protected]
 
度小满金融
精于科技 值得信赖
 
 
 
在 2020/11/30 11:05,“caozhen”<[email protected]> 写入:

    可以把使用方法和 报错信息 发下嘛?
    
    
    
    
    Yan,Yunpeng(DXM,PB) wrote
    > Hi:
    >   尝试使用flink-sql将聚合结果json展示的时候发现flink是支持JSON_OBJECTAGG, JSON_ARRAY,
    > JSON_OBJECT 等这种函数的(使用的默认的blink), 但是总是报错函数的用法不对,有相关资料来介绍这些函数的使用方法的吗?或者示例
    > 
    > 闫云鹏
    > DXM 支付业务部
    > 地址:北京市海淀区西北旺东路度小满金融总部
    > 邮编:100085
    > 手机:13693668213
    > 邮箱:
    
    > yanyunpeng@
    
    > &lt;mailto:
    
    > yanyunpeng@
    
    > &gt;
    > 
    > 度小满金融
    > 
    > 精于科技 值得信赖
    
    
    
    
    
    --
    Sent from: http://apache-flink.147419.n8.nabble.com/

回复