Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
None
-
None
-
None
-
Used docker image to build all the stack environment from here
it use smizy/apache-phoenix:4.14.0-alpine image
Description
I was following the Dynamic Columns section from here
Here is my steps to create table, upsert dummy data and query it
- Create Table
CREATE TABLE EventLog ( eventId BIGINT NOT NULL, eventTime TIME NOT NULL, eventType CHAR(3) CONSTRAINT pk PRIMARY KEY (eventId, eventTime))
- Upsert Dummy Data
UPSERT INTO EventLog (eventId, eventTime, eventType, lastGCTime TIME, usedMemory BIGINT, maxMemory BIGINT) VALUES(1, CURRENT_TIME(), 'abc', CURRENT_TIME(), 512, 1024);
- Do Query
SELECT eventTime, lastGCTime, usedMemory, maxMemory
FROM EventLog(lastGCTime TIME, usedMemory BIGINT, maxMemory BIGINT)
WHERE eventType = 'OOM' AND lastGCTime < eventTime - 1
And Here is the stack trace:
Error: Error -1 (00000) : Error while executing SQL "select eventtime, lastgctime, usedMemory, maxmemory from eventlog(lastGctime time, usedmemory bigint, maxmemory bigint) where eventtype='OOM' and lastgctime < eventtime - 1": Remote driver error: InvalidQualifierBytesException: Invalid number of qualifier bytes. Expected length: 2. Actual: 10 (state=00000,code=-1) org.apache.phoenix.shaded.org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : Error while executing SQL "select eventtime, lastgctime, usedMemory, maxmemory from eventlog(lastGctime time, usedmemory bigint, maxmemory bigint) where eventtype='OOM' and lastgctime < eventtime - 1": Remote driver error: InvalidQualifierBytesException: Invalid number of qualifier bytes. Expected length: 2. Actual: 10 at org.apache.phoenix.shaded.org.apache.calcite.avatica.Helper.createException(Helper.java:54) at org.apache.phoenix.shaded.org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.phoenix.shaded.org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:156) at org.apache.phoenix.shaded.org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:209) at sqlline.Commands.execute(Commands.java:822) at sqlline.Commands.sql(Commands.java:732) at sqlline.SqlLine.dispatch(SqlLine.java:813) at sqlline.SqlLine.begin(SqlLine.java:686) at sqlline.SqlLine.start(SqlLine.java:398) at sqlline.SqlLine.main(SqlLine.java:291) at org.apache.phoenix.queryserver.client.SqllineWrapper.main(SqllineWrapper.java:93) org.apache.phoenix.schema.PTable$QualifierEncodingScheme$InvalidQualifierBytesException: Invalid number of qualifier bytes. Expected length: 2. Actual: 10 at org.apache.phoenix.schema.PTable$QualifierEncodingScheme$3.decode(PTable.java:332) at org.apache.phoenix.filter.MultiEncodedCQKeyValueComparisonFilter$1.visit(MultiEncodedCQKeyValueComparisonFilter.java:182) at org.apache.phoenix.filter.MultiEncodedCQKeyValueComparisonFilter$1.visit(MultiEncodedCQKeyValueComparisonFilter.java:179) at org.apache.phoenix.expression.KeyValueColumnExpression.accept(KeyValueColumnExpression.java:129) at org.apache.phoenix.expression.BaseExpression.acceptChildren(BaseExpression.java:232) at org.apache.phoenix.expression.ComparisonExpression.accept(ComparisonExpression.java:354) at org.apache.phoenix.expression.BaseExpression.acceptChildren(BaseExpression.java:232) at org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:99) at org.apache.phoenix.filter.MultiEncodedCQKeyValueComparisonFilter.initFilter(MultiEncodedCQKeyValueComparisonFilter.java:196) at org.apache.phoenix.filter.MultiEncodedCQKeyValueComparisonFilter.<init>(MultiEncodedCQKeyValueComparisonFilter.java:103) at org.apache.phoenix.compile.WhereCompiler.setScanFilter(WhereCompiler.java:307) at org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:159) at org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:108) at org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:556) at org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:507) at org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:193) at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:153) at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:490) at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:456) at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:302) at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:291) at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:290) at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:283) at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1830) at org.apache.calcite.avatica.jdbc.JdbcMeta.prepareAndExecute(JdbcMeta.java:730) at org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:206) at org.apache.calcite.avatica.remote.Service$PrepareAndExecuteRequest.accept(Service.java:928) at org.apache.calcite.avatica.remote.Service$PrepareAndExecuteRequest.accept(Service.java:880) at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:94) at org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:46) at org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:127) at org.apache.phoenix.shaded.org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.apache.phoenix.shaded.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.apache.phoenix.shaded.org.eclipse.jetty.server.Server.handle(Server.java:499) at org.apache.phoenix.shaded.org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.apache.phoenix.shaded.org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.apache.phoenix.shaded.org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.apache.phoenix.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.apache.phoenix.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745)
But if the eventType = 'OOM' part was removed from query,
the query would work
query like this:
SELECT eventTime, lastGCTime, usedMemory, maxMemory FROM EventLog(lastGCTime TIME, usedMemory BIGINT, maxMemory BIGINT) WHERE lastGCTime < eventTime - 1
Should I try to turn off the column mapping to give it a try?
Any suggestion here, thanks