Skip to content
This repository has been archived by the owner on Dec 28, 2017. It is now read-only.

[DAG]Inconsistent result on 'mediumtext' and 'longtext' type comparison #160

Open
Novemser opened this issue Nov 28, 2017 · 0 comments
Open
Labels

Comments

@Novemser
Copy link
Contributor

Novemser commented Nov 28, 2017

Known affected branch:

master
DAGRequestConstruct

SQL:

select A.id_dt from full_data_type_table A join full_data_type_table B on A.id_dt > B.id_dt * 16 where A.tp_mediumtext < B.tp_mediumtext order by (A.id_dt)  limit 20

TiSpark:

+-----+
|id_dt|
+-----+
|    1|
|    2|
|    3|
|    5|
|    6|
|    7|
|    9|
|   10|
|   11|
|   12|
|   13|
|   16|
|   17|
|   18|
|   19|
|   20|
|   23|
|   27|
|   28|
|   30|
+-----+

Spark with JDBC connected to TiDB:

+-----+
|id_dt|
+-----+
|    3|
|    5|
|    6|
|    7|
|    9|
|   10|
|   11|
|   12|
|   13|
|   16|
|   17|
|   17|
|   18|
|   18|
|   19|
|   19|
|   20|
|   20|
|   21|
|   22|
+-----+

TiDB:

+-------+
| id_dt |
+-------+
|     3 |
|     5 |
|     6 |
|     7 |
|     9 |
|    10 |
|    11 |
|    12 |
|    13 |
|    16 |
|    17 |
|    17 |
|    18 |
|    18 |
|    19 |
|    19 |
|    20 |
|    20 |
|    21 |
|    22 |
+-------+

Sample tp_medium column data:

中等的一段文字 fXPKRoPf2ETSF4I7a4eroztWS26ja6HlB8wnwgBByCaUPKCCnoyxp8Y3408mRUTn2NMPY4tf5wnqIbFmDkWEhC0EStMAjGMack24 
中等的一段文字 fXPKRoPf2ETSF4I7a4eroztWS26ja6HlB8wnwgBByCaUPKCCnoyxp8Y3408mRUTn2NMPY4tf5wnqIbFmDkWEhC0EStMAjGMack24 
00JeiB7IVvz7dsZuoxDXXPb6HM0QXS27miQbUOnrMedjmT3LBIKTdrt9J4FXOwzla8MIGV5x49u427ygSCb7gM9X1bsOLg6P0xmp fXPKRoPf2ETSF4I7a4eroztWS26ja6HlB8wnwgBByCaUPKCCnoyxp8Y3408mRUTn2NMPY4tf5wnqIbFmDkWEhC0EStMAjGMack24 
TwSqLRLTDROtK10Dt8fzkzbJ5UNVSoZu91HSaGIYUAGAFPtGAJXRpOxZhzz7WJT3ixzC4um7zjgtyLYiE5m589g2DsT2Ic3ZnKmk fXPKRoPf2ETSF4I7a4eroztWS26ja6HlB8wnwgBByCaUPKCCnoyxp8Y3408mRUTn2NMPY4tf5wnqIbFmDkWEhC0EStMAjGMack24 

Similar error occurs when replace tp_medium with tp_longtext.
Seems a decoding error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants