[
https://issues.apache.org/jira/browse/PHOENIX-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14299701#comment-14299701
]
James Taylor commented on PHOENIX-1616:
---------------------------------------
Or maybe the column names are ok - [~maryannxue] - do the aliases become part
of the column name?
> Creating a View with a case sensitive column name does not work
> ---------------------------------------------------------------
>
> Key: PHOENIX-1616
> URL: https://issues.apache.org/jira/browse/PHOENIX-1616
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 3.0.0, 4.0.0, 5.0.0
> Reporter: Thomas D'Silva
> Assignee: Thomas D'Silva
> Fix For: 3.0.0, 4.0.0, 5.0.0
>
> Attachments: PHOENIX-1616.patch
>
>
> If I create a view that refers to a case sensitive column, the case
> sensitivity is not respected.
> Example
> CREATE TABLE t (\"k\" INTEGER NOT NULL PRIMARY KEY, v1 DATE)
> CREATE VIEW v (v VARCHAR) AS SELECT * FROM t WHERE \"k\" > 5
> "SELECT \"k\" FROM v"
> Throws the following exception
> org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703):
> Undefined column. columnName=K
> at org.apache.phoenix.schema.PTableImpl.getColumn(PTableImpl.java:571)
> at
> org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.resolveColumn(FromCompiler.java:305)
> at
> org.apache.phoenix.compile.ExpressionCompiler.resolveColumn(ExpressionCompiler.java:344)
> at
> org.apache.phoenix.compile.WhereCompiler$WhereExpressionCompiler.resolveColumn(WhereCompiler.java:181)
> at
> org.apache.phoenix.compile.WhereCompiler$WhereExpressionCompiler.visit(WhereCompiler.java:169)
> at
> org.apache.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:1)
> at
> org.apache.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.java:50)
> at
> org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:63)
> at
> org.apache.phoenix.parse.ComparisonParseNode.accept(ComparisonParseNode.java:43)
> at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:139)
> at
> org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
> at
> org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:487)
> at
> org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:447)
> at
> org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:154)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:330)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:1)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:229)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:1)
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)