Commit Graph

6036 Commits

Author SHA1 Message Date
22616d125d [function](bitmap) add function alias bitmap_andnot and bitmap_andnot_count (#24771) 2023-09-22 12:18:31 +08:00
b5f6ace204 [fix](planner) ctas should not change any meta of column in source table (#24767)
if previous PR #22770. we try to fix incorrect nullable in target table.
However we changed nullable info of column in source table unexpectly
2023-09-22 11:49:38 +08:00
79fe9d58b0 [bug](expr) forget write date_liter expr code info (#24687)
[bug](expr) forget write date_liter expr code info
2023-09-22 11:08:41 +08:00
a718f1f6cd [fix](lock): do not use instance lock to protect static data (#24611) 2023-09-22 10:16:54 +08:00
c832e018d0 [Dependence](Fe)Upgrade Fe dependencies (#24606)
* be scanner
- Upgrade avro to 1.11.2
fe
- Upgrade quartz to 2.5.0-rc1
- Upgrade maxcompute to 0.45-2-publish
- Binding  avro-ipc  to 1.11.2

* Binding hbase  version to 2.5.5
binding nimbusds version to 9.35
2023-09-22 10:14:42 +08:00
090be20ca4 [cases](regresstests) add negative case for agg table and fix agg table support replace typ… #24715
add negative case for agg table
fix agg table support replace agg type for complex type , and Now We only support complex type with agg state for replace only
fix test output
2023-09-22 09:05:20 +08:00
e4c55cc5aa [fix](web): field in Controller is singleton, which would introduce thread safe problem, so remove it (#24667)
Co-authored-by: yiguolei <676222867@qq.com>
2023-09-22 08:58:01 +08:00
6685875e72 [Improvement](statistics)Mark unfinished analysis job failed after master reboot
Before, the Pending/Running analysis tasks/jobs will stay in the unfinished status for ever after FE reboot, which is misleading.
In this pr, jobs/tasks are only logged to editlog when they finish. So the unfinished tasks/jobs are abandoned after reboot.
Also return without retry when analyze table cancelled by user in with sync mode.
2023-09-21 23:11:50 +08:00
48f3614ce8 [fix](nereids) a bug in estimation of intersect ndv (#24664) 2023-09-21 23:06:31 +08:00
a17034b7ff [fix](planner) do not support UDF without paramter (#24730)
for example:
CREATE ALIAS FUNCTION f() WITH PARAMETERS() AS now();
2023-09-21 22:23:21 +08:00
c9b2f4cb92 [workload](pipeline) Add cgroup cpu controller (#24052) 2023-09-21 21:49:33 +08:00
b8d8cfadfe [enhancement](delete) avoid null txn state after delete job committed (#24741) 2023-09-21 21:21:06 +08:00
58ab25ccaa Revert "[Feature](merge-on-write)Support ignore mode for merge-on-write unique table (#21773)" (#24731)
This reverts commit 3ee89aea35726197cb7e94bb4f2c36bc9d50da84.
2023-09-21 21:01:28 +08:00
3bd341a1be [enhancement](schema) Add schema consistency check when add partition (#24707) 2023-09-21 20:35:45 +08:00
232226e75a [Improve](count on index) improve performance for count on index other than match (#24678) 2023-09-21 20:30:27 +08:00
6c19e106ad [fix](rest catalog)support set region for s3 (#24566)
Use REST Catalog to access S3 and support setting up regions:
```
CREATE CATALOG iceberg_rest_s3 PROPERTIES (
    "type"="iceberg",
    "iceberg.catalog.type"="rest",
    "uri" = "http://127.0.0.1:8181",
    "s3.endpoint" = "http://127.0.0.1:8010",
    "s3.access_key" = "admin",
    "s3.secret_key" = "password",
    "s3.region" = "us-east-1"
);
```
2023-09-21 20:19:43 +08:00
a48b19ceb6 [feature](Outfile) select into outfile supports to export struct/map/array type data to orc file format (#24350)
We do not support nested complex type in this pr.
2023-09-21 20:15:18 +08:00
aa92c2ddfb [minor](test) Add some ut for optimizer rule (#24562)
Add ut for

* ExistsApplyToJoin
* SimplifyDecimalV3Comparison
* SimplifyArithmeticComparisonRule
* SimplifyCastRule
2023-09-21 15:46:35 +08:00
ce57b99ce7 [fix](Nereids) colocate join could not work well on full outer join (#24700)
in previous PR #22979, we fix the output deriver of join. But we forgot
to change the util method JoinUtils#shouldColocateJoin to adjust the
change of physical properties derive.
we could not use join distribution type anymore since join could output
any distribute for full outer join.
2023-09-21 15:26:59 +08:00
bcf1806864 [opt](Nereids): GroupExpressionMatching don't need withGroupExpression (#24684) 2023-09-21 12:51:44 +08:00
7efaf9d0c8 [chore](add_partition) add some log to investigate problem (#24193) 2023-09-21 12:46:18 +08:00
5b590bbfcf [feat](Nereids) add lambda func array_last and array_first (#24682) 2023-09-21 12:23:34 +08:00
a65dbb097c [enhancement](Nereids) when the sort key is equal to Literal, eliminate sort (#24669)
when the sort key is equal to Literal, eliminate sort. such as :

filter(a = 1)
    |
sort(a)

eliminate this sort(a)
2023-09-21 11:55:53 +08:00
Pxl
01b7cb8db7 [Bug](materialized-view) fix failed insert into mv meet default null (#24545)
fix failed insert into mv meet default null
2023-09-21 10:47:29 +08:00
b87ea68720 [Fix](statistics) Fix analyze olap table couldn't get partition names bug (#24696)
Call getPartitionNames to get all partitions while analyzing for olap table. Couldn't return NULL, otherwise analyze for olap table will do nothing.
2023-09-21 10:28:37 +08:00
ca73684d10 [feature](tools)draw a graphic profile (#24495)
### how to get profile.png
1. execute a sql file, and draw its profile  
          python3 profile_viewer.py -f[path to sql file] -t [query title]

2. draw a given profile
          python3 profile_viewer.py -qid [query_id] -t [query title]
    
    graphviz is required(https://graphviz.org/)
    on linux: apt install graphviz
    on mac: brew install graphviz

### related changes
reimplement rest api: /profile/json/{query_id} to return profile in json format. currently, json profile only contains two counters: RowsReturned and TotalTime
2023-09-21 10:24:35 +08:00
d62b59b620 [pipelineX](profile) Complete load profile (#24690) 2023-09-21 09:57:34 +08:00
0d20a61587 [fix](nereids)left outer join estimation (#24462)
A left join B on A.x=B.x and A.y=B.y
B.x and B.y make result tuple number scale out.
suppose A is scaled out by B.x N1 time, and scaled out by B.y N2 time, and N1 < N2.
we should choose N1 as the final scale out factor, not N2.

this pr impact on tpcds_sf100 59/17/29/25/47/40/54

before
query59 77295 75279 75230 75230
query17 22642 21566 21599 21566
query29 16508 16092 16006 16006
query25 20262 20571 21171 20571
query47 23571 23264 23107 23107
query40 3305 2849 3064 2849
query54 9052 8882 8715 8715
Total cold run time: 172635 ms
Total hot run time: 168044 ms

after
query59 56435 54717 53919 53919
query17 24167 22377 23237 22377
query29 16950 18325 16333 16333
query25 21478 22975 21358 21358
query47 24412 24611 23920 23920
query40 5491 4779 5176 4779
query54 8671 8664 8658 8658
Total cold run time: 157604 ms
Total hot run time: 151344 ms
2023-09-21 09:45:01 +08:00
4ca650f306 [improvement](jdbc catalog) Adjust function replacement order and add new function support (#24685) 2023-09-21 08:45:27 +08:00
5e82aebd25 [fix](fe-meta) fix paimon file catalog meta issue and replication num analysis issue (#24681)
Fix 2 issues:

The replication num analysis will throw exception when there is no BE alive when FE restart.
org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = errCode = 2, detailMessage = replication num should be less than the number of available backends. replication num is 1, available backend num is 0
        at org.apache.doris.common.util.PropertyAnalyzer.analyzeReplicaAllocation(PropertyAnalyzer.java:1018) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.TableProperty.buildReplicaAllocation(TableProperty.java:483) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.TableProperty.read(TableProperty.java:529) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.OlapTable.readFields(OlapTable.java:1370) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Table.read(Table.java:383) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Database.readFields(Database.java:631) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.InternalCatalog.loadDb(InternalCatalog.java:3075) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env.loadDb(Env.java:1764) ~[doris-fe.jar:1.2-SNAPSHOT]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_341]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_341]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_341]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_341]
        at org.apache.doris.persist.meta.MetaReader.read(MetaReader.java:116) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env.loadImage(Env.java:1701) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.master.Checkpoint.doCheckpoint(Checkpoint.java:130) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.master.Checkpoint.runAfterCatalogReady(Checkpoint.java:79) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.common.util.MasterDaemon.runOneCycle(MasterDaemon.java:58) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.common.util.Daemon.run(Daemon.java:116) ~[doris-fe.jar:1.2-SNAPSHOT]
Paimon File Catalog meta issue
Fix #23366
2023-09-21 08:41:03 +08:00
b25c3e2197 [Fix](merge-on-write) enable_unique_key_partial_update should be forwarded to master #24697 2023-09-21 08:31:02 +08:00
8b1e5897c8 [fix](security): Use SecureRandom instead of Random, because it provides better security #24483 2023-09-21 08:22:16 +08:00
2e85e0163d Revert "[feature](function) add json->operator convert to json_extract (#19899)" (#24679)
Revert "[feature](function) add json->operator convert to json_extract (#19899)"
because it conflict with lambda syntax
This reverts commit f54a068d82e88e8535f3ed55a4224886b752e46b.
2023-09-20 21:16:19 +08:00
677b3424e3 [feature](Load)(step1)support nereids load, add load grammar (#23485)
support nereids load grammar.

we will convert the broker load stmt to insert into clause:
1. rename broker load to bulk load.
2. add load grammar to nereids optimizer.
3. convert to insert into clause with table value function.

https://github.com/apache/doris/issues/24221
2023-09-20 21:12:23 +08:00
8aa39137fc [Bugfix](multi-catalog)If es hosts ends with "/", the index cannot be obtained. (#24272) 2023-09-20 20:35:14 +08:00
e4b551e2ce [fix](Config): Remove unused config max_connection_scheduler_threads_num (#24597) 2023-09-20 18:11:56 +08:00
2a260be10c [improvement](jdbc catalog) when lower_case_table_names of jdbc catalog properties is set to true, use the real table name to query the jdbc data source (#24520) 2023-09-20 17:47:11 +08:00
Pxl
8c8c563c3c [Chore](status) adjust some error status print log (#24660)
adjust some error status print log
2023-09-20 17:42:51 +08:00
ca5bdc0482 [feature](restore) Add thrift RestoreSnapshotRequest support table alias (#24547)
Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
2023-09-20 17:33:35 +08:00
81e65f4a12 [feature](function) Support SHA family functions (#24342) 2023-09-20 17:21:45 +08:00
5eb8fe3d6e [improvement](type) modify the inner type display of the Array/Map/Struct type (#24459)
In the old code, when using desc command to view the table schema
It will display as follows
```
ARRAY<TINYINT(4)>
ARRAY<SMALLINT(6)>
ARRAY<INT(11)>
ARRAY<BIGINT(20)>
ARRAY<LARGEINT(40)>
```
However, for normal integer type displays, the width is not displayed
So, I changed it to the following
```
ARRAY<TINYINT>
ARRAY<SMALLINT>
ARRAY<INT>
ARRAY<BIGINT>
ARRAY<LARGEINT>
```
2023-09-20 17:03:03 +08:00
a3fd37da02 [opt](Nereids): speedup performance of Nereids (#24600)
- remove redundant ImmuableList.copyOf()
- GroupExpr equals() don't compare LogicalProperties.
- fix project forgot except
- project constructor use List as children instead of Plan
2023-09-20 16:38:07 +08:00
7c32b2b4ed [Fix](broker load) broker load with or predicate error fix #24157
Co-authored-by: wangqingtao6 <wangqingtao6@jd.com>
2023-09-20 14:56:32 +08:00
fc12362a6d [feature-wip](arrow-flight)(step2) FE support Arrow Flight server (#24314)
This is a POC, the design documentation will be updated soon
2023-09-20 14:42:54 +08:00
a3361df7b9 [Feat](Nereids) support json and jsonb datatype (#24156)
Feature:
support jsonb and json type in nereids

Document:
this feature supports these two datatype in nereids optimizer like original planner, the sql reference is same as before
[JSON - Apache Doris](https://doris.apache.org/zh-CN/docs/dev/sql-manual/sql-reference/Data-Types/JSON)
2023-09-20 14:32:22 +08:00
e9435c14f8 [Improve](array-func)improve array union support multi params (#24327) 2023-09-20 14:29:48 +08:00
ca56921481 [docs](partition) Auto partition docs (#24574) 2023-09-20 14:28:23 +08:00
aa9f2260ea [fix](multi-catalog)Es catalog needs to verify whether it is a valid configuration. (#24309) 2023-09-20 14:20:57 +08:00
deafa2dd88 [fix](Nereids) fix row count unconsistent when join ordering (#24589)
In the context of reorder join, when a new plan is generated, it may include a project operation. In this case, the newly generated join root and the original join root will no longer be in the same group. To avoid inconsistencies in the statistics between these two groups, we keep the child group's row count unchanged when the parent group expression is a project operation.
2023-09-20 13:11:35 +08:00
075552ead4 [feature](partitions)support batch delete partition (#23986)
ALTER TABLE example_db.my_table
DROP PARTITION p1,
DROP PARTITION p2,
DROP PARTITION p3;
2023-09-20 11:45:52 +08:00