phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Hacker (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PHOENIX-1469) Binary columns do not work correctly for indexing
Date Tue, 23 Dec 2014 00:57:14 GMT

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

Dave Hacker resolved PHOENIX-1469.
----------------------------------
    Resolution: Fixed

> Binary columns do not work correctly for indexing
> -------------------------------------------------
>
>                 Key: PHOENIX-1469
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1469
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.1
>            Reporter: Jesse Collins
>            Assignee: Dave Hacker
>            Priority: Minor
>             Fix For: 5.0.0, 4.3, 3.3, 4.2.3, 3.2.3
>
>         Attachments: 33.patch
>
>
> I recently added a secondary index to the readonlydb.read_only_auth_session table and
some queries started to fail at runtime with the error below. My index (as checked in) has
the parent_session_id column in an INCLUDE clause, but I found that even if I rebuild the
index without that column I still get the error.
> java.lang.Throwable: ( username: admin@701048957670893.com )
> java.lang.IllegalArgumentException: Unsupported non nullable index type BINARY
>     at org.apache.phoenix.util.IndexUtil.getIndexColumnDataType(IndexUtil.java:104)
>     at org.apache.phoenix.util.IndexUtil.getIndexColumnDataType(IndexUtil.java:80)
>     at org.apache.phoenix.compile.IndexStatementRewriter.visit(IndexStatementRewriter.java:99)
>     at org.apache.phoenix.compile.IndexStatementRewriter.visit(IndexStatementRewriter.java:41)
>     at org.apache.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.java:50)
>     at org.apache.phoenix.parse.ParseNodeRewriter.rewrite(ParseNodeRewriter.java:96)
>     at org.apache.phoenix.compile.IndexStatementRewriter.translate(IndexStatementRewriter.java:74)
>     at org.apache.phoenix.compile.IndexStatementRewriter.translate(IndexStatementRewriter.java:61)
>     at org.apache.phoenix.optimize.QueryOptimizer.getApplicablePlans(QueryOptimizer.java:127)
>     at org.apache.phoenix.optimize.QueryOptimizer.optimize(QueryOptimizer.java:81)
>     at org.apache.phoenix.optimize.QueryOptimizer.optimize(QueryOptimizer.java:67)
>     at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:222)
>     at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:217)
>     at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>     at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:216)
>     at org.apache.phoenix.jdbc.PhoenixPreparedStatement.executeQuery(PhoenixPreparedStatement.java:183)
>     at phoenix.connection.ProtectedPhoenixPreparedStatement.executeQuery(ProtectedPhoenixPreparedStatement.java:61)
>    ...
> Table definition:
> CREATE TABLE IF NOT EXISTS TEST.AUTH_SESSION(
>     RAW_SESSION_ID BINARY(64) NOT NULL,
>     USERS_ID VARCHAR,
>     CREATED_DATE TIME,
>     LAST_MODIFIED_DATE TIME,
>     NUM_SECONDS_VALID INTEGER,
>     USER_TYPE VARCHAR,
>     PARENT_SESSION_ID BINARY(64),
>     SESSION_TYPE VARCHAR,
>     PARENT_SESSION_ID_HEX VARCHAR
>     CONSTRAINT PK PRIMARY KEY (
>         RAW_SESSION_ID
>     )
> )
> Index definition:
> CREATE INDEX IF NOT EXISTS IE4AUTH_SESSION_PARENT 
> ON TEST.AUTH_SESSION (PARENT_SESSION_ID_HEX)
> INCLUDE (SESSION_TYPE)
> SQL:
> select RAW_SESSION_ID,
> CREATED_DATE,
> LAST_MODIFIED_DATE,
> NUM_SECONDS_VALID,
> PARENT_SESSION_ID,
> SESSION_TYPE,
> PARENT_SESSION_ID_HEX
> from TEST.AUTH_SESSION
> where USERS_ID = ?
> and RAW_SESSION_ID != ?



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

Mime
View raw message