impala-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Salmon (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IMPALA-5239) Unable to create view when referencing field with same name at parent level and in n
Date Thu, 20 Apr 2017 23:32:04 GMT
Nathan Salmon created IMPALA-5239:
-------------------------------------

             Summary: Unable to create view when referencing field with same name at parent
level and in n
                 Key: IMPALA-5239
                 URL: https://issues.apache.org/jira/browse/IMPALA-5239
             Project: IMPALA
          Issue Type: Bug
    Affects Versions: Impala 2.6.0
            Reporter: Nathan Salmon
         Attachments: test_ambiguous.sql

If a column name at the top level is the same as the name of a member of a struct in an array,
a "Column/field reference is ambiguous" error is encountered when trying to create a view
with both in scope.

DDL attached.  See output below:

Server version: impalad version 2.6.0-cdh5.8.2 RELEASE (build f25aa5b2bcdabf1eb4233747a7b04a067059ee3b)
Query: use default
Query: drop table if exists test_ambiguous
Query: create external table test_ambiguous(
    columnname string,
    structured_column array<struct<
        columnname: string>>,
    anothercolumn string
)

Fetched 0 row(s) in 0.12s
Query: drop view if exists test_ambiguous_view
Query: create view test_ambiguous_view as select
    columnname,
    structured_column.item.columnname as structured_columnname
from
    test_ambiguous,
    test_ambiguous.structured_column
ERROR: AnalysisException: Column/field reference is ambiguous: 'columnname'

Could not execute command: create view test_ambiguous_view as select
    columnname,
    structured_column.item.columnname as structured_columnname
from
    test_ambiguous,
    test_ambiguous.structured_column




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message