Commit Graph

6539 Commits

Author SHA1 Message Date
9c6c2f736e [Improvement](statistics)Improve stats sample strategy (#26435)
Improve the accuracy of sample stats collection. For non distribution columns, use 
`n*d / (n - f1 + f1*n/N)`

where `f1` is the number of distinct values that occurred exactly once in our sample of n rows (from a total of N),
and `d` is the total number of distinct values in the sample.

For distribution columns, use `ndv(n) * fraction of tablets sampled` for NDV.

For very large tablet to sample, use limit to control the total lines to scan (for non key column only, because key column is sorted and will be inaccurate using limit).
2023-11-13 15:52:21 +08:00
b0c92d408b [bug](function) add signature for precentile function (#26867) 2023-11-13 15:43:10 +08:00
2f32a721ee [refactor](jni) unified jni framework for jdbc catalog (#26317)
This commit overhauls the JDBC connector logic within our project, transitioning from the previous mechanism of fetching data through JNI calls for individual ResultSet items to a more efficient and unified approach using the VectorTable data structure.
2023-11-13 14:28:15 +08:00
5a7c0ec9dc [fix](broker load) pass loadToSingleTablet to olapTableSink (#26680) 2023-11-13 14:14:25 +08:00
7e62c3c2de [fix](Nereids) store user variable in connect context (#26655)
1.user variable should be case insensitive
2.user variable should be cleared after the connection reset
2023-11-13 12:25:08 +08:00
17b1108635 [fix](nereids)support uncorrelated subquery in join condition (#26672)
sql select * from t1 a join t1 b on b.id in (select 1) and a.id = b.id; will report an error.
This pr support uncorrelated subquery in join condition to fix it
2023-11-13 11:49:11 +08:00
a78e0f8309 [enhancement](nereids)make error message more readable when bind logicalRepeat node (#26744) 2023-11-13 10:52:27 +08:00
db29850e1c [bug](user login)fix PASSWORD_LOCK_TIME setting UNBOUNDED does not take effect (#26585) 2023-11-13 10:41:49 +08:00
7e36ab838f [regression](partial update) Add cases when the deleted rows have non nullable columns without default value (#26776) 2023-11-13 10:36:59 +08:00
c0fda8c5c2 [improve](group commit) Add a swicth to wait internal group commit lo… (#26734)
* [improve](group commit) Add a swicth to make internal group commit load finish

* modify group commit tvf plan
2023-11-13 10:35:35 +08:00
fa8c3aec07 [opt](load) catch Throwable to make load error msg more clear (#26821)
When doing LoadPendingTask or LoadLoadingTask, there may be some Error thrown,
such as `NoClassDefFoundError`, but previously, we only catch java's `Exception`, so
other kind of error can not be shown clearly.
2023-11-13 09:39:29 +08:00
b2dd58a666 [fix](disk migrate) migrate ignore not exists tablet (#26779) 2023-11-12 18:04:33 +08:00
8392e49983 [fix](hudi) fix wrong schema when query hudi table on obs (#26789) 2023-11-11 21:10:30 -06:00
2937b5166e [fix](refresh) fix priv issue of refresh database and table operation (#26793) 2023-11-11 21:09:53 -06:00
ad754cb58f [fix](fe ut) Fix set traceid failed #26808
related to #26605
2023-11-12 10:55:10 +08:00
3044b8397e [feature](fe) Add coverage tool for FE UT (#26203) 2023-11-11 19:54:04 +08:00
ca47d75e83 [fix](regression) Add regression for group commit executed on observe… (#26692) 2023-11-10 18:53:45 +08:00
fd43e64a72 [Enhancement](sql-cache) Use update time of hive to avoid cache miss through multi fe nodes. (#26424)
Now the update time of hms table is generated by every FE node (Use `System.currentTimestamp()` separately), so the update time of a hms table may be different between FE nodes, always the same query can not hit the sql-cache if we submit it more than one times through different FE nodes. This pr mainly do following changes to avoid this problem.

- Use the `transient_lastDdlTime` instead of `System.currentTimestamp` as the `schemaUpdateTime` of hms tables
- Use the `eventTime` in hms event instead of `System.currentTimestamp` as the update time when processing hms events
2023-11-10 17:36:00 +08:00
Pxl
2712bb9f60 [Bug](decimalv2) getCmpType return decimalv2 when lhs/rhs type both is decimalv2 (#26705)
getCmpType return decimalv2 when lhs/rhs type both is decimalv2
2023-11-10 16:21:28 +08:00
59efebce3b [opt](nereids) estimate join cost when col stats are not available (#26086)
no stats left zigzag
2023-11-10 16:13:53 +08:00
0749d632c4 [feature](diagnose) diagnose for cluster balance (#26085) 2023-11-10 15:31:58 +08:00
ce64f0c917 [enhancement](Nereids): add phase in shape string (#26682) 2023-11-10 14:56:28 +08:00
5c3fed216d [fix](transaction) Fix publish txn wait too long when not meet quorum (#26659) 2023-11-10 14:55:26 +08:00
cdba4936b4 [feature](nereids) Support group commit insert (#26075) 2023-11-10 14:20:14 +08:00
27a21aa150 [fix](balance) Delete useless debug log (#26732) 2023-11-10 12:57:13 +08:00
Pxl
c02c00974f [Bug](agg-state) fix file load insert wrong data to agg_state (#26581)
fix file load insert wrong data to agg_state
2023-11-10 11:03:13 +08:00
7754791146 [improvement](disk balance) Prevent duplicate disk balance tasks afte… (#25990) 2023-11-10 10:14:42 +08:00
49cffd0bc9 [fix](JdbcCatalog) fix that the predicate column name does not have back quote when querying the JDBC appearance (#26479) 2023-11-10 09:54:39 +08:00
328e5b120b [fix](group commit) Group commit support sequence column for unique table (#26652) 2023-11-09 22:43:37 +08:00
8434389358 [fix](jdbc) fix clickhouse catalog arr nullable and add case (#26639) 2023-11-09 19:32:05 +08:00
30805a2d79 [fix](Nereids): skip OptimizeGroupExpressionJob if groupExpression is unused (#26641) 2023-11-09 19:21:04 +08:00
fac1b2b192 [fix](planner)cast floating point type to bigint for bit functions (#26598) 2023-11-09 18:06:06 +08:00
a5565f68b2 [Refactor](opentelemetry) Remove opentelemetry (#26605) 2023-11-09 18:05:34 +08:00
22bf2889e5 [feature](tvf)(jni-avro)jni-avro scanner add complex data types (#26236)
Support avro's enum, record, union data types
2023-11-09 13:58:49 +08:00
84d1c3ba30 [Improve](ddl) Use RecycleBin to force drop db/table asynchronously (#26563) 2023-11-09 12:28:16 +08:00
db317841a0 [hotfix](editlog) Fix upsert replay on follower not contains loadedTableIndexIds (#26597)
Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
2023-11-09 12:21:43 +08:00
5d52162484 [Test](statistics) Add test cases for external table statistics (#26511)
1. Test for close and open auto collection for external catalog.
2. Test for analyze table table_name (column) and whole table.
2023-11-09 12:12:29 +08:00
7df60a4980 [Refactor](Tvf) delete some unused code of tvf and add doc for queries tvf (#26460)
1. delete some unused code of tvf
2. add doc for `queries` tvf: #25051
2023-11-09 09:06:09 +08:00
b3ae7f04f9 [fix](backup) Add repo id to local meta/info files to avoid overwriting (#26536)
The local meta/info files generated during backup are not distinguished
by repo names. If two backup jobs with the same name are submitted to
different repos at the same time, meta/info may be overwritten by another
backup job.
2023-11-08 22:28:49 +08:00
8e332fa979 (selectdb-cloud) Reduce FE db lock range for ShowDataStmt (#26588)
Reduce read lock critical sections and avoid execution timeouts
2023-11-08 22:24:17 +08:00
e92d2fcb5a [improvement](group commit) Group commit insert into can be executed on observer fe (#26589) 2023-11-08 22:10:06 +08:00
5bcf6bfd46 [fix](jdbc catalog) fix mysql zero date (#26569) 2023-11-08 21:41:56 +08:00
06343e6d68 [opt](nereids)replace scan by empty relation when all partitions are pruned (#26514)
* replace scan by empty relation when all partitions are pruned
2023-11-08 20:54:35 +08:00
e718952e89 [fix](nereids)only enable colocate scan for one phase global parttion topn in some condition (#26473) 2023-11-08 20:46:40 +08:00
0c1458f21f [fix](planner)isnull predicate can't be safely constant folded in inlineview (#25377)
disable is null predicate constant fold rule for inline view
consider sql
select c.*
from (
select a.*, b.x
from test_insert a left join
(select 'some_const_str' x from test_insert) b on true
) c
where c.x is null;

when push “c.x is null” into c, after folding constant rule, it will get empty result. Because x is 'some_const_str' and "x is null" will be evaluated to false. This is wrong.
2023-11-08 20:46:29 +08:00
d749d99fe2 [fix](nereids)don't normalize column name for base index (#26476) 2023-11-08 20:45:58 +08:00
223be6947c [opt](Nereids) let DataType toSql same with legacy planner (#26576) 2023-11-08 05:34:32 -06:00
45c2fa62a4 [pipeline](exec) disable shared scan in default and disable shared scan in limit with where scan (#25952) 2023-11-08 17:51:12 +08:00
a6d2013802 [opt](nereids) use 2 phase agg above union all (#26245)
forbid one phase agg for pattern: agg-unionAll
one phase agg plan: agg-union-hashDistribute-children
two phase agg plan: agg(global) - hashDistribute-agg(local)-union-randomDistribute
the key point is the cost of randomDistribute is much lower than the hashDistribute, and hence two-phase agg wins.
2023-11-08 17:15:53 +08:00
96d2e3394a [opt](meta) Improve the performance of getting expr name (#26341)
CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name)
It's time-consuming when call many times. So lazy call when necessary
2023-11-08 03:14:15 -06:00