回复:答复: Should I remove this check about compare the last and fetched

2019-04-10 Thread yuzhang
We use UTF-8, but there are some emoji content such as ⚔


| |
yuzhang
|
|
shifengdefan...@163.com
|
签名由网易邮箱大师定制
在2019年4月8日 19:06,Na Zhai 写道:
Hi, yuzhang.

What’s the encoding of the column that you query? The original intention of the 
code that you mentioned is to find out the columns with inconsistent sequence 
before and after encoding.

发送自 Windows 10 版邮件应用


发件人: yuzhang 
发送时间: Tuesday, March 26, 2019 11:27:14 PM
收件人: dev@kylin.apache.org
抄送: dev@kylin.apache.org
主题: Re: Should I remove this check about compare the last and fetched

Sure, here is the code  at SortedIteratorMergerWithLimit.java:130. And the "Not 
sorted! last: XX fetched: XXX" exception may happen when query some 
table contain Chinese value(or messy code).
```

@Override
public E next() {
if (!nextFetched) {
throw new IllegalStateException("Should hasNext() before next()");
}

//TODO: remove this check when validated
if (last != null) {
if (comparator.compare(last, fetched) > 0)
throw new IllegalStateException("Not sorted! last: " + last + " fetched: " + 
fetched);
}

last = fetched;
nextFetched = false;

return fetched;
}

```

[http://mail-online.nosdn.127.net/sm1c0446ade9371d208d1e209c8bc0827f.jpg]
yuzhang

shifengdefan...@163.com

签名由 网易邮箱大师 定制
On 3/26/2019 23:08,elkan1788 
wrote:
I not sure can understand your question cleanly. Can you give more
information about it, just like with a good sample.  Also you can forward
the code what you found and think that is happened!

--
Sent from: http://apache-kylin.74782.x6.nabble.com/


答复: Should I remove this check about compare the last and fetched

2019-04-08 Thread Na Zhai
Hi, yuzhang.

What’s the encoding of the column that you query? The original intention of the 
code that you mentioned is to find out the columns with inconsistent sequence 
before and after encoding.

发送自 Windows 10 版邮件应用


发件人: yuzhang 
发送时间: Tuesday, March 26, 2019 11:27:14 PM
收件人: dev@kylin.apache.org
抄送: dev@kylin.apache.org
主题: Re: Should I remove this check about compare the last and fetched

Sure, here is the code  at SortedIteratorMergerWithLimit.java:130. And the "Not 
sorted! last: XX fetched: XXX" exception may happen when query some 
table contain Chinese value(or messy code).
```

@Override
public E next() {
if (!nextFetched) {
throw new IllegalStateException("Should hasNext() before next()");
}

//TODO: remove this check when validated
if (last != null) {
if (comparator.compare(last, fetched) > 0)
throw new IllegalStateException("Not sorted! last: " + last + " 
fetched: " + fetched);
}

last = fetched;
nextFetched = false;

return fetched;
}

```

[http://mail-online.nosdn.127.net/sm1c0446ade9371d208d1e209c8bc0827f.jpg]
yuzhang

shifengdefan...@163.com

签名由 网易邮箱大师 定制
On 3/26/2019 23:08,elkan1788 
wrote:
I not sure can understand your question cleanly. Can you give more
information about it, just like with a good sample.  Also you can forward
the code what you found and think that is happened!

--
Sent from: http://apache-kylin.74782.x6.nabble.com/


Re: Should I remove this check about compare the last and fetched

2019-03-26 Thread yuzhang
Sure, here is the code  at SortedIteratorMergerWithLimit.java:130. And the "Not 
sorted! last: XX fetched: XXX" exception may happen when query some 
table contain Chinese value(or messy code).
```
@Override
public E next() {
if (!nextFetched) {
throw new IllegalStateException("Should hasNext() before next()");
}

//TODO: remove this check when validated
if (last != null) {
if (comparator.compare(last, fetched) > 0)
throw new IllegalStateException("Not sorted! last: " + last + " fetched: " + 
fetched);
}

last = fetched;
nextFetched = false;

return fetched;
}
```
| |
yuzhang
|
|
shifengdefan...@163.com
|
签名由网易邮箱大师定制
On 3/26/2019 23:08,elkan1788 wrote:
I not sure can understand your question cleanly. Can you give more
information about it, just like with a good sample.  Also you can forward
the code what you found and think that is happened!

--
Sent from: http://apache-kylin.74782.x6.nabble.com/


Re: Should I remove this check about compare the last and fetched

2019-03-26 Thread elkan1788
I not sure can understand your question cleanly. Can you give more
information about it, just like with a good sample.  Also you can forward
the code what you found and think that is happened! 

--
Sent from: http://apache-kylin.74782.x6.nabble.com/


Should I remove this check about compare the last and fetched

2019-03-26 Thread yuzhang
Hi team:
   When we use kylin, some queries over table contain Chinese value will throw 
"Not sorted! last: XX fetched: XXX" exception. 
Then, I found there is an check about compare last ITuple and fetched 
ITuple at SortedIteratorMergerWithLimit:130. But there also have an comment 
said "TODO: remove this check when validated".
So, what's this check's aim in the very first? Should I remove this check?
I'll appreciate if some developers can provide some logic about this code.


Best regards


yuzhang


| |
yuzhang
|
|
shifengdefan...@163.com
|
签名由网易邮箱大师定制