You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2016/06/27 04:44:51 UTC

[jira] [Created] (SPARK-16222) JDBC Sources: Handling illegal input values for `fetchsize` and `batchsize`

Xiao Li created SPARK-16222:
-------------------------------

             Summary: 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org