Bartłomiej Tartanus created NIFI-6611: -----------------------------------------
Summary: Unnecessary column name escaping in create view Key: NIFI-6611 URL: https://issues.apache.org/jira/browse/NIFI-6611 Project: Apache NiFi Issue Type: Bug Components: Core Framework Affects Versions: 1.9.2 Reporter: Bartłomiej Tartanus Attachments: image-2019-09-03-09-28-56-842.png Creating view with columns inside struct works, but fails when queried. Steps to reproduce in NiFi with Hive: 1. Create flow using GenerateFlowFile and PutHive3QL processor !image-2019-09-03-09-28-56-842.png! 2. Set flow file content in GenerateFlowFile to this query, which creates simple table with structure (this is the key here - the column name is reserved word, but doesn't have to) {code:java} CREATE TABLE test_table AS SELECT named_struct('all', 123) as s; CREATE VIEW test_view AS SELECT s.`all` FROM test_table; {code} 3. Run flow, wait for table and view to create; 4. Run query: {code:java} SELECT * FROM test_view; {code} 5. Error: {code:java} Error while compiling statement: FAILED: SemanticException line 21:51 cannot recognize input near 'all' '' 'FROM' in expression specification in definition of VIEW test_view [ SELECT `test_table`.`s`.``all`` FROM `test_table` ] used as test_view at Line 2:14 {code} As you can see in error message, the column name is escaped twice. Creating this view using Hue works fine. Although I'm not sure if this is NiFi issue - might be Hive driver's issue. -- This message was sent by Atlassian Jira (v8.3.2#803003)