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

Rick Hillegas commented on DERBY-6894:
--------------------------------------

There will be lots of mischief to consider if we're going to mix data of 
different types in these strings. One way forward may be to borrow a pattern 
from some other, well-behaved language. These strings could look like Json 
arrays without framing brackets. That would allow them to be composed of 
numbers and double-quoted strings. Your example would then be

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

If you wanted to include a column with a numeric name, it would look like this

'1,3,"LastName","4",7'

I don't think we want to fully embrace Json here. That is because Json has its 
own rules about what a valid string is. And in any event, these column names 
are coming out of the CSV world, where the rules are not well-defined. We could 
just say that these double-quoted strings obey the rules of delimited 
identifiers, that is, double-quoted SQL identifiers. Derby already has logic 
for parsing delimited ids.


> 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
>
> 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