spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vanzin <...@git.apache.org>
Subject [GitHub] spark pull request: [minor] [sql] Partial revert of e683182c3e.
Date Tue, 19 May 2015 02:19:07 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message