DERBY-4555: Expand SYSCS_IMPORT_TABLE to accept CSV file with header lines
DERBY-6894: Enhance COLUMNINDEXES parsing for SYSCS_IMPORT_DATA

This patch was contributed by Danoja Dias (danojadias at gmail dot com)

The purpose of this patch is to allow the COLUMNINDEXES value to specify
columns in the input file by column header "name", as an alternate to
column index number. Column header names can be specified as double-quoted
strings, and you can mix-and-match indexes and names, so that
COLUMNINDEXES could be specified as:

    1,3,"LastName","FirstName",7

During the preparation of the input file for import processing, the
new "readHeaders" method that is added to the Import class will,
if 'skip > 0', open the input file, read the first 'skip' number of lines,
parse the column structure, and construct an array of the column headers,
then close the input file and return the headers array.

Then, the COLUMNINDEXES value, if it contains any column names, rather
than column index numbers, is matched against the headers array to
determine which column(s) to use.


git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1752990 13f79535-47bb-0310-9956-ffa450edef68
6 files changed