tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JaeHwa Jung (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAJO-444) Tajo fails to parse order by query with "is null" predicate in sort key
Date Mon, 23 Dec 2013 02:49:50 GMT

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

JaeHwa Jung commented on TAJO-444:
----------------------------------

Prafulla, thanks for your reporting.

I found a bug about order by query as follows:
{code:xml}
tajo> select id, length(name) from table1 ;
Progress: 100%, response time: 0.289 sec
final state: QUERY_SUCCEEDED, response time: 0.289 sec
result: hdfs://localhost:9010/tmp/tajo-blrunner/staging/q_1387765138654_0003/RESULT, 5 rows
(20 B)
id,  ?length
-------------------------------
1,  3
2,  3
3,  3
4,  3
5,  3
tajo> select id, length(name) from table1 order by length(name);
ERROR: mismatched input '(' expecting {<EOF>, EXCEPT, INTERSECT, LIMIT, UNION, ';',
','}
LINE 1:51 select id, length(name) from table1 order by length(name)
{code}

I think that it caused by _order by_ clause settings of Tajo. Tajo just provide user to write
columns on _order by_ clause as follows: 
{code:xml}
orderby_clause
  : ORDER BY sort_specifier_list
  ;

sort_specifier_list
  : sort_specifier (COMMA sort_specifier)*
  ;

sort_specifier
  : column=column_reference order=order_specification? null_order=null_ordering?
  ;
{code}

SQLParser.g4 and SQLAnalyzer and SortSpec have to be updated for this issue.

> Tajo fails to parse order by query with "is null" predicate in sort key
> -----------------------------------------------------------------------
>
>                 Key: TAJO-444
>                 URL: https://issues.apache.org/jira/browse/TAJO-444
>             Project: Tajo
>          Issue Type: Bug
>          Components: query master
>            Reporter: Prafulla T
>
> Prepare table like the on mentioned in TAJO-443
> Try following query:
> {noformat}
> tajo> select score from table1 order by score is null;
> ERROR: mismatched input 'is' expecting {<EOF>, EXCEPT, INTERSECT, LIMIT, UNION,
';', ','}
> LINE 1:40 select score from table1 order by score is null
>                                                    ^^
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message