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

Sean Owen commented on SPARK-27273:
-----------------------------------

You mean this fails when you compile your own Java code, not Spark right?
Are you sure you're using consistent versions of Spark? the change you cite 
isn't released. Maybe this is mixing in references to Spark 2.4?

> Compile break for UserDefinedType (DataType) subclasses with javac 8
> --------------------------------------------------------------------
>
>                 Key: SPARK-27273
>                 URL: https://issues.apache.org/jira/browse/SPARK-27273
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Robert Kruszewski
>            Priority: Minor
>
> After [https://github.com/apache/spark/pull/23069] subclassing DataType 
> (manifests by subclassing UserDefinedType) causes java compile to fail with 
> (javac 11 succeeds):
> {code:java}
> error: cannot access 1
>  class file for org.apache.spark.sql.types.DataType$1 not found
>  Consult the following stack trace for details.
>  com.sun.tools.javac.code.Symbol$CompletionFailure: class file for 
> org.apache.spark.sql.types.DataType$1 not found{code}
> After debugging this I have noticed that JSortedObject that's part of 
> DataType object gets compiled as DataType$JSortedObject subclass but the 
> reference in DataType class is an anonymous inner class without a name 
> (defaults to $1). Before the linked commit all inner classes have aliases and 
> compilation succeeds. The issue occurs both with scala 2.11 and 2.12 builds. 
> The issue doesn't occur when compiling with scala.
>  
> An easy fix is to move JSortedObject out of DataType object but that's 
> workaround not the root cause
>  
> Apologies if this is not the right place for this issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to