Commit Graph

4437 Commits

Author SHA1 Message Date
fd4576e420 [Fix](auth) fix some problem of skip_localhost_auth_check in FE config #18996 2023-04-25 09:10:01 +08:00
efebb3d21e [fix](schema) fix show create table get wrong random distribution info (#18895)
* [fix](schema) fix show create table get wrong random distribution info


---------

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-04-24 23:33:42 +08:00
54d58364c1 [fix](Nereids): move SimplifyAggGroupBy before NormalizeAggregate. (#18918) 2023-04-24 19:00:27 +08:00
17e206c538 [Feature](resource-group) Support drop resource group (#18873) 2023-04-24 14:00:00 +08:00
6bf51150f3 [fix](nereids) remove unnecessary project above scan node (#18920)
1. remove unnecessary project node above scan node.
2. fix in subquery may be recognized as scalar subquery bug
3. fix some Quantile related functions' return type bug
2023-04-24 13:58:57 +08:00
d368326cc2 [fix](Nereids) should not fallback to legacy planner when execution failed (#18847) 2023-04-24 13:29:29 +08:00
22cdfc5970 [refactor](fs)(step1) add new storage file system (#18938)
PR1: add new storage file system template and move old storage to new package
PR2: extract some method in old storage to new file system.
PR3: use storages to access remote object storage, and use file systems to access file in local or remote location. Will add some unit tests.

---------

Co-authored-by: jinzhe <jinzhe@selectdb.com>
2023-04-24 11:41:48 +08:00
296b0c92f7 [Enhancement](compaction) stop tablet compaction when table dropped (#18702)
* [Enhancement](compaction) stop tablet compaction when table dropped

* fix be ut
2023-04-24 11:04:27 +08:00
8e4710079d [improvement](profile) Insert into add LoadChannel runtime profile (#18908)
TabletSink and LoadChannel in BE are M: N relationship,
Every once in a while LoadChannel will randomly return its own runtime profile to a TabletSink, so usually all LoadChannel runtime profiles are saved on each TabletSink, and the timeliness of the same LoadChannel profile saved on different TabletSinks is different, and each TabletSink will periodically send fe reports all the LoadChannel profiles saved by itself, and ensures to update the latest LoadChannel profile according to the timestamp.
2023-04-24 09:41:57 +08:00
d2f50ce3f5 [Fix](HttpServer) Chinese garbled characters appear when obtaining query plan (#18820)
When obtaining the query plan, the Chinese garbled characters in the predicate lead to incorrect data results.
2023-04-24 08:49:44 +08:00
2d7903e2bd [Feature](multi-catalog) support query hive views. (#18815)
A very simple implementation to query hive views, it is an EXPERIMENTAL feature.
We can try to parse the ddl of hive views and try to execute the query relies on the fact that HiveQL
is very similar to Doris SQL. But if the ddl of hive views use some complicated or incompatible grammar,
the query might fail.
2023-04-24 08:49:26 +08:00
1e7ef35741 [fix](Nereids) two phase read for topn only support simple case (#18955)
1. topn must has merge node
2. topn must the top node of plan
2023-04-23 21:32:23 +08:00
166bed11d4 [Enchancement](auth) Forbid to login doris from 127.0.0.1 without password (#18816)
* forbid to login from 127.0.0.1 without password

* add localhost limit

* rename
2023-04-23 13:56:31 +08:00
fd905b66b0 [refactor](jdbc) close datasource if no need to maintain the cache (#18724)
after pr #18670
could use jvm parameters to init jdbc datasource,
but when set JDBC_MIN_POOL=0, it can be immediately closed.
There is no need to wait for the recycling timer.
2023-04-22 22:07:34 +08:00
814f12981d [feat](Nereids): validate Project list. (#18868) 2023-04-22 12:32:51 +08:00
13894ae790 [fix](jdbc catalog) Use default value if the user does not set the pool parameter in be.conf #18919 2023-04-22 08:39:26 +08:00
b75f4c97f3 [function](string) support char function (#18878)
* [function](string) support char function

* fix
2023-04-22 08:36:48 +08:00
313fab0802 [fix](mtmv) fix mtmv thread interruption issue (#18884) 2023-04-21 22:27:13 +08:00
f7651d8dfb (fix)[olap] not support in_memory=true now (#18731)
* (fix)[olap] can not set in_memory=true now

---------

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-04-21 21:55:37 +08:00
0ae3a6df7e [bug](bdbje) Add retry for reSetupBdbEnvironment() restore.execute() (#18777)
* In reSetupBdbEnvironment() `restore.execute()` may throw NullPointerException,
  add retry for `restore.execute()`
2023-04-21 20:58:42 +08:00
317d9ee152 [feat](Nereids): Simplify Agg GroupBy (#18887) 2023-04-21 18:57:15 +08:00
af20b2c95e [Bug](topn opt) Fix be crash when enable topn opt with larger thresho… (#18858)
topn opt should be inited when update it
2023-04-21 17:45:00 +08:00
c72a46f3df [Improvement](bitmap-filter) enable bitmap runtime filter in fuzzy mode. (#17621) 2023-04-21 16:00:13 +08:00
ec1ab1a3d2 [Improve](GEO)wkb input and output are represented as hexadecimal strings And delete EWKB (#18721) 2023-04-21 15:11:18 +08:00
3007cd49f2 [enhancement](mysql) enable two-way ssl authentication (#18530)
According to the mysql-ssl, enable two-way SSL authentication.
2023-04-21 14:39:14 +08:00
c41b486e7e [fix](nereids) LogicalProject should always has non-empty project list (#18863) 2023-04-21 14:28:07 +08:00
0c26f8df4d [refactor](Nereids): move out misunderstanding func from JoinUtils (#18865) 2023-04-21 14:11:03 +08:00
063dfefd80 [fix](planner) Failed to create table with CTAS when multiple varchar type filed as key (#18814)
Add restricton for converting varchar/char to string type, only fields that is string type and not in key desc could be convert to string type now.
2023-04-21 13:33:35 +08:00
1a6401d682 [enchancement](statistics) support sampling collection of statistics (#18880)
1. Supports sampling to collect statistics
2. Improved syntax for collecting statistics
3. Support histogram specifies the number of buckets
4. Tweaked some code structure

---

The syntax supports WITH and PROPERTIES, using the same syntax as before.

Column Statistics Collection Syntax:
```SQL
ANALYZE [ SYNC ] TABLE table_name
     [ (column_name [, ...]) ]
     [ [WITH SYNC] | [WITH INCREMENTAL] | [WITH SAMPLE PERCENT | ROWS ] ]
     [ PROPERTIES ('key' = 'value', ...) ];
```

Column histogram collection syntax:
```SQL
ANALYZE [ SYNC ] TABLE table_name
     [ (column_name [, ...]) ]
     UPDATE HISTOGRAM
     [ [ WITH SYNC ][ WITH INCREMENTAL ][ WITH SAMPLE PERCENT | ROWS ][ WITH BUCKETS ] ]
     [ PROPERTIES ('key' = 'value', ...) ];
```

Illustrate:
- sync:Collect statistics synchronously. Return after collecting.
- incremental:Collect statistics incrementally. Incremental collection of histogram statistics is not supported.
- sample percent | rows:Collect statistics by sampling. Scale and number of rows can be sampled.
- buckets:Specifies the maximum number of buckets generated when collecting histogram statistics.
- table_name: The purpose table for collecting statistics. Can be of the form `db_name.table_name`.
- column_name: The specified destination column must be a column that exists in `table_name`, and multiple column names are separated by commas.
- properties:Properties used to set statistics tasks. Currently only the following configurations are supported (equivalent to the with statement)
   - 'sync' = 'true'
   - 'incremental' = 'true'
   - 'sample.percent' = '50'
   - 'sample.rows' = '1000'
   - 'num.buckets' = 10

--- 

TODO: 
- Supplement the complete p0 test
- `Incremental` statistics see #18653
2023-04-21 13:11:43 +08:00
ae76b59f2f [fix](external table) Use FederationBackendPolicy in Coordinator for ExternalScanNode #18860 2023-04-21 12:35:45 +08:00
b84bd156fb [enhancement](Nereids) two phase read for topn (#18829)
add two phase read topn opt, the legacy planner's PR are:
- #15642
- #16460
- #16848

TODO:
we forbid limit(sort(project(scan))) since be core when plan has a project on the scan.
we need to remove this restirction after we fix be bug
2023-04-21 12:05:22 +08:00
c6b1b9de80 [Improvement](broker) support broker load from tencent Goose File System (#18745)
Including below functions:
1. broker load
2. export
3. select into outfile
4. create repo and backup to gfs
after config env, use gfs like other hdfs system.
2023-04-20 23:12:17 +08:00
097dcf2119 [fix](outfile) unify broker and hdfs path in outfile (#18809)
unify broker and hdfs path in outfile
fix fe ut and add outfile case
2023-04-20 21:01:39 +08:00
94509e51af [fix](editLog) add sufficient replay logic and edit log for altering light schema change (#18746) 2023-04-20 19:20:03 +08:00
c4e469c82c [feature](agg) Support spill to disk in aggregation (#18051) 2023-04-20 18:59:08 +08:00
668c681fbc [Fix](Nereids) Check bound status in analyze straight after bounding (#18581)
Probleam:
Dead loop cause of keep pushing analyze tasks into job stack. When doing analyze process and generate new operators, the same analyze rule would be pushed again, so it cause dead loop. And analyze process generate new operators when trying to bound order by key and aggregate function.

Solve:
We need to make it throw exception before complex analyze and rewrite process, so checking whether all expressions being bound should be done twice. One is done after bounding all expression, another is done after all analyze process in case of generate new expressions and new operators.

Example:
Cases were put in file: regression-test/suites/nereids_p0/except/test_bound_exception.groovy
2023-04-20 18:50:13 +08:00
8e2146f48c [Enhencement](Export) support export with outfile syntax (#18325)
`Export` syntax provides asynchronous export function, but `Export` does not achieve vectorization.
`Outfile` syntax provides synchronous export function`.
So we can reimplement the export syntax with oufile syntax.
2023-04-20 17:27:04 +08:00
ea795b9909 [fix](nereids)disable SelectMaterializedIndexWithAggregate rule (#18380)
* [fix](nereids)disable SelectMaterializedIndexWithAggregate rule

* rebase code

* disable related test cases

* remove failed test cases for now
2023-04-20 17:02:36 +08:00
918a244068 [chore](pom) update apache pom to 29 (#18843) 2023-04-20 16:57:05 +08:00
c659e0bfc7 [Improvement](bloom filter) adjust bloom filter size (#18846) 2023-04-20 16:50:22 +08:00
3644dfa9fd [fix](Nereids) stddev functions not support decimalv3 type arg (#18840) 2023-04-20 14:54:12 +08:00
52d32cccad [enhance](Nereids): check cycle by getParentGroupExpressions(). (#18687) 2023-04-20 11:51:58 +08:00
3328a65b75 [Fix](mutli-catalog) Use decimal v3 type to fix decimal loss issue in multi-catalog module. (#18835)
Fix decimal v3 precision loss issues in the multi-catalog module.
Now it will use decimal v3 to represent decimal type in the multi-catalog module.
Regression Test: `test_load_with_decimal.groovy`
2023-04-20 11:02:53 +08:00
33d4c60570 [RegressionTest](fuzzy) enable set global enable_pipeline_engine (#18832)
enable set global enable_pipeline_engine
2023-04-20 10:38:11 +08:00
Pxl
c40860aba4 [Chore](thrift) generate thrift java code to make code analysis work well (#18793)
generate thrift java code to make code analysis work well
2023-04-19 19:33:17 +08:00
fb377a9da9 [Improvement](functions)Optimized some datetime function's return value (#18369) 2023-04-19 15:51:11 +08:00
1f5f5a12b6 [fix](Nereids): need update parentExpression after replace child. (#18771) 2023-04-19 15:13:42 +08:00
93b35bbfbf [feature](multi-catalog) add catalog comment and create time info (#18778)
add catalog comment and create time info
```
create catalog hms_ctl
comment 'your comment' 
properties (
'type'='hms',
'hive.metastore.uris' = 'thrift://xx:1234' );
```
Create Time will generate when the catalog is created.

use show catalogs and show create catalog to get these info.
2023-04-19 15:08:42 +08:00
1a25f110ec [Fix](planner)Fix TupleDescriptor include not materialized slot bug (#18783)
setOutputSmap function in ScanNode may include not materialized to outputTupleDesc. This PR is to fix this.
2023-04-19 14:08:09 +08:00
446db3def6 [opt](nereids) estimate broadcast cost by a new formula (#18744)
estimate broadcast cost by an experience formula: beNumber^0.5 * rowCount
1. sender number and receiver number is not available at RBO stage now, so we use beNumber
2. senders and receivers work in parallel, that why we use square of beNumber
2023-04-19 12:14:55 +08:00