Commit Graph

8987 Commits

Author SHA1 Message Date
94cea0ea6d [fix](Nereids) Disable preagg when there is DELETE_SIGN filter (#17157)
1. disable preAgg when there is delete sign when binding relation
2. keep the preAgg status in SelectMaterializeIndex rule
2023-02-28 19:59:05 +08:00
1ced23018e [improvement](test) modify test_clean_label test to support run multiple time (#17223)
use uuid in load label to avoid Label already used issue on the second run
Only for master, already fixed in branch-1.2-lts
2023-02-28 19:24:55 +08:00
459874be50 Revert "[Bug](log) add some log to find out bug (#16518)" (#17178)
This reverts commit d1c6b8114053e8c754c979d8d3fbf5c880d361d2.
2023-02-28 19:23:12 +08:00
838107b8e8 [enhencement](Nereids) support inverted index scan (#17197) 2023-02-28 19:07:49 +08:00
e34e72dd51 [feature](Nereids) show cost and execution time for each plan (#17123)
1. Show cost in optimized plan
2. show plan time schedule time and so on in profile
2023-02-28 18:59:57 +08:00
34813bae13 [improvement](meta) make database,table,column names to support unicode (replace PR #13467 with this) (#14531)
Make database, table, column and other names support unicode by changing LABEL_REGEX COMMON_NAME_REGIEX COMMON_TABLE_NAME_REGEX COLUMN_NAME_REGEX regular expressions in class FeNameFormat.

P.S. @SharpRay has transfered PR #13467 to me, and I‘m responsible for the task now. There will be some modifications during the review period, so I create a new PR and the original #13467 could be closed. Thanks.
2023-02-28 18:50:36 +08:00
dd4bd3f360 [enhancement](Nereids) consider string literal coercion when search function signature (#17175) 2023-02-28 17:59:52 +08:00
727853017c [regression-test](Nereids) add agg function, tvf, generator, window function test cases (#16824)
add agg_function, tvf, generator, window_function test for nereids and add more feature to gen.py
2023-02-28 17:51:39 +08:00
1dd2a41e38 [vectorized](bug) fix window function can't handle first row of beyond (#17084)
Issue Number: close #16845
2023-02-28 17:30:23 +08:00
79e49dad93 [fix](brpc) solve bthread hang problem (#17206) 2023-02-28 17:10:05 +08:00
f8e20ceca2 [Improvement](jsonb) add suport for JSONB type for arrow (#16869)
add suport for JSONB type for arrow, which is used by doris spark/flink connector.
2023-02-28 17:04:13 +08:00
9db56201a6 [refactor](Nereids) Refactor rewrite framework to speed up plan (#17126)
This pr refactor the rewrite framework from memo to plan tree, and speed up the analyze/rewrite stage.

Changes:
- abandoned memo in the analysis/rewrite stage, so that we can skip some actions, like new GroupExpression, distinct GroupExpression in the memo(high cost), update children to GroupPlan
- change the most of rules to static rule, so that we can skip initialize lots of rules in Analyzer/Rewriter at every query. but some rules need context, like visitor rule, create rule at the runtime make it is easy to use, so make `custom` rule can help us to create it.
- remove the `logger` field in the Job, Job are generated in large quantities at runtime, we don't need to use logger so save huge time to initialize logger.
- skip some rule as far as possible, e.g. `SelectMaterializedIndexWithoutAggregate`, skip select mv if the table not exist rullup.
- add some caches for frequent operation, like get Job.getDisableRules, Plan.getUnboundExpression
- new bottom up rewrite rule, it can keep traverse multiple new plan which return by rules, this feature depends on `Plan.mutableState`, it is necessary to add this variable field for plan. if the plan is fully immutable, we must use withXxx to renew the plan and set the state for it, this take more runtime overhead and developing workload. another reason is we need multiple mutable state, e.g. whether is applied the rule,  whether this plan is manage by the rewrite framework. the good side of mutable state is efficient, but I suggest we don't direct use mutable state in the rule as far as possible, if we need use it, please wrap the mutable state in the framework to update and release it correctly. a good example is `AppliedAwareRuleCondition`, it can update and get the state: whether this plan is applied to a rule before.
- merge some rules, invoke multiple rules in one traverse
- refactor the `EliminateUnnecessaryProject` by CustomRewritor, fix the problem which eliminate some Project which decided the query output order, the case is limit(project), sort(project).

TODO: add trace for new rewrite framework

benchmark:

legacy optimizer:
```
+-----------+---------------+---------------+---------------+
|  SQL ID   |      avg      |      min      |      max      |
+-----------+---------------+---------------+---------------+
|  SQL 1    |       1.39 ms |          0 ms |          9 ms |
|  SQL 2    |       1.38 ms |          0 ms |         10 ms |
|  SQL 3    |       2.05 ms |          1 ms |         18 ms |
|  SQL 4    |       0.89 ms |          0 ms |          9 ms |
|  SQL 5    |       1.74 ms |          1 ms |         11 ms |
|  SQL 6    |       2.00 ms |          1 ms |         13 ms |
|  SQL 7    |       1.83 ms |          1 ms |         15 ms |
|  SQL 8    |       0.92 ms |          0 ms |          7 ms |
|  SQL 9    |       2.60 ms |          1 ms |         19 ms |
|  SQL 10   |       3.54 ms |          2 ms |         28 ms |
|  SQL 11   |       3.04 ms |          1 ms |         18 ms |
|  SQL 12   |       3.26 ms |          2 ms |         16 ms |
|  SQL 13   |       1.10 ms |          0 ms |         10 ms |
|  SQL 14   |       2.90 ms |          1 ms |         13 ms |
|  SQL 15   |       1.18 ms |          0 ms |          9 ms |
|  SQL 16   |       1.05 ms |          0 ms |         13 ms |
|  SQL 17   |       1.03 ms |          0 ms |          7 ms |
|  SQL 18   |       0.94 ms |          0 ms |          7 ms |
|  SQL 19   |       1.47 ms |          0 ms |         13 ms |
|  SQL 20   |       0.47 ms |          0 ms |          4 ms |
|  SQL 21   |       0.54 ms |          0 ms |          5 ms |
|  SQL 22   |       3.34 ms |          1 ms |         19 ms |
|  SQL 23   |       7.97 ms |          4 ms |         44 ms |
|  SQL 24   |      11.11 ms |          7 ms |         28 ms |
|  SQL 25   |       0.98 ms |          0 ms |          8 ms |
|  SQL 26   |       0.83 ms |          0 ms |          7 ms |
|  SQL 27   |       0.93 ms |          0 ms |         16 ms |
|  SQL 28   |       2.19 ms |          1 ms |         18 ms |
|  SQL 29   |       3.23 ms |          1 ms |         20 ms |
|  SQL 30   |      59.99 ms |         51 ms |         81 ms |
|  SQL 31   |       2.65 ms |          1 ms |         18 ms |
|  SQL 32   |       2.47 ms |          1 ms |         17 ms |
|  SQL 33   |       2.30 ms |          1 ms |         16 ms |
|  SQL 34   |       0.66 ms |          0 ms |          8 ms |
|  SQL 35   |       0.63 ms |          0 ms |          6 ms |
|  SQL 36   |       2.25 ms |          1 ms |         15 ms |
|  SQL 37   |       5.97 ms |          3 ms |         20 ms |
|  SQL 38   |       5.73 ms |          3 ms |         21 ms |
|  SQL 39   |       6.32 ms |          4 ms |         23 ms |
|  SQL 40   |       8.61 ms |          5 ms |         35 ms |
|  SQL 41   |       6.29 ms |          4 ms |         28 ms |
|  SQL 42   |       6.04 ms |          4 ms |         15 ms |
|  SQL 43   |       5.81 ms |          3 ms |         16 ms |
+-----------+---------------+---------------+---------------+
| TOTAL AVG |       4.22 ms |       2.47 ms |      17.05 ms |
| TOTAL SUM |     181.62 ms |        106 ms |        733 ms |
+-----------+---------------+---------------+---------------+
```

nereids with memo rewrite framework(old):
```
+-----------+---------------+---------------+---------------+
|  SQL ID   |      avg      |      min      |      max      |
+-----------+---------------+---------------+---------------+
|  SQL 1    |       3.61 ms |          1 ms |         20 ms |
|  SQL 2    |       3.47 ms |          2 ms |         16 ms |
|  SQL 3    |       3.27 ms |          1 ms |         18 ms |
|  SQL 4    |       2.23 ms |          1 ms |         12 ms |
|  SQL 5    |       3.60 ms |          1 ms |         20 ms |
|  SQL 6    |       2.73 ms |          1 ms |         17 ms |
|  SQL 7    |       3.04 ms |          1 ms |         23 ms |
|  SQL 8    |       3.53 ms |          2 ms |         20 ms |
|  SQL 9    |       3.74 ms |          2 ms |         22 ms |
|  SQL 10   |       3.66 ms |          2 ms |         18 ms |
|  SQL 11   |       3.93 ms |          2 ms |         15 ms |
|  SQL 12   |       4.85 ms |          2 ms |         27 ms |
|  SQL 13   |       4.41 ms |          2 ms |         28 ms |
|  SQL 14   |       5.16 ms |          2 ms |         41 ms |
|  SQL 15   |       4.33 ms |          2 ms |         33 ms |
|  SQL 16   |       4.94 ms |          2 ms |         51 ms |
|  SQL 17   |       3.27 ms |          1 ms |         25 ms |
|  SQL 18   |       2.78 ms |          1 ms |         22 ms |
|  SQL 19   |       3.51 ms |          1 ms |         42 ms |
|  SQL 20   |       1.84 ms |          1 ms |         13 ms |
|  SQL 21   |       3.47 ms |          1 ms |         66 ms |
|  SQL 22   |       5.21 ms |          2 ms |         29 ms |
|  SQL 23   |       5.55 ms |          3 ms |         25 ms |
|  SQL 24   |       4.21 ms |          2 ms |         28 ms |
|  SQL 25   |       3.47 ms |          1 ms |         23 ms |
|  SQL 26   |       3.03 ms |          2 ms |         21 ms |
|  SQL 27   |       3.07 ms |          1 ms |         17 ms |
|  SQL 28   |       4.51 ms |          3 ms |         22 ms |
|  SQL 29   |       4.97 ms |          3 ms |         21 ms |
|  SQL 30   |      11.95 ms |          8 ms |         33 ms |
|  SQL 31   |       3.92 ms |          2 ms |         23 ms |
|  SQL 32   |       3.74 ms |          2 ms |         15 ms |
|  SQL 33   |       3.62 ms |          2 ms |         22 ms |
|  SQL 34   |       4.60 ms |          1 ms |         55 ms |
|  SQL 35   |       3.47 ms |          2 ms |         25 ms |
|  SQL 36   |       3.34 ms |          2 ms |         18 ms |
|  SQL 37   |       4.77 ms |          2 ms |         23 ms |
|  SQL 38   |       4.44 ms |          2 ms |         39 ms |
|  SQL 39   |       4.52 ms |          2 ms |         23 ms |
|  SQL 40   |       5.50 ms |          3 ms |         30 ms |
|  SQL 41   |       5.01 ms |          2 ms |         24 ms |
|  SQL 42   |       4.32 ms |          2 ms |         24 ms |
|  SQL 43   |       4.29 ms |          2 ms |         42 ms |
+-----------+---------------+---------------+---------------+
| TOTAL AVG |       4.11 ms |       1.91 ms |      26.30 ms |
| TOTAL SUM |     176.88 ms |         82 ms |       1131 ms |
+-----------+---------------+---------------+---------------+
```

nereids with plan tree rewrite framework(new):
```
+-----------+---------------+---------------+---------------+
|  SQL ID   |      avg      |      min      |      max      |
+-----------+---------------+---------------+---------------+
|  SQL 1    |       3.21 ms |          1 ms |         18 ms |
|  SQL 2    |       3.99 ms |          1 ms |         76 ms |
|  SQL 3    |       2.93 ms |          1 ms |         21 ms |
|  SQL 4    |       2.13 ms |          1 ms |         21 ms |
|  SQL 5    |       2.43 ms |          1 ms |         30 ms |
|  SQL 6    |       2.08 ms |          1 ms |         11 ms |
|  SQL 7    |       2.03 ms |          1 ms |         11 ms |
|  SQL 8    |       2.27 ms |          1 ms |         22 ms |
|  SQL 9    |       2.42 ms |          1 ms |         16 ms |
|  SQL 10   |       2.65 ms |          1 ms |         14 ms |
|  SQL 11   |       2.78 ms |          1 ms |         14 ms |
|  SQL 12   |       3.09 ms |          1 ms |         19 ms |
|  SQL 13   |       2.33 ms |          1 ms |         13 ms |
|  SQL 14   |       2.66 ms |          1 ms |         16 ms |
|  SQL 15   |       2.34 ms |          1 ms |         15 ms |
|  SQL 16   |       2.04 ms |          1 ms |         30 ms |
|  SQL 17   |       2.09 ms |          1 ms |         17 ms |
|  SQL 18   |       1.87 ms |          1 ms |         15 ms |
|  SQL 19   |       2.21 ms |          1 ms |         50 ms |
|  SQL 20   |       1.32 ms |          0 ms |         12 ms |
|  SQL 21   |       1.63 ms |          1 ms |         11 ms |
|  SQL 22   |       2.75 ms |          1 ms |         30 ms |
|  SQL 23   |       3.44 ms |          2 ms |         17 ms |
|  SQL 24   |       2.01 ms |          1 ms |         14 ms |
|  SQL 25   |       1.58 ms |          1 ms |         11 ms |
|  SQL 26   |       1.53 ms |          0 ms |         13 ms |
|  SQL 27   |       1.62 ms |          1 ms |         12 ms |
|  SQL 28   |       2.90 ms |          1 ms |         21 ms |
|  SQL 29   |       3.04 ms |          2 ms |         17 ms |
|  SQL 30   |      10.54 ms |          7 ms |         49 ms |
|  SQL 31   |       2.61 ms |          1 ms |         21 ms |
|  SQL 32   |       2.42 ms |          1 ms |         14 ms |
|  SQL 33   |       2.13 ms |          1 ms |         14 ms |
|  SQL 34   |       1.69 ms |          1 ms |         14 ms |
|  SQL 35   |       1.87 ms |          1 ms |         15 ms |
|  SQL 36   |       2.37 ms |          1 ms |         21 ms |
|  SQL 37   |       3.06 ms |          1 ms |         15 ms |
|  SQL 38   |       4.09 ms |          1 ms |         31 ms |
|  SQL 39   |       5.81 ms |          2 ms |         43 ms |
|  SQL 40   |       4.55 ms |          2 ms |         34 ms |
|  SQL 41   |       3.49 ms |          1 ms |         20 ms |
|  SQL 42   |       2.75 ms |          1 ms |         26 ms |
|  SQL 43   |       2.81 ms |          1 ms |         14 ms |
+-----------+---------------+---------------+---------------+
| TOTAL AVG |       2.78 ms |       1.19 ms |      21.35 ms |
| TOTAL SUM |     119.56 ms |         51 ms |        918 ms |
+-----------+---------------+---------------+---------------+
```
2023-02-28 16:02:09 +08:00
a1db5c6f52 [fix](vec) crash caused by not-implemented function in ColumnFixedLengthObject (#17215) 2023-02-28 15:27:06 +08:00
37551a0163 [enhancement](Nereids) implement to legacy literal for datetimev2 literal (#17177) 2023-02-28 14:51:38 +08:00
3e40467ce6 [Bug](vec) Fix chinese pinyin order by (#17152)
bug: some chinese word not sort by pinyin in GBK coding

CREATE TABLE `test_convert` (
                 `a` varchar(100) NULL
             ) ENGINE=OLAP
               DUPLICATE KEY(`a`)
               DISTRIBUTED BY HASH(`a`) BUCKETS 3
               PROPERTIES (
               "replication_allocation" = "tag.location.default: 1"
               );
insert into test_convert values("b"), ("a"), ("c"), ("睿"), ("多"), ("丝");
Query OK, 6 rows affected (0.03 sec)
{'label':'insert_ca73a6acc2194d5b_888218a3949355a6', 'status':'VISIBLE', 'txnId':'18068'}
mysql [test]>select * from test_convert;
+------+
| a    |
+------+
| a    |
| c    |
| 丝   |
| b    |
| 多   |
| 睿   |
+------+
6 rows in set (0.01 sec)
mysql [test]>select * from test_convert order by convert(a using gbk);          
+------+
| a    |
+------+
| a    |
| b    |
| c    |
| 多   |
| 丝   |
| 睿   |
+------+
6 rows in set (0.01 sec)
2023-02-28 14:29:56 +08:00
bf5037d6d5 [fix](OrcReader) typo in anaylize null values (#17156)
typographical error in analyzing null values for OrcReader.
2023-02-28 14:29:13 +08:00
598038e674 [improvement](parquet-reader)support parquet data page v2 (#17054)
Support parquet data page v2
Now the parquet data on AWS glue use data page v2, but we didn't support before.
2023-02-28 14:23:45 +08:00
89542b3e50 [test](test_multi_partition) add multi partition by datetime test (#17068)
add multi partition by datetime test , This feature was created by @catpineapple
2023-02-28 12:10:24 +08:00
4d8b310de0 [fix](struct-type) fix struct subtype support (#17081)
1. Make sure all sub types which STRUCT supported work correctly;
2. remove unused variable `_need_validate_data`;
3. lazy init min or max decimal to support nested DecimalV2 column validate;

Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2023-02-28 11:37:07 +08:00
1771d1e5e7 [fix](value-range) fix the value range of non-nullable column contains null causes query short key index error. (#16943)
* [fix](value-range) fix the value range of non-nullable column contains null causes query short key index error.
2023-02-28 11:15:32 +08:00
8141a1f0c5 [feature](cooldown)get tablet return cooldown conf (#17074)
* get tablet return cooldown conf

* get tablet return cooldown conf
2023-02-28 11:14:11 +08:00
26a46d8c3f [fix](cooldown) Handle full clone with cooldowned rowsets (#17069) 2023-02-28 11:04:01 +08:00
17c8123371 [test](regression) add some regression cases on constant evaluation. (#16599) 2023-02-28 10:57:37 +08:00
da2e9f4179 [improvement](test)Add nereids p0 pipeline trigger not required (#17193) 2023-02-28 10:51:54 +08:00
b0de8d1925 [doc][community]correct the number of committers (#16905) 2023-02-28 10:48:06 +08:00
00723e36cf [enhancement](merge-on-write) add delete bitmap correctness check for single load (#17147)
For Unique Key MoW table, if there are duplicate keys in one single load job and there's multiple segments, we need to calculate delete bitmap to mark these duplicate keys deleted.
Add a check here to detect any bugs that might cause duplicate keys.
2023-02-28 10:06:36 +08:00
049ecccc57 [feature-wip](BE http)Support BE http service using brpc (#16123)
Now, streamload is not supported.
2023-02-28 09:59:29 +08:00
76e539dbda [Improvement](multi catalog)(nereids)Support JDBC external table for new planner. (#17063)
Support JDBC external table for Nereids planner. JDBC table is another type of table, like olap table, hms table and so on.
2023-02-28 09:43:04 +08:00
bf9997ae3d [fix](Nereids) date/datetime foor and ceil should always nullable (#17188) 2023-02-28 09:37:10 +08:00
e0cd8599d2 [fix](delete) fix delete from bug which can get wrong result (#17146)
理论上,如果是两次独立的删除,比如delete from table where a=1; delete from table where a=2;其实这个地方应该可以使用的,但是目前的代码,是把所有不同版本的delete predicates和不同列的delete predicates都放到一起了,失去了版本信息、失去了谓词间可能是and的关系,统一弱化成了delete predicates都是独立的,有一个delete predicates满足条件,就把page都去掉。
这个pr的修改方式,就是在当前代码的基础上,当只有一个delete predicate的时候才能保证后续淘汰page的正确性,所以这里一律加了 == 1的判断才传递delete predicates。
如果要把不同版本的delete predicates和不同列的delete predicates作为完整和严谨的逻辑去判断page,需要修改的设计就有点多了,目前的方案算是一种优先解决bug的思路,后续可以进一步把delete predicates这块加速zone判断进行page淘汰的逻辑完善,提高delete predicates使用的场景。
2023-02-28 09:20:10 +08:00
b51ce415e7 [Feature](load) Add submitter and comments to load job (#16878)
* [Feature](load) Add submitter and comments to load job
2023-02-28 09:06:19 +08:00
dd1bd6d8f1 [Fix](multi catalog)Support hive default partition. (#17179)
Hive store all the data without partition columns to a default partition named __HIVE_DEFAULT_PARTITION__.
Doris will fail to get the this partition when the partition column type is INT or something else that 
__HIVE_DEFAULT_PARTITION__ couldn't convert to. 
This pr is to support hive default partition, set the column value to NULL for the missing partition columns.
2023-02-28 00:08:29 +08:00
d3a6cab716 [Fix](MySQLLoad) Fix load a big local file bug since bytebuffer from mysql packet using the same byte array (#16901)
Loading a big local file will cause `INTERNAL_ERROR]too many filtered rows` issue since the bytebuffer from mysql client always use the same byte array. 

And the later bytes will overwrite the previous one and make wrong bytes order among the network.

Copy the byte array and then fill it into network.
2023-02-28 00:06:44 +08:00
84413f33b8 [enhancement](merge-on-write) add skip_delete_bitmap session variable for debug purpose (#17127) 2023-02-27 23:31:28 +08:00
e8de07a6a5 [feature](cooldown) Forbid storage policy for MoW tables (#17148)
* disable setting storage policy on MoW table

* fix error in regression test

* make the name of test table unique

* use Strings.isNullOrEmpty to replace equals

* fix error in if statement
2023-02-27 18:42:31 +08:00
c807596c51 [Docs](docs) Modify plugin documents (#17161)
* modify plugin docs

* add qe_slow_log_ms description

* add version describtion
2023-02-27 18:42:02 +08:00
0db58800d3 [fix](stmt-forward) fix result missing (#17173) 2023-02-27 18:01:43 +08:00
d5b1d3403f [fix](merge-on-write) fix that the version of delete bitmap is incorrect when calculate delete bitmap between segments (#17095)
Different version numbers are used to calculate the delete bitmap between segments and rowsets, resulting in the failure of the last update of the delete bitmap.
2023-02-27 17:17:25 +08:00
cec3d19dd2 [fix](regression) drop table before and after test for streamLoad_action case (#17164) 2023-02-27 17:14:49 +08:00
29bf31c138 [chore](thirdparty) Show progress bar when downloading dependencies (#16736) 2023-02-27 15:21:22 +08:00
95837b7958 [Enhancement](ES): Support mapping es date format and replace simple json with jackson (#16806)
* Support mapping es date format, default/yyyy-MM-dd HH:mm:ss/yyyy-MM-dd/epoch_millis

* Replace simple json with jackson, resolve column order random problem

* Add es array doc version
2023-02-27 14:47:21 +08:00
Pxl
b06f3da96c [Bug] fix not close when pipeline context prepare failed (#17061) 2023-02-27 14:24:39 +08:00
Pxl
f26f0a1059 [Regression Test] modify expectRelativeError from 1e-10 to 1e-8 (#17162) 2023-02-27 14:23:28 +08:00
c0360f80bb [enhancement](aggregate-function) enhance aggregate funtion collect and add group_array aliases (#15339)
Enhance aggregate function `collect_set` and `collect_list` to support optional `max_size` param,
which enables to limit the number of elements in result array.
2023-02-27 14:22:30 +08:00
Pxl
0723e55f76 [Bug](build) fix compile fail on unused value #17165
error: variable 'nullcount' set but not used [-Werror,-Wunused-but-set-variable]
int nullcount = 0;
2023-02-27 14:19:44 +08:00
2626995fc1 [Doc](Load)Add mysql load document (#16483)
* Add doc

* 1

* doc2

* review again

* fix comment

* fix comment

* format

* add recommand dir

* cleint --local-infile

* add streaming_load_max_mb
2023-02-27 13:25:34 +08:00
26ccb6ba5a [feature-wip](MTMV) Add some metrics for MTMV (#16913)
Demo:

```
# HELP doris_fe_mtmv_job Total job number of mtmv.
# TYPE doris_fe_mtmv_job gauge
doris_fe_mtmv_job{type="TOTAL-JOB"} 1
doris_fe_mtmv_job{type="ACTIVE-JOB"} 1
# HELP doris_fe_mtmv_task Running task number of mtmv.
# TYPE doris_fe_mtmv_task gauge
doris_fe_mtmv_task{type="RUNNING-TASK"} 0
doris_fe_mtmv_task{type="PENDING-TASK"} 0
doris_fe_mtmv_task{type="FAILED-TASK"} 0
doris_fe_mtmv_task{type="TOTAL-TASK"} 1
```
2023-02-27 11:27:23 +08:00
33acaa067b [refactor](mempool) remove mempool parameter from key decoder methods (#17137)
decode method is only used for big int and other decode method is only used in unit test.

I remove the useless method and we can remove mempool parameter from decode method.
---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-02-27 11:16:14 +08:00
aab8dad191 [fix](sort) fix bug of sort (#17151)
The logic of topn and full sort is wrong when there are both offsets and limits, the offset is not considered when doing the max heap optimization, which will lead to wrong result.
2023-02-27 10:55:12 +08:00
29dc08fc45 [Optimize](simd json reader) Cached search results for previous row (keyed as index in JSON object) - used as a hint. (#17124)
* [Optimize](simd json reader) Cached search results for previous row (keyed as index in JSON object) - used as a hint.

`_simdjson_set_column_value` could become a hot spot while parsing json in simdjson mode,
introduce `_prev_positions` to cache results for previous row (keyed as index in JSON object) due to the json name field order,
should be quite the same between each lines

* fix case
2023-02-27 10:39:22 +08:00