You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Sergey Soldatov (JIRA)" <ji...@apache.org> on 2016/03/03 07:47:18 UTC

[jira] [Created] (PHOENIX-2735) Column reference ambiguous or duplicate names for a valid query

Sergey Soldatov created PHOENIX-2735:
----------------------------------------

             Summary: Column reference ambiguous or duplicate names for a valid query
                 Key: PHOENIX-2735
                 URL: https://issues.apache.org/jira/browse/PHOENIX-2735
             Project: Phoenix
          Issue Type: Bug
            Reporter: Sergey Soldatov


It happens when table contains two columns with the same name and different column family. The sample from stackoverflow
{noformat}
CREATE TABLE "events" (
"uuid" VARCHAR(64) PRIMARY KEY,
"event"."session" VARCHAR(64),
"event"."name" VARCHAR(32),
"event"."date" UNSIGNED_DATE,
"product"."name" VARCHAR(32),
"data"."*" VARCHAR(64)
);
SELECT COUNT(*) FROM "events" AS search WHERE search."event"."name" = 'search'  
AND search."event"."session" NOT IN (SELECT click."event"."session" 
FROM "events" AS click 
WHERE click."event"."session" = 'click');
{noformat}
resolveColumn at FromCompiler$SingleTableColumnResolver receives empty schema and real table name instead of column family. So the column family is completely missing at that place and the exception is thrown since table contains two columns with the name "name".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)