[
https://issues.apache.org/jira/browse/TAJO-666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14075849#comment-14075849
]
Hyunsik Choi edited comment on TAJO-666 at 7/28/14 2:17 AM:
------------------------------------------------------------
Hi [~jihoonson] and [~mhthanh],
Could you improve the default case? I'm concerning with the default case which
specify 4 bytes. It looks very dangerous because we cannot expect how it work
against any or new type. We should throw some exception in the default case,
and then we should implement the code for new type. Otherwise, it would be easy
for us to miss it after some changes of types. Any thought?
{code}
+ case INET6: size += tuple.get(i).asByteArray().length; break;
+ default:
+ size += 4;
+ }
{code}
was (Author: hyunsik):
Hi [~jihoonson] [~mhthanh],
Could you improve the default case? I'm concerning with the default case which
specify 4 bytes. It looks very dangerous because we cannot expect how it work
against any or new type. We should throw some exception in the default case,
and then we should implement the code for new type. Otherwise, it would be easy
for us to miss it after some changes of types. Any thought?
{code}
+ case INET6: size += tuple.get(i).asByteArray().length; break;
+ default:
+ size += 4;
+ }
{code}
> java.nio.BufferOverflowException occurs when the query includes an order by
> clause on a TEXT column
> ---------------------------------------------------------------------------------------------------
>
> Key: TAJO-666
> URL: https://issues.apache.org/jira/browse/TAJO-666
> Project: Tajo
> Issue Type: Bug
> Reporter: Jihoon Son
> Assignee: Mai Hai Thanh
> Attachments: TAJO-666.Mai.140721.0.patch.txt,
> TAJO-666.Mai.140722.0.patch.txt
>
>
> See the title.
> The query and the error log of the query master are as follows.
> The 'method' column type is TEXT.
> {noformat}
> tajo> select method, sum(totaltime) from logs_20130404 group by method order
> by method;
> 2014-03-06 11:26:03,432 ERROR querymaster.QueryUnitAttempt
> (QueryUnitAttempt.java:transition(409)) - FROM xxx.xxx.xxx.xxx >>
> java.nio.BufferOverflowException
> at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:183)
> at java.nio.ByteBuffer.put(ByteBuffer.java:832)
> at
> org.apache.tajo.storage.RowStoreUtil$RowStoreEncoder.toBytes(RowStoreUtil.java:181)
> at
> org.apache.tajo.storage.index.bst.BSTIndex$BSTIndexWriter.writeHeader(BSTIndex.java:168)
> at
> org.apache.tajo.storage.index.bst.BSTIndex$BSTIndexWriter.close(BSTIndex.java:187)
> at org.apache.hadoop.io.IOUtils.cleanup(IOUtils.java:237)
> at
> org.apache.tajo.engine.planner.physical.RangeShuffleFileWriteExec.close(RangeShuffleFileWriteExec.java:123)
> at org.apache.tajo.worker.Task.run(Task.java:385)
> at org.apache.tajo.worker.TaskRunner$1.run(TaskRunner.java:395)
> at java.lang.Thread.run(Thread.java:744)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)