Commit Graph

4311 Commits

Author SHA1 Message Date
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
78cb4a8f56 [BugFix](backup) fix show backup with where clause (#17736)
1  show backup where SnapshotName="xxx";  
2. show backup where SnapshotName like "%XXX%"
2023-04-09 20:11:18 +08:00
266d54bb39 [Refine](sql block)unify exception catching for sql block (#17879)
currently, the AnalysisException throw by matchSql will catch immediately.
however, the AnalysisException throws by checkLimitations will catch as UserException.
2023-04-09 20:09:16 +08:00
d749c23bcd [Bugfix](backup) fix show snapshot issue (#17580)
when there is no snapshot, should no result shows.
2023-04-09 20:04:39 +08:00
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
09d98c1663 [BugFix](MTMV)Set enable_mtmv_scheduler_framework master only to avoid regression fail (#18473)
Set enable_mtmv_scheduler_framework master only to avoid regression fail
2023-04-09 08:47:18 +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