db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6894) Enhance COLUMNINDEXES parsing for SYSCS_IMPORT_DATA_BULK to recognize columns by name
Date Sun, 03 Jul 2016 03:09:11 GMT

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

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

Hi Danoja, I took a very brief look at your patch.

I don't  understand this part of the code:
{code}
+		while (rs.next())
+		{
+			// 17.ORDINAL_POSITION int=> index of column in table
+     		        //(starting at 1)
+			position = rs.getInt(17);
 
+			foundTheColumn = true;
+			
+		}
{code}

Is this 'while' loop supposed to run more than once?

Also, I wonder if you have started to think about how we might write regression test
suites to exercise this change? It seems like we want to try a variety of invalid
values for the COLUMNINDEXES argument, in addition to a variety of valid values.

It might be worth first trying to list a bunch of different success and error cases, so
that we have a bit of a catalog of the test cases we think are important to include?


> 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, noHeaderLines.csv, 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)

Mime
View raw message