Commit Graph

18548 Commits

Author SHA1 Message Date
cadbbdd2c0 [fix](config) for compatibility issue of log dir config (#34734)
* [fix](config) for compatibility issue of log dir config

* 1
2024-05-12 09:44:50 +08:00
20e2d2e2f8 [Fix](executor)Fix workload thread start failed when follower convert to master 2024-05-12 09:30:14 +08:00
11360b27a2 [fix](catalog) fix potential catalog cache dead lock #34609 (#34614)
bp #34609
2024-05-11 18:06:56 +08:00
e23a89f0da fix compile error 2024-05-11 15:36:06 +08:00
14d0433a76 [improve](path gc) Execute path gc interval adaptive to disk size (#34538) 2024-05-11 15:04:35 +08:00
e417a5cc36 [fix](replication_allocation) fix two problems for force_olap_table_replication_allocation #34554 2024-05-11 15:04:35 +08:00
9915862bf7 [opt](nereids)estimate rowcount for is-null filter when column stats are not available (#34519)
* estimate rowcount for is-null filter when column stats are not available
2024-05-11 15:04:35 +08:00
c742a327e6 [Fix](Planner) add date/month/year add function fe constant fold with dateV2/dateTimeV2 (#34483)
Problem and Cause:
In original planner, date_add function would choose different data type of datetime or datev2. Which when original planner choose datev2 as constant date type. Fe could not folding date_add function because missing of function signature of folding constant date_add(datev2, int)

Solved:
Add corresponding function signatures of date_add/months_add/years_add in original planner
2024-05-11 15:04:35 +08:00
958f1a2d2d [enhance](mtmv) add baseTablesOneLevel for MTMVRelation and MTMVRelationManager (#34593)
baseTables in MTMVRelation  stores all baseTables in the nested materialized view,
now adding baseTablesOneLevel to only store the baseTables at the current level.
2024-05-11 15:04:35 +08:00
719e50f353 [fix](json function) fix failed when json_exists_path use not null input (#34289) 2024-05-11 15:04:35 +08:00
1dcf8a470e [fix](Nereids): fix choose id when there is enforcer in group (#34573) 2024-05-11 15:04:35 +08:00
Pxl
1ff4dc8f85 [Bug](runtime-filter) fix coredump won change_null_to_true when argument column is not null… (#34602)
fix coredump won change_null_to_true when argument column is not nullable
2024-05-11 15:04:35 +08:00
373de3e49d [fix](regression test) fix unstable case auto bucket test (#34635) 2024-05-11 15:04:35 +08:00
ca1fd460b9 [fix](keyword) let some keyword non-reserved (#34613) (#34701)
pick from master #34613
commit id 8ba5748905fb90cce30176303705be29db08d3ea

let below keyword as non-reserved
- CONSTRAINTS
- IPV4
- IPV6
- KW_MATCH_ANY
- KW_MATCH_ALL
- KW_MATCH_PHRASE
- KW_MATCH_PHRASE_PREFIX
- KW_MATCH_REGEXP
- KW_MATCH_PHRASE_EDGE
- KW_MATCH_ELEMENT_EQ
- KW_MATCH_ELEMENT_LT
- KW_MATCH_ELEMENT_GT
- KW_MATCH_ELEMENT_LE
- KW_MATCH_ELEMENT_GE
- VARIANT
2024-05-11 15:01:19 +08:00
659f7ef2af [refactor](Nereids)refactor runtime filter generator (#34275) (#34696)
this pr revert the modification on clucene introduced by pr #34682
2024-05-11 12:04:41 +08:00
2392477f76 [test](shuffle) test insert row count when rows filtered by ExchangeNode (#34657) 2024-05-11 11:47:49 +08:00
8c237e82a3 [Bug](exec) fix intersections/differences bug (#34675) 2024-05-11 11:45:31 +08:00
58c19e33b3 [fix](round) Fix incorrect decimal scale inference in round functions (#34471)
* FIX NEEDED

* FORMAT

* FORMAT

* FIX TEST
2024-05-11 11:42:12 +08:00
0a79c547ff [Refactor](Sink) Remove is_append mode in table sink (#34684)
Remove the is_append mode from the sink component due to the following reasons:
1. The performance improvement from this mode is relatively minor, approximately 10%, as demonstrated in previous benchmarks.
2. The mode complicates maintenance. It requires a separate data writing path to avoid copying, which increases complexity and poses a risk of potential data loss.

I've already test the compability with previous version
2024-05-11 11:20:10 +08:00
7ba66c5890 [branch-2.1](routine-load) do not schedule task when there is no data (#34654) 2024-05-11 11:01:18 +08:00
dd1b54cf62 [pick](nereids)Runtime filter pushdown refactor for branch-2.1 (#34682)
* [refactor](Nereids)refactor runtime filter generator (#34275)

1. unify the process of generating rf for hash join and for nested loop join
2. fix some bugs in generating rf
3. remove some duplicated check

(cherry picked from commit 07267faac0d9c6ef3bb1fd4ee101b4c761c8a2f2)

* [refactor](nereids) do not deny a runtime filter by removing an entry in aliasMap (#34559)

in current version, there are 2 approaches to verify whether a join condition can be used to generate a runtime filter, they are
1. remove the output slot from aliasMap
2. pushDownVisitor.visit(...) return false
the 1st approach has some drawbacks, we prefer to the 2ed approach.
In this pr, all the cases are handled by the 2ed approach, and remove the related code for the 1st approach.

(cherry picked from commit a29082bf31e66efa2df193b38347e610f2bf7464)

* rebase
2024-05-11 09:44:24 +08:00
e38801968d [Fix](functions) Fix bug in makedate and str_to_date functions 2024-05-10 22:14:25 +08:00
d5d6c7f8a4 [opt](nereids) optimize str-like-col range filter estimation (#34542)
we have an order reserved mappping from string to double.
for string column A, we have double values for A.min and A.max.
when estimating A<"abc", A.min/max could be used to judge whether 'abc' is between A.min and A.max, but it cannot be used to do range estimation. suppose "abc" is mapped to double x. if we compute selectivity by formula "sel = (x-A.min)/(A.max-A.min)", we are likely to obtain extreme values.
2024-05-10 22:14:00 +08:00
Pxl
e2ea54c0a7 [Improvement](sink) remove unused check on string's write_column_to_mysql (#34491)
remove unused check on string's write_column_to_mysql
2024-05-10 22:13:05 +08:00
ec34bc0386 [bug](config) Fix modifying label_num_threshold does not take effect (#34575) 2024-05-10 22:12:17 +08:00
aa684d85d7 [Bug](Variant) fix rapidjson::Allocator may cause mem allocate issue when build with DENABLE_CLANG_COVERAGE (#34150) 2024-05-10 22:12:00 +08:00
296c343179 [improve](shcema change)fix alter table faild when modify multiple columns with column changed positions (#34244) 2024-05-10 22:11:45 +08:00
845732b440 [WIP](test) remove enable_nereids_planner in regression cases (part 3) (#34558)
previous PR:
part 1: #34417
part 2: #34490
2024-05-10 22:11:01 +08:00
9a94681b29 [refactor](type) AggStateType should not extends ScalarType (#34463)
1. let AggStateType extends Type
2. remove useless interface isFixedLengthType and supportsTablePartitioning
3. let MapType implement interface isSupported
4. let VariantType extends ScalarType
2024-05-10 22:10:42 +08:00
853dbdcb00 [Feature](PreparedStatement) implement general server side prepared (#33807) 2024-05-10 22:10:11 +08:00
6c11dd2231 [Fix](planner) fix ScalarType.getAssignmentCompatibleType() when deal boolean and decimal (#34435)
The legacy planner encounters issues when handling filters such as: c1(boolean type)=0.0(decimalv3).
The literal 0.0 is interpreted as decimalv3(1,1), and the boolean type c1 is coerced to decimalv3(1,1).
decimalv3(1,1) can only retain values in the range [0,1), while the boolean true is represented as 1, exceeding the upper bound, thus causing an overflow problem.
This pull request addresses this issue by considering the boolean type as decimalv3(1,0), making both c1 and 0.0 being cast to decimal(2,1).


Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
2024-05-10 22:07:16 +08:00
087f3869fd [opt](tools) update bucket number in schema file (#34561)
update tpcds sf1000 bucket number from 64 to 32, for workarounding fdb issue under storage-compute separation arch.


Co-authored-by: zhongjian.xzj <zhongjian.xzj@zhongjianxzjdeMacBook-Pro.local>
2024-05-10 22:06:54 +08:00
391dc35e17 [fix](Nereids) array_intersect should be a variadic function (#34543) 2024-05-10 22:06:45 +08:00
5271042a7d [bugfix](gccompile) fix gcc compile error (#34546)
Co-authored-by: yiguolei <yiguolei@gmail.com>
2024-05-10 22:06:00 +08:00
7c52b9f36e [fix](txn insert) Txn insert stuck if execute on observer fe (#34547) 2024-05-10 22:05:53 +08:00
95593f8e19 [config](move-memtable) support HTTP header load_stream_per_node in stream load (#34444) 2024-05-10 22:05:35 +08:00
093fe354c8 [Improve](cache) Estimated column reader memory to control segment cache (#34526) 2024-05-10 22:05:20 +08:00
d038d3bf21 [improve](restore) Release useless info for the finished job to reduce mem usage (#34513) 2024-05-10 22:05:09 +08:00
19c20247f4 [Fix](job)Reclaim resources held by finished tasks (#34506)
closeOrReleaseResources(), which is responsible for safely closing or releasing the stmtExecutor, command, and ctx objects. The method follows a null check pattern to avoid NullPointerExceptions and ensures that resources are properly cleaned up when they are no longer needed. This improves code readability and maintains a consistent approach to resource management.
2024-05-10 22:04:49 +08:00
7c56c17ecc [Fix](nereids) fix NormalizeRepeat, change the outputExpression rewrite logic (#34196)
In NormalizeRepeat, three parts of the outputExpression of LogicalRepeat need to be pushed down and outputted by bottom project: flattenGroupingSetExpr, argumentsOfGroupingScalarFunction, argumentsOfAggregateFunction.
In the original code, use these three parts to rewrite the outputExpressions of LogicalRepeat to slots.This can cause problems in some cases, for example:
```sql
SELECT
	ROUND( SUM(pk + 1) - 3) col_alias1,
	pk + 1 AS col_alias3 
	FROM
	table_20_undef_partitions2_keys3_properties4_distributed_by53
GROUP BY
	GROUPING SETS ((pk), ()) ;
```
The three parts expression needed to be pushed down are: pk, pk+1. The original code use pk+1 to rewrite the pk + 1 AS col_alias3  to slot. But the pk+1 is not in the list of grouping outputs, and then report error.
This pr change the rewrite process,  divide the expression needed to be pushed down  into 2 parts: one is (flattenGroupingSetExpr) and the other one is (argumentsOfGroupingScalarFunction, argumentsOfAggregateFunction).
 and use the flattenGroupingSetExpr rewrite all LogicalRepeat outputExpressions, and use the argumentsOfGroupingScalarFunction, argumentsOfAggregateFunction to rewrite only the agg function arguments and the grouping scalar function.
So, in the above sql, the pk + 1 AS col_alias3  will not be rewritten to slot, and can be computed.
2024-05-10 22:03:31 +08:00
c0cca6103b [WIP](test) remove enable_nereids_planner in regression cases (part 2) (#34490) 2024-05-10 22:02:32 +08:00
89091363d9 Revert "[chore](log) add try lock db failed log (#34503)"
This reverts commit e34860b86a1cf0e5aa7afa3633fa3772230e2024.
2024-05-10 17:34:43 +08:00
435b4343d7 f 2024-05-10 16:08:52 +08:00
97bc367611 [enhancement](regression-test) modify a key type from BIGINT/LARGEINT to other type (#34436)
Co-authored-by: cjj2010 <2449402815@qq.com>
2024-05-10 14:48:52 +08:00
7bd04b43d9 [fix](tablet schedule) disable schedule need clear running tasks (#34461) 2024-05-10 14:47:02 +08:00
e34860b86a [chore](log) add try lock db failed log (#34503) 2024-05-10 14:46:49 +08:00
7b22c94255 [bugfix](compile error) unused variables compile error (#34509)
* [bugfix](compile error) unused variables compile error

* f

---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2024-05-10 14:46:19 +08:00
082216496e [opt](inverted index) opt for log output when matching without an index (#34024)
Generates a large volume of log output when scanning large amounts of data
2024-05-10 14:45:05 +08:00
25ae7cd65f [bug](ipv6) the ipv6 type should be uint128_t (#34121)
the ipv6 type should be uint128_t, and max value is ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
if use int128_t type, it's will be min value.
2024-05-10 14:43:46 +08:00
e2fc231b7b [refactor](move-memtable) simplify LoadStreamStub::open (#34488) 2024-05-10 14:43:31 +08:00