[
https://issues.apache.org/jira/browse/SPARK-44407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yang Jie updated SPARK-44407:
-----------------------------
Description:
{code:java}
[warn]
/Users/yangjie01/SourceCode/git/spark-mine-sbt/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/JavaTypeInferenceSuite.scala:74:21:
[deprecation @ | origin= | version=2.13.7] Wrap `enum` in backticks to use it
as an identifier, it will become a keyword in Scala 3.
[warn] @BeanProperty var enum: java.time.Month = _ {code}
enum will become a keyword in Scala 3, this also includes {{export}} and
{{{}given{}}}.
Scala 2.13
{code:java}
Welcome to Scala 2.13.12 (OpenJDK 64-Bit Server VM, Java 17.0.8).
Type in expressions for evaluation. Or try :help.
scala> val enum: Int = 1
^
warning: Wrap `enum` in backticks to use it as an identifier, it will
become a keyword in Scala 3. [quickfixable]
val enum: Int = 1
scala> val export: Int = 1
^
warning: Wrap `export` in backticks to use it as an identifier, it will
become a keyword in Scala 3. [quickfixable]
val export: Int = 1
scala> val given: Int = 1
^
warning: Wrap `given` in backticks to use it as an identifier, it will
become a keyword in Scala 3. [quickfixable]
val given: Int = 1 {code}
Scala 3
{code:java}
Welcome to Scala 3.3.1 (17.0.8, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> val enum: Int = 1
-- [E032] Syntax Error: --------------------------------------------------------
1 |val enum: Int = 1
| ^^^^
| pattern expected
|
| longer explanation available when compiling with `-explain`
scala> val export: Int = 1
-- [E032] Syntax Error: --------------------------------------------------------
1 |val export: Int = 1
| ^^^^^^
| pattern expected
|
| longer explanation available when compiling with `-explain`
scala> val given: Int = 1
-- [E040] Syntax Error: --------------------------------------------------------
1 |val given: Int = 1
| ^
| an identifier expected, but ':' found
|
| longer explanation available when compiling with `-explain` {code}
was:
{code:java}
[warn]
/Users/yangjie01/SourceCode/git/spark-mine-sbt/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/JavaTypeInferenceSuite.scala:74:21:
[deprecation @ | origin= | version=2.13.7] Wrap `enum` in backticks to use it
as an identifier, it will become a keyword in Scala 3.
[warn] @BeanProperty var enum: java.time.Month = _ {code}
enum will become a keyword in Scala 3.
> Prohibit using `enum` as a variable or function name
> ----------------------------------------------------
>
> Key: SPARK-44407
> URL: https://issues.apache.org/jira/browse/SPARK-44407
> Project: Spark
> Issue Type: Sub-task
> Components: Build
> Affects Versions: 3.5.0
> Reporter: Yang Jie
> Priority: Minor
> Labels: pull-request-available
>
> {code:java}
> [warn]
> /Users/yangjie01/SourceCode/git/spark-mine-sbt/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/JavaTypeInferenceSuite.scala:74:21:
> [deprecation @ | origin= | version=2.13.7] Wrap `enum` in backticks to use
> it as an identifier, it will become a keyword in Scala 3.
> [warn] @BeanProperty var enum: java.time.Month = _ {code}
> enum will become a keyword in Scala 3, this also includes {{export}} and
> {{{}given{}}}.
>
> Scala 2.13
> {code:java}
> Welcome to Scala 2.13.12 (OpenJDK 64-Bit Server VM, Java 17.0.8).
> Type in expressions for evaluation. Or try :help.
> scala> val enum: Int = 1
> ^
> warning: Wrap `enum` in backticks to use it as an identifier, it will
> become a keyword in Scala 3. [quickfixable]
> val enum: Int = 1
> scala> val export: Int = 1
> ^
> warning: Wrap `export` in backticks to use it as an identifier, it
> will become a keyword in Scala 3. [quickfixable]
> val export: Int = 1
> scala> val given: Int = 1
> ^
> warning: Wrap `given` in backticks to use it as an identifier, it will
> become a keyword in Scala 3. [quickfixable]
> val given: Int = 1 {code}
>
> Scala 3
>
> {code:java}
> Welcome to Scala 3.3.1 (17.0.8, Java OpenJDK 64-Bit Server VM).
> Type in expressions for evaluation. Or try :help.
>
>
>
>
> scala> val enum: Int = 1
> -- [E032] Syntax Error:
> --------------------------------------------------------
> 1 |val enum: Int = 1
> | ^^^^
> | pattern expected
> |
> | longer explanation available when compiling with `-explain`
>
>
>
>
> scala> val export: Int = 1
> -- [E032] Syntax Error:
> --------------------------------------------------------
> 1 |val export: Int = 1
> | ^^^^^^
> | pattern expected
> |
> | longer explanation available when compiling with `-explain`
>
>
>
>
> scala> val given: Int = 1
> -- [E040] Syntax Error:
> --------------------------------------------------------
> 1 |val given: Int = 1
> | ^
> | an identifier expected, but ':' found
> |
> | longer explanation available when compiling with `-explain` {code}
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]