Karel Vervaeke created HIVE-4116: ------------------------------------ Summary: Can't use views using map datatype. Key: HIVE-4116 URL: https://issues.apache.org/jira/browse/HIVE-4116 Project: Hive Issue Type: Bug Affects Versions: 0.10.0, 0.8.1 Reporter: Karel Vervaeke
Executing the following {noformat} DROP TABLE IF EXISTS `items`; CREATE TABLE IF NOT EXISTS `items` (id INT, name STRING, info MAP<STRING,STRING>) PARTITIONED BY (ds STRING); DROP VIEW IF EXISTS `priceview`; CREATE VIEW `priceview` AS SELECT `items`.`id`, `items`.info['price'] FROM `items` ; select * from `priceview`; {noformat} Produces the following error: {noformat} karel@tomato:~/tmp$ $HIVE_HOME/bin/hive -f hivebug.sql WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files. Logging initialized using configuration in jar:file:/home/karel/opt/hive-0.10.0-bin/lib/hive-common-0.10.0.jar!/hive-log4j.properties Hive history file=/tmp/karel/hive_job_log_karel_201303051117_945318761.txt SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/karel/opt/hadoop-2.0.0-mr1-cdh4.0.0/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/karel/opt/hive-0.10.0-bin/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. OK Time taken: 5.449 seconds OK Time taken: 0.303 seconds OK Time taken: 0.131 seconds OK Time taken: 0.206 seconds FAILED: SemanticException line 3:22 mismatched input '.' expecting FROM near '`items`' in from clause in definition of VIEW priceview [ SELECT `items`.`id`, `items``items`.`info`info['price'] FROM `default`.`items` ] used as priceview at Line 3:14 {noformat} Unless I'm not using the right syntax, I would expect this simple example to work. I have tried some variations (quotes, no quotes, ...), to no avail. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira