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)