You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Rajkumar Singh (Jira)" <ji...@apache.org> on 2019/10/18 18:34:00 UTC
[jira] [Commented] (HIVE-22353) Hive JDBC Storage Handler: Simple
query fail with " Invalid table alias or column reference"
[ https://issues.apache.org/jira/browse/HIVE-22353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16954896#comment-16954896 ]
Rajkumar Singh commented on HIVE-22353:
---------------------------------------
figured out that hive table schema should be the same as reference hive.sql.table, closing the issue as invalid.
> Hive JDBC Storage Handler: Simple query fail with " Invalid table alias or column reference"
> --------------------------------------------------------------------------------------------
>
> Key: HIVE-22353
> URL: https://issues.apache.org/jira/browse/HIVE-22353
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Reporter: Rajkumar Singh
> Assignee: Rajkumar Singh
> Priority: Major
>
> Steps To Repro:
> {code:java}
> // show create table (Hive)
> CREATE EXTERNAL TABLE `hive_visitors`(
> `col1` bigint COMMENT 'from deserializer',
> `col2` timestamp COMMENT 'from deserializer')
> ROW FORMAT SERDE
> 'org.apache.hive.storage.jdbc.JdbcSerDe'
> STORED BY
> 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> WITH SERDEPROPERTIES (
> 'serialization.format'='1')
> TBLPROPERTIES (
> 'bucketing_version'='2',
> 'hive.sql.database.type'='MYSQL',
> 'hive.sql.dbcp.maxActive'='1',
> 'hive.sql.dbcp.password'='hive',
> 'hive.sql.dbcp.username'='hive',
> 'hive.sql.jdbc.driver'='com.mysql.jdbc.Driver',
> 'hive.sql.jdbc.url'='jdbc:mysql://hostname/test',
> 'hive.sql.table'='visitors',
> 'transient_lastDdlTime'='1554910389')
> // MySql Table
> CREATE TABLE `visitors` (
> `id` bigint(20) unsigned NOT NULL,
> `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
> )
> // Hive Query
> select * from hive_visitors where col2='2018-10-15';
> Error: Error while compiling statement: FAILED: SemanticException [Error 10004]: Line 1:34 Invalid table alias or column reference 'col2': (possible column names are: id, date) (state=42000,code=10004)
> {code}
> col2 is a valid column reference for the hive table, In some old version I was able to run the query referencing the hive column but it broken now.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)