Commit Graph

8289 Commits

Author SHA1 Message Date
183800e1ad [Fix](variables) fix session variable does not take effect immediately when set global variable in follower FE (#18609) 2023-04-14 10:35:03 +08:00
ca891d880f [fix](es) ClassCastException when getting root schema (#18438)
* [fix](es) ClassCastException when getting root schema
2023-04-14 09:04:09 +08:00
b6b4408283 [fix](meta) void NPE when save meta (#18600)
Introduced from #16878,
the newly added string field can not be null, or NPE will be thrown when calling `Text.writeString()`
2023-04-14 08:52:09 +08:00
b39846c2c7 [Fix](Catalog)Delete duplicate defined dependencies to avoid class loading exceptions (#18628)
`iceberg-hive-metastore` and `hive-storage-api` have been defined in hive-catalog-shade,
and some classes in the shade have been renamed, so we cannot declare them again.
The classes in the shade should be kept.

The `hive-metastore-api` used in `ranger` can also use the jar in the `shade`.
Since we rename the tool class used inside the `hive`, this has no effect.
2023-04-13 22:12:19 +08:00
1d3699a70c [refactor](jdbc) refactor jdbc connection num in datasource (#18563)
now maybe jdbc have problem that there are too many connections and they do not release,
so change the property of datasource: init = 1, min = 1, max = 100, and idle time is 10 minutes.
2023-04-13 22:08:08 +08:00
281ceee3cc [feature-wip](resource-group) Support resource group tvf (#18519)
related: #18098
2023-04-13 20:11:20 +08:00
33eec9096f [Enhancement](FE) use customized grpc threadpool to get better metric for grpc from FE to BE (#13983)
Previously in Doris FE, there is no specific thread pool for grpc-client-channel,
by default the underlying netty logic would use one dynamic unbounded cache threadpool.
The workload for this grpc threadpool is unseen.
Use ThreadpoolMgr to create one customized threadpool to get Prometheus-compatible metric data.
2023-04-13 20:09:26 +08:00
aa6b3cc537 [fix](planner)keep all agg functions if there is any virtual slots in group by list (#18630)
Because of the limitation of ProjectPlanner, we have to keep set agg functions materialized if there is any virtual slots in the group by list, such as 'GROUPING_ID' in the group by list etc.
2023-04-13 19:44:46 +08:00
40a352959d [Pipeline](exec) Support shared scan in colo agg (#18457) 2023-04-13 17:25:41 +08:00
99558153f5 [minor](Nereids): rename func and add TODO. (#18633) 2023-04-13 17:17:43 +08:00
b72c71dec0 [fix](stats) Analysis jobs didn't get persisted properly (#18602)
In previous implementation, Doris would only persist one task to tract analysis job status. After this PR, each task of column analysis would be persisted.And store a record which task_id is -1 as the job of the user submitted AnalyzeStmt.

AnalyzeStmt <---1-1---> AnalysisJob
AnalysisJob <---1-n---> AnalysisTask
2023-04-13 16:36:06 +08:00
2f64a8b387 [feature](GEO)Support read/write WKB/EWKB to gis types (#18526)
Support mutual conversion from wkb and gis types.also compatible with EWKB format
https://cwiki.apache.org/confluence/display/DORIS/DSIP-033%3A+More+GEO+functions
2023-04-13 16:25:18 +08:00
c4e9808382 [feature](multi-catalog) support trino jdbc catalog and jdbc external table (#18497) 2023-04-13 16:00:09 +08:00
Pxl
eb46bcb304 [Bug](materialized-view) fix match wrong index on some scan node (#18561)
fix match wrong index on some scan node
2023-04-13 11:50:14 +08:00
d57371da13 [feature](struct-type) support basic struct constructor function (#18190)
This commit will support struct and named_struct function.
2023-04-13 09:18:00 +08:00
af0cf0c050 [Fix](multi catalog)Refresh table object while refresh external table. (#18592)
Refresh table object while refresh external table. Including:
Refresh catalog, refresh database and refresh table.
Before visiting database, need to guarantee catalog has been initialized.
Before visiting table, need to guarantee catalog and database have been initialized.
2023-04-13 08:49:44 +08:00
a9f9366736 [fix](nereids) the data type of compareExpr and listQuery should be the same when creating InSubquery (#18539)
Consider sql

select table_B_alias.b from table_B_alias where table_B_alias.b in ( select a from table_A_alias );

if table_B_alias.b is int and table_A_alias.a is bigint,
we should cast(b as bigint) to make the data type the same as the InSubquery.
2023-04-12 20:02:37 +08:00
3cf4f49444 [FixBug](jdbc Catalog) fix sqlserver column type mapping (#18518)
For type int identity of sqlserver, the column type read from JDBC is called int indentity. So we need deal with this case.
2023-04-12 19:58:30 +08:00
edbe3e40b3 [fix](nereids) remove unused visitDateTimeV2Literal method (#18568)
BE supports date v2 literal and datetime v2 literal now, so remove visitDateTimeV2Literal method
2023-04-12 19:52:22 +08:00
09a4e9fd6b [enhancement](Nereids) Simplify the codes for runtime filter validation (#18571)
Since the goal of `ColumnStatistic#coverage` function is to determine whether the build side range is complete enclosed by the range of probe side, if so, as the comment of `RuntimeFilterPruner` explained, corresponding runtime filter might be thought as useless and get pruned.

Howerver, the original logic of this method is quite confused.

Simplify its logic by this formula:

```java
!(this.maxValue >= other.maxValue && this.maxValue <= other.maxValue)
```
2023-04-12 17:55:29 +08:00
db44970685 [feature](stats) Support sync analyze (#18567)
Gammer:

```
ANALYZE [SYNC] TABLE ....
```

Add this feature so that we could test and tune stats framework conveniently.
2023-04-12 17:49:30 +08:00
b93e04ab66 [test](Nereids) add regression test to check join order for tpch queries (#18543)
by explain shape plan command, with stats injection, we add regression test to check tpch queries' plan shape.
2023-04-12 15:43:21 +08:00
5dbc7e1c0e [fix](fe) add fe isReady check before getMasterIp (#18417)
when fe node is not ready, will get "" for master ip, and redirect will get error

---------

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-04-12 14:33:31 +08:00
75fd4b70fa [improve](fe)Optimize fe binary package packaging (#18554) 2023-04-12 12:58:45 +08:00
39a7a4cc55 [feat](Nereids): a new CBO rule: Eager Split/GroupByCount (#18556) 2023-04-12 12:13:06 +08:00
155e4e547b [pipeline](profile) Show each instance profile in FE (#18544) 2023-04-12 11:25:46 +08:00
cb644d5bc3 [feature](function) support any type in SQL function (#18392)
Add AnyType to Doris.
Support Inference function in fe SQL function.
2023-04-11 19:45:02 +08:00
876b4efdf1 [fix](nereids)remove redundant session Var ENABLE_NEREIDS_RUNTIME_FILTER (#18523)
remove redundant session Var ENABLE_NEREIDS_RUNTIME_FILTER
2023-04-11 18:48:54 +08:00
79cd50e1ff [enhancement](statistics) update semi/anti cardinality estimation algorithm (#18524) 2023-04-11 16:51:24 +08:00
25008bbf7f [feat](Nereids): a new CBO rule: Eager Count/GroupBy. (#18511) 2023-04-11 16:37:59 +08:00
0ef958f228 [enhancement](nereids) Forbid analyze view (#18522) 2023-04-11 16:11:06 +08:00
1b70db54df [ehancement](stats) Stats preheating as FE booted (#18502)
1. Support prefetch some column stats when FE booted, it would load column stats that was got updated recently according to the comment of PR #18460 from @morrySnow  
2. Refactor stats cache, split histogram cache from column stats, so that we could avoid some redundant query for column statistics table,for example, update the histogram or column stats only, in the previous implementation a united cache loader would send query request to both column stats table and histogram table, 
3. Extract some common logic to StatsUtil
4. Remove some useless codes in unit tests, those codes is hard to maintaince and it's not a good idea for testing the accurracy of stats estimation according to the advise from @englefly 
5. Add field type restriction when create analysis tasks to avoid unnecessary failure
2023-04-11 15:19:59 +08:00
bda1b42a4f [fix](streamload) timeout in query option not set properly (#18414) 2023-04-11 14:07:24 +08:00
5f981b0b1f [fix](catalog)Use hive-catalog-shade to solve thrift version compatibility issues (#18504)
`Hive 3` uses the `thrift-0.9.3` package, and `Doris` uses the `thrift-0.16.0` package.
These two packages are not compatible, so we use the `hive-sahde` package to manage hive dependencies
in a unified way. This jar package renames the `thrift` class , so the problem of conflict can be resolved.
2023-04-11 13:19:39 +08:00
e562017801 [feature](table-metadata) support altering the property "light_schema_change" for the tables which created before 1.2 (#17704) 2023-04-11 11:09:43 +08:00
c13f806e53 [Refactor](multi catalog)Split ExternalFileScanNode into FileQueryScanNode and FileLoadScanNode (#18342)
Split ExternalFileScanNode into FileQueryScanNode and FileLoadScanNode.
Remove some useless code in FileLoadScanNode.
Remove unused config item: enable_vectorized_load and enable_new_load_scan_node
2023-04-11 10:30:38 +08:00
101737023c [Bug](round) fix wrong scale for round-like function (#18507) 2023-04-11 09:36:59 +08:00
a6d25ef8d0 [Enhancement](Backup) support show create repository (#17299)
support show create repository stmt.
2023-04-11 00:11:00 +08:00
275d955762 [enhancement](audit) print Nereids flag to fe.audit.log (#18517) 2023-04-10 21:28:09 +08:00
e62286d44c [minor](fe) ignore expired alter job when replay, to save memory (#18508)
Skip expired alter job when replay
2023-04-10 18:37:27 +08:00
512718f629 [enhancement](Nereids)(planner) fix some problem in Nereids and legacy planner (#18280)
1. remove TypeCoercion and CharacterLiteralTypeCoercion
2. Nereids Cast do not relay on legacy planner's analyze()
3. fix below problem in legacy planner, after this PR
    a. BOOLEAN can cast to DECIMALV2 explicitly
    b. compare between BOOLEAN and DATE will cast both side to DOUBLE
    c. HLL cannot be implicitly cast to any other type
2023-04-10 18:25:33 +08:00
1470d37c42 [enhancement](Nereids) choose aggregate phase by group-by-key unique property (#18423)
when group-by-keys does not contain unique column
1. with out distinct: we prefer two phase aggregate to one phase aggregate
2. with distinct: we prefer three phase aggregate to two phase aggregate
2023-04-10 16:30:51 +08:00
9700721982 [feature-wip](resource-group) Support create and show resource groups (#18184) 2023-04-10 15:18:48 +08:00
9c900cb6d2 [fix](multi catalog) fix show catalogs after drop (#18481)
steps to repo:
1, create any catalog re; [OK]
2, switch re [OK]
3, show catalogs [OK]
4, drop catalog re [OK]
5, show catalogs [FAIL with "Current catalog is not exist, please switch catalog." ]

expect:
show catalogs should always be OK, not depends on current catalog.
2023-04-10 14:13:12 +08:00
2034d36816 [Fix](Nereids) runtime filter generation terminate incorrectly when visit NLJ (#18464)
if inner join implemented by NLJ, the runtime filter generation phase will be terminated and children are not be travelled. we fix it by adjust the order of travelling children and handle the node itself.
2023-04-10 13:05:03 +08:00
735cd15a3d [fix](nereids) PushdownAliasThroughJoin should handle same column with different alias in project list (#18470) 2023-04-10 11:50:37 +08:00
bb486d840e [fix](Nereids) use bottom up for SemiJoin Transpose (#18483) 2023-04-10 11:43:36 +08:00
31bd21437a [FE](mysql) support mysql protocol with precision and scale info for decimal type (#18277) 2023-04-10 10:52:00 +08:00
ea47a6ae59 [fix](hdfs) not setting hadoop username when kerberos enabled (#18485)
1. If we set hadoop user property along with kerberos info, the authentication will fail.
2. fix some minor issue of local fs, follow up #18397
3. Add KW_HOSTNAME to keywords region, follow up #17329
4. Fix tvf not working with pipeline engine, follow up #18376
2023-04-10 09:32:27 +08:00
be398bc258 [fix](catalog) fix NPE when replay from FE image (#18499)
Introduced from #17884.
When replay catalog from image, we should not call `catalog.getProperties()`.
Because it will visit the resource mgr, but resource mgr is not replayed yet.
2023-04-10 09:26:03 +08:00