[ 
https://issues.apache.org/jira/browse/IMPALA-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Armstrong resolved IMPALA-756.
----------------------------------
    Fix Version/s: Impala 4.0
       Resolution: Fixed

IMPALA-10074 changed the default protocol to hs2, which doesn't have this 
problem.

> Improve error message / fallback behavior for impala-shell queries involving 
> tabs
> ---------------------------------------------------------------------------------
>
>                 Key: IMPALA-756
>                 URL: https://issues.apache.org/jira/browse/IMPALA-756
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Clients
>    Affects Versions: Impala 1.2.3
>            Reporter: John Russell
>            Priority: Minor
>             Fix For: Impala 4.0
>
>
> When a query in impala-shell refers to a string literal, the shell stops 
> using pretty-printed output, with a message like so:
> [localhost:21000] > select 'a\tb';
> Prettytable cannot resolve string columns values that have  embedded tabs. 
> Reverting to tab delimited text output
> a     b
> I suggest taking out the reference to 'prettytable' as that's an 
> implementation detail. The second part of the message should also use a 
> hyphen 'tab-delimited' and end with a period.
> The same applies if the query itself doesn't contain any tabs, but the result 
> set does:
> [localhost:21000] > create table embedded_tabs (s string);
> [localhost:21000] > insert into table embedded_tabs values 
> ('abc\t123'),('xyz\t456');
> [localhost:21000] > select * from embedded_tabs;
> Prettytable cannot resolve string columns values that have  embedded tabs. 
> Reverting to tab delimited text output
> abc   123
> xyz   456
> Is tab-delimited text really the right fallback behavior though? Then there's 
> no way to distinguish between a tab that really was in the data and one added 
> by impala-shell as a separator. For example, here each row of the result set 
> has 2 fields, but in 2 out of 3 rows there's a tab in the output too. The 
> actual fields don't line up underneath each other, and the final row with no 
> tab looks like a field is missing.
> [localhost:21000] > alter table embedded_tabs replace columns (s1 string, s2 
> string);
> [localhost:21000] > insert overwrite table embedded_tabs values ('hello 
> world','abc\t123'),('xyz\t456','foo bar'),('bletch','baz');
> [localhost:21000] > select * from embedded_tabs;
> Prettytable cannot resolve string columns values that have  embedded tabs. 
> Reverting to tab delimited text output
> hello world   abc     123
> xyz   456     foo bar
> bletch        baz
> When output includes tabs, should the shell fall back to some different 
> separator like pipe, so that the fields with embedded tabs could be seen and 
> parsed correctly? (I realize that choosing a different separator opens up a 
> new can of worms if the output includes the new separator too.)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to