Github user adrian-wang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6081#discussion_r30458857
  
    --- Diff: python/pyspark/sql/context.py ---
    @@ -427,6 +428,31 @@ def func(iterator):
                 df = self._ssql_ctx.jsonRDD(jrdd.rdd(), scala_datatype)
             return DataFrame(df, self)
     
    +    def range(self, start, end, step=None, num_partitions=None):
    +        """Creates a [[DataFrame]] with a single [[LongType]] column named 
`id`, containing
    +        elements in an range from `start` to `end`(exclusive) with an 
Integer step value, with
    +        partition number specified.
    +        """
    +        step = 1 if step is None else step
    +        num_partitions = self._sc.defaultParallelism if num_partitions is 
None else num_partitions
    +        if not isinstance(start, (int, long)):
    +            raise TypeError("start should be long")
    +        elif isinstance(start, int):
    +            start = long(start)
    --- End diff --
    
    but if the value is an `int`, for example 2 literally, py4j will convert 
that into java.lang.Integer, however we are not accepting this parameter in the 
scala code...


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