Github user nchammas commented on the issue:

    https://github.com/apache/spark/pull/18926
  
    @gatorsmile 
    
    > Even if we plan to drop `long` in this PR
    
    We are not dropping `long` in this PR. It was [never 
supported](https://github.com/apache/spark/pull/18926#discussion_r132837359). 
Both the docstring and actual behavior of `.substr()` make it clear that `long` 
is not supported. Only `int` and `Column` are supported.
    
    >  the checking looks weird to me. Basically, the change just wants to 
ensure the type of length is int.
    
    Can you elaborate please? As @HyukjinKwon pointed out, `.substr()` accepts 
either `int` or `Column`, but both arguments must be of the same type. The goal 
of this PR is to make that clearer.
    
    I am not changing any semantics or behavior other than to throw a Python 
`TypeError` on `long`, as opposed to letting the underlying Scala 
implementation throw a [messy 
exception](https://github.com/apache/spark/pull/18926#discussion_r132837359).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to