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

Apache Spark reassigned SPARK-16222:
------------------------------------

    Assignee:     (was: Apache Spark)

> JDBC Sources: Handling illegal input values for `fetchsize` and `batchsize`
> ---------------------------------------------------------------------------
>
>                 Key: SPARK-16222
>                 URL: https://issues.apache.org/jira/browse/SPARK-16222
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Xiao Li
>
> For JDBC data sources, users can specify `batchsize` for multi-row inserts 
> and `fetchsize` for multi-row fetch. A few issues exist:
> - The property keys are case sensitive. Thus, the existing test cases for 
> `fetchsize` use incorrect names. Basically, the test cases are broken. 
> - No test cases exist for `batchsize`. 
> - We do not detect the illegal input values for `fetchsize` and `batchsize`. 
> For example, when `batchsize` is zero, we got the following exception: 
> ```
> Job aborted due to stage failure: Task 0 in stage 0.0 failed 1 times, most 
> recent failure: Lost task 0.0 in stage 0.0 (TID 0, localhost): 
> java.lang.ArithmeticException: / by zero
> ```
> when `fetchsize` is less than zero, we got the exception from the underlying 
> JDBC driver:
> ```
> Job aborted due to stage failure: Task 0 in stage 0.0 failed 1 times, most 
> recent failure: Lost task 0.0 in stage 0.0 (TID 0, localhost): 
> org.h2.jdbc.JdbcSQLException: Invalid value "-1" for parameter "rows" 
> [90008-183]
> ```



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to