[
https://issues.apache.org/jira/browse/HIVE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shreepadma Venugopalan updated HIVE-3038:
-----------------------------------------
Summary: Query with order by clause fails during semantic analysis when
ordering column is not referenced in the select list (was: Query with order by
clause fails during semantic analysis unless the column in the order by is
referenced in the select list)
> Query with order by clause fails during semantic analysis when ordering
> column is not referenced in the select list
> -------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-3038
> URL: https://issues.apache.org/jira/browse/HIVE-3038
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Affects Versions: 0.9.0
> Reporter: Shreepadma Venugopalan
>
> Query with order by/sort by clause fails unless ordering/sorting column is
> referenced in the select list. Consider the following example,
> CREATE TABLE serde_regex(
> host STRING,
> identity STRING,
> user STRING,
> time STRING,
> request STRING,
> status STRING,
> size STRING,
> referer STRING,
> agent STRING)
> ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'
> WITH SERDEPROPERTIES (
> "input.regex" = "([^ ]*) ([^ ]*) ([^ ]*) (-|\\[[^\\]]*\\]) ([^
> \"]*|\"[^\"]*\") (-|[0-9]*) (-|[0-9]*)(?: ([^ \"]*|\"[^\"]*\") ([^
> \"]*|\"[^\"]*\"))?"
> )
> STORED AS TEXTFILE;
> select host from serde_regex order by time; <--- fails
> select host, time from serde_regex order by time; <----- OK
> 1st query fails because time is not explicitly referenced in the select list.
> It appears to be a recent regression.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira