You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by fxbonnet <gi...@git.apache.org> on 2017/07/18 04:19:55 UTC

[GitHub] spark pull request #18667: Fix the simpleString used in error messages

GitHub user fxbonnet opened a pull request:

    https://github.com/apache/spark/pull/18667

    Fix the simpleString used in error messages

    ## What changes were proposed in this pull request?
    
    (Please fill in changes proposed in this fix)
    
    ## How was this patch tested?
    
    (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
    (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
    
    Please review http://spark.apache.org/contributing.html before opening a pull request.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/fxbonnet/spark patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18667.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18667
    
----
commit e31555ba0b297054c504d3e2eaac20befb10738d
Author: Francois-Xavier Bonnet <fr...@centraliens.net>
Date:   2017-07-18T04:19:17Z

    Fix the simpleString used in error messages

----


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


[GitHub] spark pull request #18667: Fix the simpleString used in error messages

Posted by fxbonnet <gi...@git.apache.org>.
Github user fxbonnet commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18667#discussion_r127905854
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/LongType.scala ---
    @@ -43,7 +43,7 @@ class LongType private() extends IntegralType {
        */
       override def defaultSize: Int = 8
     
    -  override def simpleString: String = "bigint"
    +  override def simpleString: String = "long"
    --- End diff --
    
    When you try to read a csv and map to a case class with a Long your get a message like this one:
    __EXCEPTION__:org.apache.spark.sql.AnalysisException: Cannot up cast linked_docs.`MR_NUMBER_OF_DOCS_UPLOADED` from string to bigint as it may truncate
    The type path of the target object is:
    - field (class: "scala.Long", name: "MR_NUMBER_OF_DOCS_UPLOADED")
    
    Getting a message that talks about bigint while you are trying to cast a String to a Long looks confusing to me. I thought this was a typo.


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


[GitHub] spark pull request #18667: Fix the simpleString used in error messages

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18667#discussion_r127903964
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/LongType.scala ---
    @@ -43,7 +43,7 @@ class LongType private() extends IntegralType {
        */
       override def defaultSize: Int = 8
     
    -  override def simpleString: String = "bigint"
    +  override def simpleString: String = "long"
    --- End diff --
    
    I don't think so. bigint is the SQL type for an 8-byte integer, right?


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


[GitHub] spark pull request #18667: Fix the simpleString used in error messages

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18667#discussion_r130308842
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/LongType.scala ---
    @@ -43,7 +43,7 @@ class LongType private() extends IntegralType {
        */
       override def defaultSize: Int = 8
     
    -  override def simpleString: String = "bigint"
    +  override def simpleString: String = "long"
    --- End diff --
    
    You're renaming the whole type, when the issue is at best that some intermediate stage of the plan does cast to bigint first. At the least, this is not the fix, and I'm not sure it's really a problem, even if the error is from an implementation detail. 


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


[GitHub] spark pull request #18667: Fix the simpleString used in error messages

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/18667


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


[GitHub] spark issue #18667: Fix the simpleString used in error messages

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18667
  
    Can one of the admins verify this patch?


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