Github user vanzin commented on the pull request:

    https://github.com/apache/spark/pull/6243#issuecomment-103302603
  
    For those curious, the compilation thing seems to be something super weird 
with scalac. This code compiles fine:
    
        package org.apache.spark.sql
        
        import org.apache.spark.sql.catalyst.JavaTypeInference
        import com.google.common.reflect.TypeToken
        
        object foo{
        
          def main(args: Array[String]): Unit = {
            JavaTypeInference.inferDataType(TypeToken.of(classOf[Integer]))
          }
        
        }
    
    While the following java code:
    
        import org.apache.spark.sql.catalyst.JavaTypeInference$;
        import com.google.common.reflect.TypeToken;
        
        class foo {
        
          public static void main(String[] args) {
            JavaTypeInference$.inferDataType(TypeToken.of(foo.class));
          }
        
        }
    
    Fails with the expected error:
    
        test.java:7: 
inferDataType(org.spark-project.guava.reflect.TypeToken<?>) in 
org.apache.spark.sql.catalyst.JavaTypeInference$ cannot be applied to 
(com.google.common.reflect.TypeToken<foo>)
          JavaTypeInference$.inferDataType(TypeToken.of(foo.class));
    
    Perhaps it has something to do with the fact that we're using a technically 
illegal package name for the shaded classes (`org.spark-project`).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to