dchvn edited a comment on pull request #35200:
URL: https://github.com/apache/spark/pull/35200#issuecomment-1014263771


   Before this PR
   ```python
   >>> from pyspark.pandas.typedef.typehints import infer_return_type
   >>> infer_return_type(max)
   Traceback (most recent call last):
     File "/usr/lib/python3.9/inspect.py", line 1162, in getfullargspec
       sig = _signature_from_callable(func,
     File "/usr/lib/python3.9/inspect.py", line 2334, in 
_signature_from_callable
       return _signature_from_builtin(sigcls, obj,
     File "/usr/lib/python3.9/inspect.py", line 2145, in _signature_from_builtin
       raise ValueError("no signature found for builtin {!r}".format(func))
   ValueError: no signature found for builtin <built-in function max>
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/u02/spark/python/pyspark/pandas/typedef/typehints.py", line 568, in 
infer_return_type
       spec = getfullargspec(f)
     File "/usr/lib/python3.9/inspect.py", line 1171, in getfullargspec
       raise TypeError('unsupported callable') from ex
   TypeError: unsupported callable
   ```
   after this PR
   ```python
   >>> from pyspark.pandas.typedef.typehints import infer_return_type
   >>> infer_return_type(max)
   ScalarType[DoubleType]
   ```
   
   Should we change to raise Exception or keep the default return value is 
`ScalarType[DoubleType]` ?
   @ueshin @HyukjinKwon 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to