phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PHOENIX-1616) Creating a View with a case sensitive column name does not work
Date Sat, 31 Jan 2015 21:47:34 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Taylor resolved PHOENIX-1616.
-----------------------------------
    Resolution: Fixed

> 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: 4.3, 3.3
>
>         Attachments: PHOENIX-1616.patch, PHOENIX-1616_3.0.patch, PHOENIX-1616_3.0_v2.patch,
PHOENIX-1616_v2.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)

Mime
View raw message