nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bartłomiej Tartanus (Jira) <>
Subject [jira] [Created] (NIFI-6611) Unnecessary column name escaping in create view
Date Tue, 03 Sep 2019 07:37:00 GMT
Bartłomiej Tartanus created NIFI-6611:

             Summary: Unnecessary column name escaping in create view 
                 Key: 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


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)
CREATE TABLE test_table AS SELECT named_struct('all', 123) as s;
CREATE VIEW test_view AS SELECT s.`all` FROM test_table;
3. Run flow, wait for table and view to create;

4. Run query:
SELECT * FROM test_view;
5. Error:
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
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

View raw message