[ 
https://issues.apache.org/jira/browse/FLINK-3750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241109#comment-15241109
 ] 

ASF GitHub Bot commented on FLINK-3750:
---------------------------------------

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1885#discussion_r59712684
  
    --- Diff: 
flink-batch-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormatTest.java
 ---
    @@ -152,47 +133,49 @@ public void testInvalidQuery() throws IOException {
        @Test(expected = IllegalArgumentException.class)
        public void testIncompleteConfiguration() throws IOException {
                jdbcInputFormat = JDBCInputFormat.buildJDBCInputFormat()
    -                           
.setDrivername("org.apache.derby.jdbc.EmbeddedDriver")
    -                           .setQuery("select * from books")
    +                           .setDrivername(JDBCExample.DRIVER_CLASS)
    +                           .setQuery(JDBCExample.SELECT_ALL_BOOKS)
                                .finish();
        }
     
        @Test(expected = IOException.class)
        public void testIncompatibleTuple() throws IOException {
                jdbcInputFormat = JDBCInputFormat.buildJDBCInputFormat()
    -                           
.setDrivername("org.apache.derby.jdbc.EmbeddedDriver")
    -                           .setDBUrl("jdbc:derby:memory:ebookshop")
    -                           .setQuery("select * from books")
    +                           .setDrivername(JDBCExample.DRIVER_CLASS)
    +                           .setDBUrl(JDBCExample.DB_URL)
    +                           .setQuery(JDBCExample.SELECT_ALL_BOOKS)
                                .finish();
                jdbcInputFormat.open(null);
                jdbcInputFormat.nextRecord(new Tuple2());
        }
     
        @Test
    -   public void testJDBCInputFormat() throws IOException {
    +   public void testJDBCInputFormatWithoutParallelism() throws IOException {
                jdbcInputFormat = JDBCInputFormat.buildJDBCInputFormat()
    -                           
.setDrivername("org.apache.derby.jdbc.EmbeddedDriver")
    -                           .setDBUrl("jdbc:derby:memory:ebookshop")
    -                           .setQuery("select * from books")
    +                           .setDrivername(JDBCExample.DRIVER_CLASS)
    +                           .setDBUrl(JDBCExample.DB_URL)
    +                           .setQuery(JDBCExample.SELECT_ALL_BOOKS)
                                
.setResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE)
                                .finish();
                jdbcInputFormat.open(null);
                Tuple5 tuple = new Tuple5();
                int recordCount = 0;
                while (!jdbcInputFormat.reachedEnd()) {
                        jdbcInputFormat.nextRecord(tuple);
    -                   Assert.assertEquals("Field 0 should be int", 
Integer.class, tuple.getField(0).getClass());
    -                   Assert.assertEquals("Field 1 should be String", 
String.class, tuple.getField(1).getClass());
    -                   Assert.assertEquals("Field 2 should be String", 
String.class, tuple.getField(2).getClass());
    -                   Assert.assertEquals("Field 3 should be float", 
Double.class, tuple.getField(3).getClass());
    -                   Assert.assertEquals("Field 4 should be int", 
Integer.class, tuple.getField(4).getClass());
    +                   if(tuple.getField(0)!=null) Assert.assertEquals("Field 
0 should be int", Integer.class, tuple.getField(0).getClass());
    --- End diff --
    
    missing braces and whitespace.


> Make JDBCInputFormat a parallel source
> --------------------------------------
>
>                 Key: FLINK-3750
>                 URL: https://issues.apache.org/jira/browse/FLINK-3750
>             Project: Flink
>          Issue Type: Improvement
>          Components: Batch
>    Affects Versions: 1.0.1
>            Reporter: Flavio Pompermaier
>            Assignee: Flavio Pompermaier
>            Priority: Minor
>              Labels: connector, jdbc
>
> At the moment the batch JDBC InputFormat does not support parallelism 
> (NonParallelInput). I'd like to remove such limitation



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

Reply via email to