You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2020/02/11 12:12:00 UTC

[jira] [Assigned] (FLINK-15995) TO_BASE64 sql operator change operandTypeChecker from OperandTypes.ANY to OperandTypes.family(SqlTypeFamily.STRING)

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

Jark Wu reassigned FLINK-15995:
-------------------------------

    Assignee: hailong wang

> TO_BASE64 sql operator change operandTypeChecker from OperandTypes.ANY to OperandTypes.family(SqlTypeFamily.STRING) 
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-15995
>                 URL: https://issues.apache.org/jira/browse/FLINK-15995
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>    Affects Versions: 1.10.0
>            Reporter: hailong wang
>            Assignee: hailong wang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.11.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> For the TO_BASE64 sql operator, the operandTypeChecker is OperandTypes.ANY which is too large. I think we should change it to OperandTypes.family(SqlTypeFamily.STRING) .
> For if users use 
> {code:java}
> testSqlApi("to_base64(11)", "AQIDBA=="){code}
> it will throw 
> {code:java}
> Caused by: org.apache.flink.api.common.InvalidProgramException: Table program cannot be compiled. This is a bug. Please file an issue.Caused by: org.apache.flink.api.common.InvalidProgramException: Table program cannot be compiled. This is a bug. Please file an issue. at org.apache.flink.table.runtime.generated.CompileUtils.doCompile(CompileUtils.java:81) at org.apache.flink.table.runtime.generated.CompileUtils.lambda$compile$1(CompileUtils.java:66) at org.apache.flink.shaded.guava18.com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4742) at org.apache.flink.shaded.guava18.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527) at org.apache.flink.shaded.guava18.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319) at org.apache.flink.shaded.guava18.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282) at org.apache.flink.shaded.guava18.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197) ... 30 moreCaused by: org.codehaus.commons.compiler.CompileException: Line 206, Column 150: No applicable constructor/method found for actual parameters "int"; candidates are: "public static java.lang.String org.apache.flink.table.runtime.functions.SqlFunctionUtils.toBase64(org.apache.flink.table.dataformat.BinaryString)", "public static java.lang.String org.apache.flink.table.runtime.functions.SqlFunctionUtils.toBase64(byte[])" at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:12124)
> {code}
> it is confusing to users.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)