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

Robert Kruszewski commented on SPARK-27273:
-------------------------------------------

This is when compiling a subclass of UserDefinedType in my code. I am compiling 
against the master branch of spark with that change

> 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