Commit Graph

4004 Commits

Author SHA1 Message Date
782001c75b [fix](planner) project should be done inside subquery (#17630)
WITH t0 AS(
SELECT report.date1 AS date2 FROM(
SELECT DATE_FORMAT(date, '%Y%m%d') AS date1 FROM cir_1756_t1
) report GROUP BY report.date1
),
t3 AS(
SELECT date_format(date, '%Y%m%d') AS date3
FROM cir_1756_t2
)
SELECT row_number() OVER(ORDER BY date2)
FROM(
SELECT t0.date2 FROM t0 LEFT JOIN t3 ON t0.date2 = t3.date3
) tx;

The DATE_FORMAT(date, '%Y%m%d') was calculated in GROUP BY node, which is wrong. This expr should be calculated inside the subquery.
2023-03-13 11:10:27 +08:00
55c42da511 [Feature](array) Support array<decimalv3> data type (#16640) 2023-03-13 10:48:13 +08:00
39b5682d59 [Pipeline](shared_scan_opt) Support shared scan opt in pipeline exec engine 2023-03-13 10:33:57 +08:00
a0a2809324 [Enhancement](multi-catalog) support hms event deserialization for HDP/CDH Hive versions. (#17660)
Some HDP/CDH Hive versions use gzip to compress the message body of hms NotificationEvent,
so com.qihoo.finance.hms.event.MetastoreEventFactory can not transfer it rightly.
2023-03-13 09:47:28 +08:00
b0d1166989 [fix](meta) fix concurrent modification exception and potential NPE (#17602) 2023-03-12 22:12:07 +08:00
46dcf69644 [fix](jdbc-catalog) avoid calculate driver's md5 when replaying edit log (#17693) 2023-03-12 22:11:45 +08:00
54e5c71e52 [fix](planner) Fix NPE when update stats by profile 2023-03-12 21:40:47 +08:00
a651926ba9 [fix](fqdn) Add UnknownHostException handle logic in FQDNManager to avoid that active ip could be incorrectly assigned to dead be or dead fe (#17689)
1.if be is dead and be ip not changed by FQDNManager,A situation may occur that after a while the old ip is used by other new alive pod,this may cause two be share same ip which is unexpected.
2.when enable_fqdn is false, user can still set hostname in be when add backend

Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-03-12 21:12:33 +08:00
0d05e4cce0 [Improvement](multi-catalog) The interface of external Splitter. WIP (#17390)
This is PR introduce splitter interface external table.
The splitter interface contain one method getSplits, which is used by QueryScanProvider to get the external file split. 
For Hive/Iceberg/TVF, a split is a file block. For ES, it is a shard.
This PR also move the getSplits logic in FileScanProviderIf to the new Splitter interface.
In the future, we may unify internal table as well.
2023-03-12 20:11:08 +08:00
a452db35da [improvement](filecache)Change the hash field of the backend (#17499)
ip of backend may change
use id as a hash field
2023-03-12 20:04:25 +08:00
b93e553958 [enhance](Nereids): allow empty hash condition (#17699) 2023-03-12 18:51:22 +08:00
11fbe07221 [refactor](Nereids) Refactor all rewrite logical unit tests by match-pattern (#17691) 2023-03-12 18:49:12 +08:00
d774162a53 [minor](Nereids): rename rule (#17509) 2023-03-12 00:17:07 +08:00
9745ee60a7 [fix](priv) fix bug of grant priv on ctl.db.* not work (#17612)
currently, when use grant xxx_priv on ctl.db.* to user_a, it does not work. When user_a switch to ctl,
he cannot see or use any database.
2023-03-11 22:27:26 +08:00
692d510edb [fix](schema_hash) remove useless schema_hash param in tablet and replica url (#17489)
Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-03-11 21:34:47 +08:00
d7cb5cf3db [feature](nereids) add session var: dump_nereids_memo (#17666)
* dump_nereids_memo

* print groupexpr id
2023-03-11 13:40:15 +08:00
3231fab8c2 [feature](nereids) add unique id for groupExpression and plan node (#17628)
* add unqiue id for groupExpression and plan node

* fix ut
2023-03-11 13:23:41 +08:00
db9692a114 [feature](Nereids): convert CrossJoin to InnerJoin. (#17681) 2023-03-11 13:23:28 +08:00
3745e6c18a [fix](Nereids): order of project's logical properties is different with that of project expression (#17648) 2023-03-11 00:26:54 +08:00
051ab7a9c6 [refactor](Nereids): refactor Join-Dependent Predicate Duplication. (#17653) 2023-03-10 22:19:45 +08:00
566d133610 [enhancement](Nereids) Refactor EliminateLimitTest and EliminateFilterTest by match-pattern (#17631) 2023-03-10 21:24:36 +08:00
9cfa61b402 [Enhancement](HttpServer) Provide authentication interface for BE (#17073)
Add an authentication interface in FE for BE
2023-03-10 16:34:47 +08:00
9ae5ec4dc5 [fix](nereids) PushdownExpressionsInHashCondition contains duplicate column and WindowExpression miss column stats (#17624)
tpcds: q47 and q57
1. PushdownExpressionsInHashCondition:project contains duplicate column
2. WindowExpression stats caclucate: miss column stats
2023-03-10 16:08:43 +08:00
739e043c8d [fix](publish) add retry publish when succeed replica num less than quorum and transaction not VISIBLE (#17453)
for some reasons, transaction pushlish succeed replica num less than quorum,
this transaction's status can not to be VISIBLE, and this publish task of this
replica of this tablet on this backend need retry publish success to
make transaction VISIBLE when last publish failed.
Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-03-10 12:02:15 +08:00
Pxl
1a549edac2 [Chore](third-party) upgrade thrift from 0.13 to 0.16 (#17202)
upgrade thrift from 0.13 to 0.16
There is thrift's release notes https://github.com/apache/thrift/blob/master/CHANGES.md
2023-03-10 11:33:16 +08:00
f84b8b7c8b [fix](priv) fix extract real user name when do privilege check (#17488)
fix extract real user name of root/admin
2023-03-10 10:22:13 +08:00
fe6361f4b5 [regression-test](p0) fix some unstable p0 cases (#17518)
drop database before create
remove some large, unused debug log
2023-03-10 10:21:39 +08:00
c7aa3f9717 [fix](backup) backup throw NPE when no partition in table (#17546)
If table has no partition, backup will report error:

2023-03-06 17:35:32,971 ERROR (backupHandler|24) [Daemon.run():118] daemon thread got exception. name: backupHandler
java.util.NoSuchElementException: No value present
        at java.util.Optional.get(Optional.java:135) ~[?:1.8.0_152]
        at org.apache.doris.catalog.OlapTable.selectiveCopy(OlapTable.java:1259) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.backup.BackupJob.prepareBackupMeta(BackupJob.java:505) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.backup.BackupJob.prepareAndSendSnapshotTask(BackupJob.java:398) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.backup.BackupJob.run(BackupJob.java:301) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.backup.BackupHandler.runAfterCatalogReady(BackupHandler.java:188) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.common.util.MasterDaemon.runOneCycle(MasterDaemon.java:58) ~[doris-fe.jar:1.0-SNAPSHOT]
        at org.apache.doris.common.util.Daemon.run(Daemon.java:116) ~[doris-fe.jar:1.0-SNAPSHOT]
2023-03-10 10:19:37 +08:00
4ba93efc98 [Enhance](DOE)Support parse default es iso datetime string (#17412)
* support parse default es iso datetime string
2023-03-10 09:59:20 +08:00
006f7a91ac [fix](planner) should not turn on push agg op when olapscan has conjuncts on it (#17598)
we should not set PushAggOp to any type, if olap scan already has conjunct on it.
2023-03-10 09:33:08 +08:00
c3c7bc4340 [fix](profile) fix profile sort child list exception (#17613) 2023-03-10 08:44:32 +08:00
f9baf9c556 [improvement](scan) Support pushdown execute expr ctx (#15917)
In the past, only simple predicates (slot=const), and, like, or (only bitmap index) could be pushed down to the storage layer. scan process:

Read part of the column first, and calculate the row ids with a simple push-down predicate.
Use row ids to read the remaining columns and pass them to the scanner, and the scanner filters the remaining predicates.
This pr will also push-down the remaining predicates (functions, nested predicates...) in the scanner to the storage layer for filtering. scan process:

Read part of the column first, and use the push-down simple predicate to calculate the row ids, (same as above)
Use row ids to read the columns needed for the remaining predicates, and use the pushed-down remaining predicates to reduce the number of row ids again.
Use row ids to read the remaining columns and pass them to the scanner.
2023-03-10 08:35:32 +08:00
4ddd303cfc [Feature-wip](MySQL Load)Support cancel query for mysql load (#17233)
Notice some changes:
1. Support cancel query for mysql load 
2. Change the thread pool for mysql load manager.
3. Fix sucret path check logic
4. Fix some doc error
2023-03-09 22:08:26 +08:00
4a0361914b [fix](alter inverted index) add or drop inverted index also need change table state to SCHEMA_CHANGE (#17471)
before this pr, add or drop inverted index not change table state, maybe multiple alter jobs executed at the same time, that may lead to some unexpected problems.
2023-03-09 16:33:46 +08:00
310bdb60f4 [chore](maven) Prefer protoc in thirdparty to the one in maven artifacts (#17596)
The prebuilt protoc-gen-grpc-java binary uses glibc on Linux and the version of glibc which Centos 6 uses is too old.
2023-03-09 16:21:38 +08:00
6c894be007 [enhancement](Nereids) support decimalv3 and precision derive (#17393) 2023-03-09 14:12:10 +08:00
aaedcf34cf [enhancement](Nereids) refactor costModel framework (#17339)
refactor cost-model frameWork:
1. Use Cost class to encapsulate double cost
2. Use the `addChildCost` function to calculate the cost with children rather than add directly

Note we use the `Cost` class because we hope to customize the operator of adding a child host. Therefore, only when the cost would add the child Cost or be added by the parent  we use `Cost`. Otherwise, we use double such as `upperbound`
2023-03-09 13:58:44 +08:00
e1ea2e1f2c [fix](Nereids) store offset of Limit in exchangeNode (#17548)
When the limit has offset, we should add an exchangeNode and store the offset in it
2023-03-09 13:43:12 +08:00
2d027282f3 [fix](profile) modify load profile some bugs and docs (#17533)
1. 'insert into' profile has 'insert' type, can not query by 'load' type
2. 'insert into' profile does not have job_id, can not query by job_id. so put all profiles key with query_id
3. 'broker load' profile does not have some infos, npe
2023-03-09 11:58:40 +08:00
4ef46159ae [vectorized](udaf) support array type for java-udaf (#17351) 2023-03-09 11:30:07 +08:00
00727e8c11 [fix](in-bitmap) fix result may be wrong if the left side of the in bitmap predicate is a constant (#17570) 2023-03-09 10:59:05 +08:00
397cc011c4 [fix](function) fix AES/SM3/SM4 encrypt/ decrypt algorithm initialization vector bug (#17420)
ECB algorithm, block_encryption_mode does not take effect, it only takes effect when init vector is provided.
Solved: 192/256 supports calculation without init vector

For other algorithms, an error should be reported when there is no init vector

Initialization Vector. The default value for the block_encryption_mode system variable is aes-128-ecb, or ECB mode, which does not require an initialization vector. The alternative permitted block encryption modes CBC, CFB1, CFB8, CFB128, and OFB all require an initialization vector.

Reference: https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_aes-decrypt

Note: This fix does not support smooth upgrades. during upgrade process, query may report error: funciton not found
2023-03-09 09:51:41 +08:00
b6128f9b65 [dependenct](fe) Replace jackson-mapper-asl with fastxml-jsckson (#17303) 2023-03-09 09:35:58 +08:00
2b6d971c2f [fix](nereids)fix first_value/lead/lag window function bug in nereids (#17315)
* [fix](nereids)fix first_value/lead/lag window function bug in nereids

* add more test

* add order by to fix test case

* fix test cases
2023-03-09 09:35:27 +08:00
4822b9811a [feature](nereids)support bitmap runtime filter on nereids (#16927)
* A in(B) -> bitmap_contains(bitmap_union(B), A)
support bitmap runtime filter on nereids

* GroupPlan -> Plan

* fmt

* fix target cast problem
remove test code
2023-03-09 09:30:24 +08:00
ebda7ba5c6 [Fix](FQDN) fix slow when ip changed (#17455) 2023-03-09 09:07:16 +08:00
bd5ed2b0c2 [enhancement](histogram) optimize the histogram bucketing strategy, etc (#17264)
* optimize the histogram bucketing strategy, etc

* fix p0 regression of histogram
2023-03-08 20:12:05 +08:00
75e4f86c2d [fix](meta) fix catlog parameter when checking privilege of show_create_table stmt (#17445)
the ctl parameter of show_create_table stmt is not set in checkTblPriv, this is not correct for multicatalog
2023-03-08 19:50:31 +08:00
05b04e4c39 [BugFix](PG catalog) fix that pg catalog can not get all schemas that a pg user can access. (#17517)
Describe your changes.
In the past, pg catalog use sql SELECT schema_name FROM information_schema.schemata where schema_owner='<UserName>'; to select schemas of an user. Howerver, this sql can not find all schemas that a user can access, that because:

A user may not be the owner of an schema, but may have read permission on the schema.
A user may inherit the permissions of its user group and thus have read permissions on one schema.
For these reasons, we replace the sql statement with select nspname from pg_namespace where has_schema_privilege('<UserName>', nspname, 'USAGE');
2023-03-08 19:12:47 +08:00
678f34cad3 [fix](planner) insert default value should not change return type of function object in function set (#17536)
function now's return type changed to datetimev2 by mistake.
It can be reproduced in the following way

CREATE TABLE `testdt` (
  `c1` int(11) NULL,
  `c2` datetimev2 NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=OLAP
DUPLICATE KEY(`c1`, `c2`)
COMMENT 'OLAP'
DISTRIBUTED BY HASH(`c1`) BUCKETS 10
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"in_memory" = "false",
"storage_format" = "V2",
"light_schema_change" = "true",
"disable_auto_compaction" = "false"
);

 insert into testdt2(c1) values(1);

select now();
2023-03-08 17:08:28 +08:00