Commit Graph

7160 Commits

Author SHA1 Message Date
496024ffb5 [fix](mtmv) mtmv add case and fix bug (#36019) (#36600)
pick from: #36019
2024-07-02 14:24:53 +08:00
ebc1afed4a [enhance](mtmv)when calculating the availability of MTMV, no longer c… (#36617)
pick: #36507
2024-07-02 14:24:33 +08:00
0c8934642e [opt](nereids)using mv's derived stats #35721 (#37098)
pick from #35721

(cherry picked from commit a481d79b1e258f7b6711157bb0d5e4c224e680e5)

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->
2024-07-02 13:54:05 +08:00
a9764b9d39 [chore](multi catalog) Print serde properties when show create hive-external-table (#34966) (#37096)
bp #34966

Co-authored-by: xy720 <22125576+xy720@users.noreply.github.com>
2024-07-02 11:07:10 +08:00
011f203d71 [opt](log) Remove unnecessary warning log (#37093)
When enable_profile = true or report_succeed=true, it is very likely
fe/fe-core/src/main/java/org/apache/doris/qe/QeProcessorImpl.java::reportExecStatus
will print much warning log. It is not necesary.
2024-07-02 10:53:36 +08:00
3f382b797a [branch-2.1][improvement](sqlserver catalog) Configurable whether to use encrypt when connecting to SQL Server using the catalog (#36971)
pick (#36659)
pick #37015
In previous versions, we used druid as the default JDBC connection pool,
which can use custom decryption to parse the certificate when SQL Server
encryption is turned on. However, in the new version, after changing
HikariCP as the default connection pool, the SQLServer certificate
cannot be parsed, so encryption needs to be turned off for normal use.
Therefore, a parameter is added to decide whether to disable SQLServer
encryption. It is not disabled by default.
2024-07-02 10:14:43 +08:00
6425ce8a89 [Fix](Prepared Statment) use fixed charset to init StringLiteral (#37084)
picked from #36860
2024-07-01 23:11:13 +08:00
e686e85f27 [opt](split) add max wait time of getting splits (#36842)
bp: #36843
2024-07-01 22:05:25 +08:00
89b4918e88 [branch-2.1](stmt) fix show create table consistency #37074 (#37079)
pick #37074
2024-07-01 20:35:05 +08:00
24d236b210 [feat](Nereids) Optimize Sum Literal Rewriting by Excluding Single Instances (#35559) (#37047)
pick from master #35559

This PR introduces a change in the method removeOneSumLiteral to enhance
the performance of sum literal rewriting in SQL queries. The
modification ensures that sum literals appearing only once, such as in
expressions like select count(id1 + 1), count(id2 + 1) from t, are not
rewritten.
2024-07-01 14:57:15 +08:00
14c991f09b [Feature](Prepared Statement) fix and enable enable_server_side_prepared_statement by default #36581 (#36818)
picked from #36581
2024-07-01 14:35:17 +08:00
62c4451c97 [branch-2.1][improvement](jdbc catalog) Modify the maximum number of connections in the connection pool to 30 by default (#37023)
pick (#36720)

In many cases, we found that users would use JDBC Catalog to perform a
large number of queries, which resulted in the maximum of 10 connections
being insufficient, so I adjusted it to 30, which covered most needs.
2024-07-01 12:22:20 +08:00
12dddfc26c [branch-2.1] Pick "[Fix](autoinc) try fix concurrent load problem with auto inc column #36421" (#37027)
## Proposed changes

pick https://github.com/apache/doris/pull/36421
2024-06-30 13:10:03 +08:00
e25b0d7c37 [branch-2.1][improvement](mysql catalog) disable mysql AbandonedConnectionCleanupThread (#36970)
pick (#36655)
2024-06-29 18:35:41 +08:00
a9855ca173 [Improvement](set) enable admin_set_frontend_config can apply to all fe (#37022)
bp #34685
2024-06-29 09:17:38 +08:00
4bec08c7e8 [fix](inverted index)Make build index operation only affect base index (#36869) (#36988)
backport #36869
2024-06-28 16:57:07 +08:00
72de9c1b8f [fix](autoinc) avoid duplicated auto inc when role of fe changes (#36961)
## Proposed changes

pick #36960 

Issue Number: close #xxx

<!--Describe your changes.-->
2024-06-28 16:54:48 +08:00
b46c86f352 [improvement](partition rebalance) improve partition rebalance choose candidate speed #36509 (#36976)
cherry pick from #36509
2024-06-28 16:31:50 +08:00
65e8bbf0f2 [improvement](statistics)Disable fetch stats for iceberg table through Iceberg api by default. (#36931) (#36999)
backport https://github.com/apache/doris/pull/36931
2024-06-28 16:23:25 +08:00
816899df41 [improvement](statistics)Use real base index id to fetch stats cache. (#36914) (#36992)
For historical reason, statistics tables use -1 for OlapTable base index
id. This brings many if/else branch for stats calculate. This pr is to
screen the -1 for Nereids. The stats user could use the real base index
id to fetch stats cache. Will do the id translation inside the get cache
api.

backport: https://github.com/apache/doris/pull/36914
2024-06-28 16:22:20 +08:00
b226fe54e9 [fix](statistics)Fix select mv with specified partitions bug. (#36817) (#36982)
There is a bug of direct select mv with specified partitions. Planner
will fail to find the mv column name. Because we need to create the
LogicalOlapScan object using the given mv instead of the base table.
```
mysql> SELECT mv_id from part8 index mv1 partition p1;
ERROR 1105 (HY000): errCode = 2, detailMessage = Unknown column 'mv_id' in 'table list' in PROJECT clause
```
This pr is to fix this.

backport: https://github.com/apache/doris/pull/36817
2024-06-28 13:07:02 +08:00
da294906bd [fix](statistics)Fix AnalysisTaskExecutor unit test timeout. (#36456) (#36948)
Deencapsulation.getField sometime doesn't work as expected, which may
cause FE unit test timeout. Add get function in source code to make it
easier.
backport: https://github.com/apache/doris/pull/36456
2024-06-28 12:11:53 +08:00
69487c4720 [refactor](nereids) Remove SlotBinder and FunctionBinder (#36872) (#36930)
cherry pick from #36872 

The new ExpressionAnalyzer can do both bind slot and bind function, so I
remove SlotBinder and FunctionBinder.
2024-06-28 11:21:35 +08:00
557da5b24a [fix](Nereids) processCharacterLiteral even if both side are literal (#36729) (#36921)
pick from master #36729
2024-06-28 11:01:01 +08:00
0051832f91 [fix](statistics)Use ConcurrentHashMap to avoid ConcurrentModificationException (#36452) (#36950)
OlapTable idToPartition Map should use ConcurrentHashMap to avoid
ConcurrentModificationException.
backport: https://github.com/apache/doris/pull/36452
2024-06-27 23:06:03 +08:00
474295cf31 [chore](autobucket) add autobucket test and log #36874 (#36907)
cherry pick from #36874
2024-06-27 22:30:13 +08:00
ee7f9a4f26 [fix](oom) avoid oom when a lot of tablets fail on load (#36944)
pick #36873
2024-06-27 22:12:42 +08:00
5c1eef5f06 [feature](tvf) support max_filter_ratio (#35431) (#36911)
bp #35431

Co-authored-by: 苏小刚 <suxiaogang223@icloud.com>
2024-06-27 20:58:53 +08:00
bfd634f9c7 [fix](protocol) only return multi result when CLIENT_MULTI_STATEMENTS been set (#36759) (#36919)
pick from master #36759

multi statement support by PR #3050.
But there is a minor issue in implementation.

as MySQL dev doc say in


https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_command_phase_sp.html#sect_protocol_command_phase_sp_multi_statement

server should only process multi statement
when client set CLIENT_MULTI_STATEMENTS.
When client not set CLIENT_MULTI_STATEMENTS, server should treat query
as single statement.

but Doris do slightly different with MySQL server. Doris always treat
query as multi statement, but only return multi result when client set
CLIENT_MULTI_STATEMENTS. When client do not set CLIENT_MULTI_STATEMENTS,
Doris will return the last statement result only.

Co-authored-by: Mingyu Chen <morningman.cmy@gmail.com>
2024-06-27 18:35:40 +08:00
a05d5cc75e [refactor](variant) refactor sub path push down on variant type (#36478) (#36923)
pick from master #36478

intro a new rule VARIANT_SUB_PATH_PRUNING to prune variant sub path.

for example, variant slot v in table t has two sub path: 'c1' and 'c2',
after this rule, select v['c1'] from t will only scan one sub path 'c1'
of v to reduce scan time.

This rule accomplishes all the work using two components. The Collector
traverses from the top down, collecting all the element_at functions on
the variant types, and recording the required path from the original
variant slot to the current element_at. The Replacer traverses from the
bottom up, generating the slots for the required sub path on scan,
union, and cte consumer. Then, it replaces the element_at with the
corresponding slot.
2024-06-27 17:48:43 +08:00
8a1ebba1cc [Improvement](multicatalog) support read tencent dlc table on lakefs (#36891)
bp #36823
2024-06-27 14:03:48 +08:00
22cb7b8fcb [improvement](compaction) be do not compact invisible version to avoid query error -230 #28082 (#36222)
cherry pick from #28082
2024-06-27 13:45:21 +08:00
89fc55d833 [improvement](balance) partition rebalance chose disk by rr #36826 (#36900)
cherry pick from #36826
2024-06-27 13:43:30 +08:00
f80750faed [improvement](clone) dead be will abort sched task #36795 (#36897)
cherry pick from #36795
2024-06-27 13:35:51 +08:00
a8e9c89dc6 [Fix](nereids) fix NormalizeAgg, change the upper project projections rewrite logic (#36161) (#36622)
cherry-pick #36161 to branch-2.1

NormalizeAggregate rewrite logic has a bug, for sql like this:

SELECT
	CASE
		1 WHEN CAST( NULL AS SIGNED ) THEN NULL
		WHEN COUNT( DISTINCT CAST( NULL AS SIGNED ) ) THEN NULL
		ELSE null
	END ;

This is the plan after NormalizeAggregate, the LogicalAggregate only
output `count(DISTINCT cast(NULL as SIGNED))`#3, do not output cast(NULL
as SIGNED)#2, but the upper project use cast(NULL as SIGNED)#2, so Doris
report error "cast(NULL as SIGNED) not in aggregate's output".

LogicalResultSink[29] ( outputExprs=[__case_when_0#1] ) +--LogicalProject[26] ( distinct=false, projects=[CASE WHEN (1 = cast(NULL as SIGNED)#2) THEN NULL WHEN (1 = count(DISTINCT cast(NULL as SIGNED))#3) THEN NULL ELSE NULL END AS `CASE WHEN (1 = cast(NULL as SIGNED)) THEN NULL WHEN (1 = count(DISTINCT cast(NULL as SIGNED))) THEN NULL ELSE NULL END`#1], excepts=[] )
   +--LogicalAggregate[25] ( groupByExpr=[], outputExpr=[count(DISTINCT cast(NULL as SIGNED)#2) AS `count(DISTINCT cast(NULL as SIGNED))`#3], hasRepeat=false )
      +--LogicalProject[24] ( distinct=false, projects=[cast(NULL as SIGNED) AS `cast(NULL as SIGNED)`#2], excepts=[] )
         +--LogicalOneRowRelation ( projects=[0 AS `0`#0] )

The problem is that the cast(NULL as SIGNED)#2 should not outputted by
LogicalAggregate, cast(NULL as SIGNED) should be computed in
LogicalProject.
This pr change the upper project projections rewrite logic:
aggregateOutputs is rewritten and become the upper-level LogicalProject
projections. During the rewriting process, the expressions inside the
agg function can be rewritten with expressions in aggregate function
arguments and group by expressions, but the ones outside the agg
function can only be rewritten with group by expressions.

---------

Co-authored-by: moailing <moailing@selectdb.com>
2024-06-27 12:17:18 +08:00
23cf494b48 [fix](schema-change) Fix schema-change from non-null to null (#36389)
https://github.com/apache/doris/pull/32913
2024-06-26 20:20:50 +08:00
a6a84b8ecc [improvement](stream load)(cherry-pick) support hll_from_base64 for stream load column mapping (#36819)
picked from https://github.com/apache/doris/pull/35923
2024-06-26 20:12:40 +08:00
8fc70e32bc [fix](planner) fix wrong resut of function ifnull/coalesce caused by … (#36727) 2024-06-25 17:32:04 +08:00
785a1f49f5 [fix](txn) Fix coordidator be restart not abort txn #35342 (#36437)
cherry pick from #35342
2024-06-25 13:35:01 +08:00
07ce9cf52c [fix](schema change) reduce memory usage in schema change process #30231 #36285 #33073 (#36756)
pick
https://github.com/apache/doris/pull/30231
https://github.com/apache/doris/pull/36285
https://github.com/apache/doris/pull/33073
2024-06-25 12:21:17 +08:00
67adbdae75 [branch-2.1] Pick "[Fix](JournalEntity) re-add a line of code that is accidentally removed in #19917" (#36427)
## Proposed changes

pick https://github.com/apache/doris/pull/36423
2024-06-24 20:45:02 +08:00
90a4dd09f3 [Fix](func) CoreDump and Result Error in percentile function (#36647)
cherry pick #36643
2024-06-21 23:42:45 +08:00
0cff539810 [feature](function) support new function replace_empty (#36283) (#36656)
#36283
2024-06-21 16:46:22 +08:00
58cc1dca7f [improve](fe) Support to config max msg/frame size of the thrift server (#36594)
Cherry-pick #35845
2024-06-21 00:15:15 +08:00
3febac1d91 [fix](connection) kill connection when meeting Write mysql packet failed error #36559 (#36616)
bp #36559
2024-06-20 22:27:01 +08:00
c28c243c98 [Fix](Variant) forbit create variant as key #36555 (#36578) 2024-06-20 20:33:48 +08:00
838af13001 [fix](auth)ldap set passwd need forward to master (#36436) (#36598)
pick from master: #36436
2024-06-20 18:35:37 +08:00
3ee259fc00 [branch-2.1][fix](jdbc catalog) fix jdbc mysql client match jsonb type (#36180)
bp #36177
2024-06-20 18:33:27 +08:00
ac0f6e75d2 [bugfix](iceberg)Read error when timestamp does not have time zone for 2.1 (#36435)
bp: #36141
2024-06-20 18:32:31 +08:00
22d37ba3fe [fix](auth)Auth support case insensitive (#36381) (#36557)
pick from: #36381
2024-06-20 18:31:30 +08:00