flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rex Remind (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLINK-19956) $ does not work on variables without being qualified in Scala
Date Wed, 04 Nov 2020 17:42:00 GMT

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

Rex Remind edited comment on FLINK-19956 at 11/4/20, 5:41 PM:
--------------------------------------------------------------

Your example does not look like string interpolation to me, {{$"column" === true}} looks
like a string literal columnar access.

However, when I try string interpolation, it provides exactly the same error:
{code:java}
$(s"$column") === true
not found: value $
/{code}
Also, to be clear my example is a toy example, in practice column is a string variable that
is a function of concatenating many other things. It is not static and cannot be replaced
by a literal.

 


was (Author: rex-remind):
Your example does not look like string interpolation to me, {{$"column" === true}} looks
like a string literal columnar access.

However, when I try string interpolation, it provides exactly the same error:
{code:java}
$(s"$column") === true
not found: value ${code}

 Also, to be clear my example is a toy example, in practice column is a string variable that
is a function of concatenating many other things. It is not static and cannot be replaced
by a literal.

 

> $ does not work on variables without being qualified in Scala
> -------------------------------------------------------------
>
>                 Key: FLINK-19956
>                 URL: https://issues.apache.org/jira/browse/FLINK-19956
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API
>    Affects Versions: 1.11.2
>         Environment: MacOS
>            Reporter: Rex Remind
>            Priority: Minor
>
> This does not compile:
> {code:java}
> val columnName = "bool_column"
> table.filter($(column) === true)  {code}
>  
> {color:#333333}This does:{color}
> {code:java}
> val columnName = "bool_column"
> table.filter(Expressions.$(column) === true)    {code}
>  
> {color:#333333}There's nothing obviously documented to using the later.{color}



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

Mime
View raw message