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

Roger Dielrton commented on DRILL-4658:
---------------------------------------

Execuse me for the intervention, but I suffer a related problem with 
{{fieldDelimiter}}:

Data file {{/tmp/foo.txt}} contents:
{noformat}
0::2::3
0::3::1
0::5::2
0::9::4
0::11::1
0::12::2
0::15::1
{noformat}

Query:
{code:sql}
select
        columns
from
        table(dfs.`/tmp/foo.txt`(type => 'text', fieldDelimiter => '::'))
{code}

Results in a error message:
{noformat}
PARSE ERROR:
Expected single character but was String: ::
table /tmp/foo.txt
parameter fieldDelimiter SQL Query null
{noformat}

It would be nice that {{fieldDelimiter}} accepts text of any length.

> cannot specify tab as a fieldDelimiter in table function
> --------------------------------------------------------
>
>                 Key: DRILL-4658
>                 URL: https://issues.apache.org/jira/browse/DRILL-4658
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>    Affects Versions: 1.6.0
>         Environment: Mac OS X, Java 8
>            Reporter: Vince Gonzalez
>
> I can't specify a tab delimiter in the table function because it maybe counts 
> the characters rather than trying to interpret as a character escape code?
> {code}
> 0: jdbc:drill:zk=local> select columns[0] as a, cast(columns[1] as bigint) as 
> b from table(dfs.tmp.`sample_cast.tsv`(type => 'text', fieldDelimiter => 
> '\t', skipFirstLine => true));
> Error: PARSE ERROR: Expected single character but was String: \t
> table sample_cast.tsv
> parameter fieldDelimiter
> SQL Query null
> [Error Id: 3efa82e1-3810-4d4a-b23c-32d6658dffcf on 172.30.1.144:31010] 
> (state=,code=0)
> {code}



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

Reply via email to