[ 
https://issues.apache.org/jira/browse/SPARK-52677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Beyer updated SPARK-52677:
--------------------------------
    Description: 
DataTypeUtils.canWrite is confusing and can be simplified:
 * addError is never used; it's prior use has been replaced by thrown 
exceptions.
 * The result is always true, or an exception is thrown.

We should
 * Remove addError
 * Change the return type to Unit
 * Change the method name to better reflect the current behavior
 * Simplify the callers to eliminate dead code paths

  was:
DataTypeUtils.canCreate is confusing and can be simplified:
 * addError is never used; it's prior use has been replaced by thrown 
exceptions.
 * The result is always true, or an exception is thrown.

We should
 * Remove addError
 * Change the return type to Unit
 * Change the method name to better reflect the current behavior
 * Simplify the callers to eliminate dead code paths


> clean up DataTypeUtils.canWrite
> -------------------------------
>
>                 Key: SPARK-52677
>                 URL: https://issues.apache.org/jira/browse/SPARK-52677
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 4.1.0
>            Reporter: Kevin Beyer
>            Priority: Trivial
>
> DataTypeUtils.canWrite is confusing and can be simplified:
>  * addError is never used; it's prior use has been replaced by thrown 
> exceptions.
>  * The result is always true, or an exception is thrown.
> We should
>  * Remove addError
>  * Change the return type to Unit
>  * Change the method name to better reflect the current behavior
>  * Simplify the callers to eliminate dead code paths



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to