[
https://issues.apache.org/jira/browse/NIFI-6611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Villard resolved NIFI-6611.
----------------------------------
Resolution: Feedback Received
Apache NiFi 1.x is no longer maintained and no new release is planned on the
1.x release line. Marking as resolved as part of a cleanup operation. Please
open a new one with an updated description if this is still relevant for NiFi
2.x.
> 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
> Priority: Minor
> 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.20.10#820010)