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

Bryan Pendleton commented on DERBY-6894:
----------------------------------------

However, I'm a little surprised that this test case succeeded:

{code}
        //Skip argument is 7 that is greater than number of rows in the file.
        cSt = prepareCall(
            " call SYSCS_UTIL.SYSCS_IMPORT_TABLE_BULK(null, 'PET', 
'extinout/pet.dat', null, null, null, 0, 7) ");
        JDBC.assertEmpty(st.executeQuery("select * from Pet"));
{code}

I anticipated that this test case would get a "unexpected end of file" exception
of some sort, because if the user said there were 7 rows of headers, before
any data, and we didn't find the full 7 rows of headers to skip, that seems like
it should be an error.

It doesn't seem like a terribly *likely* case, but the behavior does surprise 
me a bit.

Danoja, what do you think?

> Enhance COLUMNINDEXES parsing for SYSCS_IMPORT_DATA_BULK to recognize columns 
> by name
> -------------------------------------------------------------------------------------
>
>                 Key: DERBY-6894
>                 URL: https://issues.apache.org/jira/browse/DERBY-6894
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Bryan Pendleton
>            Assignee: Danoja Dias
>            Priority: Minor
>         Attachments: Derby-6894.diff, NewDerby6894.diff, NewDerby6894_2.diff, 
> NewDerby6894_3.diff, noHeaderLines.csv, petlist.csv, 
> readHeadersLoadError.diff, repro.java, repro.java
>
>
> To ease maintainability and legibility of client programs, it would be
> nice if callers of SYSCS_IMPORT_DATA_BULK (and possibly also
> SYSCS_IMPORT_DATA) could refer to columns in the COLUMNINDEXES
> argument by column *NAME*, as well as by index *NUMBER*.
> So, for example, a valid COLUMNINDEXES specification might be:
>     '1,3,LastName,FirstName,7'



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

Reply via email to