Commit Graph

3135 Commits

Author SHA1 Message Date
6bf9bb2bfd [improvement](createtable)fix create table error msg in information_schema database (#18412)
---------

Co-authored-by: wudi <>
2023-04-09 18:11:46 +08:00
8a4a92f658 [Enchancement](compatible) show dateV2/datetimeV2 to date/datetime (#18358)
show dateV2/datetimeV2 to date/datetime

modify show create table
modify desc table
use desc table all to get real type from column ColumnType
2023-04-09 10:34:14 +08:00
60c0bbe272 [fix](profile) fix show load query profile (#18487)
Sometimes, `show load profile` will only show part of the insert opertion's profile.
This is because we assume that for all load operation(including insert), there is only one fragment in the plan.
But actually, there will be more than 1 fragment in plan. eg:

`insert into tbl1 select * from tbl1 limit 1` will have 2 fragments.

This PR mainly changes:

1. modify the `show load profile`
   Before:  `show load profile "/queryid/taskid/instanceid";`
   After: `show load profile "/queryid/taskid/fragmentid/instanceid";`

2. Modify the display of `ReadColumns` in OlapScanNode
    Because for wide table, the line of `ReadColumns` may be too long for show in profile.
    So I wrap it and each line contains at most 10 columns names.

3. Fix tvf not working with pipeline engine, follow up #18376
2023-04-09 08:41:18 +08:00
5aa58f5ce5 [Feature](multi-catalog) add refresh for catalog if it needs (#17884)
Currently if a catalog is modified externally in doris, doris is not dynamically aware of it.
So if a catalog is created with a refresh time configuration, I added a timer for it to refresh the catalog regularly.
2023-04-08 15:49:50 +08:00
25fba6b8b7 [fix](bdbje) handle RollbackException in BDBJEJournal.open (#18471)
reference:

handle bdb rollbackexception #6582
[fix](bdbje) fix handle bdb RollbackException incorrectly #17483
2023-04-08 15:31:24 +08:00
432fef7aa8 [Enhancement](iceberg table)support inPredicate for iceberg table (#18226) 2023-04-08 08:59:23 +08:00
5678708b7d [Fix](nereids) change setting byte size from translator to catalog generate scalar type (#18450)
Problem: when used nereids to generate scalarType, byteSize would be set. After switch the optimizer to planner, planner would reuse scalarType in some cases.
Fix: change byteSize setting from Plan translator to toCatalogDataType
2023-04-07 17:38:08 +08:00
8e8c5b5283 [feature](Nereids): deduplicate InPredicate. (#18428) 2023-04-07 16:22:21 +08:00
c5d9e8529a [enhancement](Nereids) adjust runtime filter parameters when enable pipeline engine (#18427)
when enable pipeline engine, we

1. reduce non-broadcast join bloom filter size
2. turn in or bloom filter to bloom filter if target is remote
2023-04-07 15:48:25 +08:00
63994e351f [fix](Nereids) extract complicated time string in evaluating cost model framework (#17864)
1. The time string in the profile can be "xx s xx ms". The framework should extract time with re package to support more complicated time string
2. Add stats for sortNode and AggNode in `withChildren`
2023-04-07 15:33:04 +08:00
b0a13d019f [fix](planner) enable fallback to legacy planner when execute internal query (#18353) 2023-04-07 15:15:49 +08:00
926c6056c7 [refactor](config) Delete the environment variable enable_vectorized_engine (#18166) 2023-04-07 14:23:16 +08:00
f42db08ccc [fix](Nereids) Fixed a problem with completing ClusterName (#18366) 2023-04-07 13:35:03 +08:00
b1956b42fb [enhancement](Nereids) disable heavy operator penalty in cost model v1 (#18422) 2023-04-07 13:16:59 +08:00
a7b708263d [fix](nereids) move validate data types before EliminateUnnecessaryProject rule (#18393)
validate supported data types checks if a project node's output contains any unsupported data types like array, map, etc in nereids. So this validation should run before EliminateUnnecessaryProject rule
2023-04-07 13:10:18 +08:00
2783b27788 [fix](Nereids): fix LogicalProject withXXX(). (#18441) 2023-04-07 12:38:53 +08:00
Pxl
e77da1519a [Enchancement](materialized-view) adjust desc table all display fields (#18357)
adjust desc table all display fields
2023-04-07 11:14:17 +08:00
Pxl
7631a8fb39 [Bug](materialized-view) fix mv define expr persistence replay incorrect after schema change (#18418)
fix mv define expr persistence replay incorrect after schema change
2023-04-07 11:11:55 +08:00
Pxl
267b690dad [Bug](materialized-view) fix materialized-view query match not consider with order by elements (#18384)
fix materialized-view query match not consider with order by elements
2023-04-07 11:11:18 +08:00
505f25c580 [fix](planner)use base index if the where clause is a constant value (#18367)
sql : select bitmap_empty() from d_table where true;
should always use base index instead of any mv, because the conjuncts is constant (true) and use none of the column from any mv
2023-04-07 09:15:00 +08:00
759f1da32e [Enhencement](Backends) add HostName filed in backends table and delete backends table in information_schema (#18156)
1.  Add `HostName` field for `show backends` statement and `backends()` tvf.
2. delete the `backends` table in `information_schema` database
2023-04-07 08:30:42 +08:00
22deeecbe1 [Improvement](multi catalog)Cache File for Hive Table, instead of cache file splits. (#18419)
Currently, the session variable for Split size will not take effect after the file splits are cached.
1. This PR is to cache file for Hive Table, instead of cache file splits. And split the file every time using the current split size.
2. Use self splitter by default.
2023-04-07 00:07:23 +08:00
981ead9032 [feature](Nereids) support binary arithmetic function (#18213)
support binary arithmetic functions like:

add(op1, op2) -> op1 + op2
subtract(op1, op2) -> op1 - op2
multiply(op1, op2) -> op1 * op2
divide(op1, op2) -> op1 / op2
mod(op1, op2) -> op1 % op2
2023-04-06 16:57:04 +08:00
33ae4524ce [fix](multi-catalog) Fix properties check in S3Storage and add hive socket timeout config (#18420)
Co-authored-by: jinzhe <jinzhe@selectdb.com>
2023-04-06 16:35:24 +08:00
27576ef8dc [fix](stats) Fix analyze table failed (#18386) 2023-04-06 15:45:09 +08:00
591f76a6a4 [fix](alter inverted index) Temporary deal with add or drop inverted index by directly schema change (#18378)
In the current implementation of the function of dynamically add and drop inverted index, there is a problem that the inverted index information of historical data is out of date after compaction on the base tablet.

In the future, I will submit PRs to solve this problem. Now, temporarily add or drop inverted index by the directly schema change logic
2023-04-06 15:07:37 +08:00
a474be6d03 [Bug](ES): Es object mapping error (#18382)
Issue Number: close #18379
2023-04-06 14:11:09 +08:00
db766bb073 [fix](planner) decimalv2 castTo decimalv2 should change type directly (#18297) 2023-04-06 13:51:50 +08:00
8b61709ec8 [feature](multi-catalog) support select current_catalog(); (#18163) 2023-04-06 12:06:10 +08:00
4ec6aa1691 [fix](planner) trying register constnat slotRef to table cause NPE (#18356)
could reproduced by:

CREATE TABLE t (
name varchar(128)
) ENGINE=OLAP
UNIQUE KEY(name)
DISTRIBUTED BY HASH(name) BUCKETS 1;

insert into t values('abc');

SELECT cd
FROM
(SELECT cast(now() as string) cd FROM t) t1
JOIN
(select cast(now() as string) td from t GROUP BY now()) t2
ON t1.cd = t2.td;

ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: null
2023-04-06 11:50:12 +08:00
9a916cffe4 [Optimization](String) Optimize the injection of statistics. #18401
1. Remove useless partition statistics injection.
2. Adding judgment logic to avoid exception during numerical transformation.
2023-04-06 11:42:11 +08:00
f73189860f [tpch](nereids) trustable join condition (#18272)
(affects tpch q14/7/9)
1. equation estimation confidence level
For equation, if any side is almost unique, its estimation confidence is high, we call it trustable condition.
if a join contains more than one un-trustable condition, we only use the one whose selectivity is biggest in order to avoid error propagation.

2. like expression estimation factor: 0.2
give a separate default shrink ratio for like operator, default ratio is 0.2

3. disable fat-child-penalty
set HEAVY_OPERATOR_PUNISH_FACTOR=1
this change affect tpch q15. This factor should be adaptive to the implementation of BE.
2023-04-06 11:20:47 +08:00
Pxl
76d76f672c [Chore](build) enchancement for backend build time usage (#18344) 2023-04-06 11:13:21 +08:00
d0219180a9 [feature-wip](multi-catalog)add properties converter (#18005)
Refactor properties of each cloud , use property converter to convert properties accessing fe
metadata and be data.
user docs #18287
2023-04-06 09:55:30 +08:00
60bad33e7e [fix](nereids) explain shape refactor #18399
previous pr 18296 has a bug when parse SHAPE_PLAN.
2023-04-06 08:55:05 +08:00
1ec400c786 [fix](SSL) fix ssl connection buffer overflow (#18359) 2023-04-05 08:42:41 +08:00
ea60d65384 [Improvement](multi catalog)Move split size config to session variable (#18355)
Move split size config to session variable. Before, it was in Config class, user need to restart FE after change it.
2023-04-05 01:02:47 +08:00
7f8d92656e [fix](streamload) fix stream load failed when enable profile (#18364)
#18015 enables stream load profile log,  however be will encounter rpc fail when loading tpch data(see #18291). This is because when `is_report_success` is true, be will reportExecStatus to fe, but fe cannot find QueryInfo in `coordinatorMap`, thus it will return error to be.
2023-04-05 01:01:46 +08:00
d8b293de07 [fix](multi-catalog) add catalog info for show proc (#18276)
Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-04-04 22:49:22 +08:00
7c36bef6bc [Feature-Wip](MySQL Load)Show load warning for my sql load (#18224)
1. Support the show load warnings for mysql load to get the detail error message.
2. Fix fillByteBufferAsync not mark the load as finished in same data load
3. Fix drain data only in client mode.
2023-04-04 22:44:48 +08:00
3fc8c19735 [improve](nereids)compute statsRange.length() according to the column datatype (#18331)
we map date/datetime/V2 to double. this map reserves date order, but it does not reserve range length.
For example, from 1990-01-01 to 1991-01-01, there are 12 months. for filter `A < 1990-02-01`, the selectivity
should be `1/12`.

if we compute this filter by their corresponding double value,
`sel = (19900201 - 19900101) / (19910101 - 19900101) = 100/10000 = 1/100`

the error is about 10 times.
This pr aims to fix this error.
Describe your changes.

Solution:
convert double to its corresponding dataType(date/datev2), then compute the range length with respect to its datatype.
2023-04-04 14:20:34 +08:00
6231ca80f7 [improve](clickhouse catalog) Add " wrap select column for the sql query clickhouse jdbc (#18352) 2023-04-04 10:19:24 +08:00
3e7a9424e4 [feature](nereids) explain shape plan (#18296)
`explain shape plan select ...`
only print plan shape related information, including
- node name
- join type, join condition
- filter condition
- agg phase

It is painful to maintain regression cases using explain since there are a lot of mutable information, like slot id.
By this pr, we could use explain shape plan in regression cases.

for exmaple:
this is tpch q2
+-----------------------------------------------------------------------------------------------------------+
| Explain String |
+-----------------------------------------------------------------------------------------------------------+
| PhysicalTopN |
| --PhysicalDistribute |
| ----PhysicalTopN |
| ------PhysicalProject |
| --------filter((cast(ps_supplycost as DECIMAL(27, 9)) = min(ps_supplycost) OVER(PARTITION BY p_partkey))) |
| ----------PhysicalWindow |
| ------------PhysicalQuickSort |
| --------------PhysicalProject |
| ----------------hashJoin[INNER_JOIN](supplier.s_suppkey = partsupp.ps_suppkey) |
| ------------------PhysicalProject |
| --------------------hashJoin[INNER_JOIN](part.p_partkey = partsupp.ps_partkey) |
| ----------------------PhysicalProject |
| ------------------------PhysicalOlapScan[partsupp] |
| ----------------------PhysicalProject |
| ------------------------filter((part.p_size = 15)(p_type like '%BRASS')) |
| --------------------------PhysicalOlapScan[part] |
| ------------------PhysicalDistribute |
| --------------------hashJoin[INNER_JOIN](supplier.s_nationkey = nation.n_nationkey) |
| ----------------------PhysicalOlapScan[supplier] |
| ----------------------PhysicalDistribute |
| ------------------------hashJoin[INNER_JOIN](nation.n_regionkey = region.r_regionkey) |
| --------------------------PhysicalProject |
| ----------------------------PhysicalOlapScan[nation] |
| --------------------------PhysicalDistribute |
| ----------------------------PhysicalProject |
| ------------------------------filter((region.r_name = 'EUROPE')) |
| --------------------------------PhysicalOlapScan[region] |
+-----------------------------------------------------------------------------------------------------------+
2023-04-04 09:44:15 +08:00
798d2e5160 [fix](catalog) all properties should be checked when create unpartitioned table (#18149)
all properties should be checked when create unpartitioned table like partitioned table.



Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-04-04 08:53:45 +08:00
8b85c55117 [vectorized](function) Support array_shuffle and shuffle function. (#18116)
---------

Co-authored-by: zhangyu209 <zhangyu209@meituan.com>
2023-04-04 08:53:13 +08:00
88c5e64c4a [fix](nereids) fix bug of SelectMaterializedIndexWithAggregate rule (#18265)
1. create a project node to adjust the output column position when a mv is selected in olap scan node
2. pass SlotReference's column info when call Alias's toSlot() method
3. should compare plan's logical properties when compare two plans after rewrite
2023-04-03 22:32:43 +08:00
96a64dc9e8 [Improvement](pipeline) Use bloom runtime filter by default for pipeline engine (#18177) 2023-04-03 15:31:48 +08:00
aff260c06f [Enhancement](HttpServer) Support https interface (#16834)
1. Organize http documents
2. Add http interface authentication for FE
3. **Support https interface for FE**
4. Provide authentication interface
5. Add http interface authentication for BE
6. Support https interface for BE
2023-04-03 14:18:17 +08:00
ecd3fd07f6 [feature](colocate) support cross database colocate join (#18152) 2023-04-03 14:03:42 +08:00
e260dca7a1 [Improvement](multi catalog)Change hive metastore cache split value type to Doris defined Split. Fix split file length -1 bug (#18319)
HiveMetastoreCache type for file split was Hadoop InputSplit. In this pr, change it to Doris defined Split
This change could avoid convert it every time.
Also fix the explain verbose result return -1 for split file length.
2023-04-03 13:54:28 +08:00