[
https://issues.apache.org/jira/browse/DERBY-6894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15376327#comment-15376327
]
Bryan Pendleton commented on DERBY-6894:
----------------------------------------
The behavior you describe seems correct to me; as you say, it is up
to the user to specify the arguments correctly on the call.
I think it would be nice if we created some other tables in the tests,
with columns of different data types (that is, not just VARCHAR, but
maybe INTEGER, DATE, etc., or perhaps NULL vs NOT NULL). Then we could
include some other test cases demonstrating those behaviors.
I agree with you that we cannot prevent all the errors; if the user
specifies some incorrect values, their import operation will fail
with incorrect datatype exceptions, etc. This is fine; our tests
can demonstrate that we detect the exceptions and return a sensible
message to help the user figure out what they did wrong.
Sometimes I write a lot of test cases which do nothing but cause error
situations to arise. These test cases can be just as helpful as the
test cases which demonstrate the code running successfully.
Thanks for all the hard work in examining the different situations!
bryan
> 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,
> noHeaderLines.csv, petlist.csv, 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)