Robert Kruszewski created SPARK-27273:
-----------------------------------------

             Summary: 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


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