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

Vince Gonzalez commented on DRILL-4658:
---------------------------------------

Tried, did not work:

{code}
0: jdbc:drill:zk=local> select * from 
table(dfs.`/Users/vince/data/nyc/mta/bustime/MTA-Bus-Time_.2014-10-31.tsvh`(type
 => 'text', fieldDelimiter => U&'\0009', extractHeader => true)) limit 10;
May 09, 2016 10:27:36 AM org.apache.calcite.sql.validate.SqlValidatorException 
<init>
SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: No match found 
for function signature 
/Users/vince/data/nyc/mta/bustime/MTA-Bus-Time_.2014-10-31.tsvh(type => 
<CHARACTER>, fieldDelimiter => <CHARACTER>, extractHeader => <BOOLEAN>)
May 09, 2016 10:27:36 AM org.apache.calcite.runtime.CalciteException <init>
SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1, column 
25 to line 1, column 157: No match found for function signature 
/Users/vince/data/nyc/mta/bustime/MTA-Bus-Time_.2014-10-31.tsvh(type => 
<CHARACTER>, fieldDelimiter => <CHARACTER>, extractHeader => <BOOLEAN>)
Error: VALIDATION ERROR: From line 1, column 25 to line 1, column 157: No match 
found for function signature 
/Users/vince/data/nyc/mta/bustime/MTA-Bus-Time_.2014-10-31.tsvh(type => 
<CHARACTER>, fieldDelimiter => <CHARACTER>, extractHeader => <BOOLEAN>)

SQL Query null

[Error Id: 4a26b35e-2235-43f4-859a-91711690d539 on 
ip-10-50-108-143.ec2.internal:31010] (state=,code=0)
{code}

In case anyone happens upon this before it's fixed, I am currently working 
around this by creating a workspace and applying the options to the workspace. 
Since table functions only work with individual files, this is necessary anyway 
when dealing with more than one file. This issue really only slows down initial 
exploration of a single file, as far as I can tell.



> 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