Commit Graph

10033 Commits

Author SHA1 Message Date
dba27a67bc [typo](docs) fix docs SHOW-COLUMNS.md (#18875) 2023-04-21 15:58:29 +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
2cc811bd54 [typo](docs)Fix explode_json_array document error (#18867) 2023-04-21 12:35:14 +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
fc63747f59 [improvement](test) remove set global (#18807) 2023-04-21 11:24:20 +08:00
8cc0af150a [Fix](dynamic table) fix dynamic table with insert into and column al… (#18808)
1. The num_rows should be correctly set
2. insert into has no dynamic column
2023-04-21 11:19:00 +08:00
Pxl
c033c6239f [Bug](table-function) fix wrong result when seprator of explode_split size more than one (#18824)
fix wrong result when seprator of explode_split size more than one
2023-04-21 11:00:47 +08:00
60640bdef0 [chore](cold_heat) fix cold heat case to use correct http api (#18870) 2023-04-21 10:43:52 +08:00
63a76ed115 [refactor](exceptionsafe) disallow call new method explicitly (#18830)
disallow call new method explicitly
force to use create_shared or create_unique to use shared ptr
placement new is allowed
reference https://abseil.io/tips/42 to add factory method to all class.
I think we should follow this guide because if throw exception in new method, the program will terminate.

---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-04-21 09:13:24 +08:00
5a0c1cb1b9 [typo](doc)Update materialized-view.md (#18826) 2023-04-21 09:12:42 +08:00
eb93afc614 [MemLeak](pipeline) fix mem leak by exchange node in pipeline (#18864) 2023-04-21 09:06:55 +08:00
b26e2d5d50 [bugfix](memoryleak) close expr after it is pushdown to storage layer (#18849) (#18852)
Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-04-21 05:21:16 +08:00
Pxl
9e64951721 [Chore](asan) set decrementOutputRecursionDepth to suppressions and remove some unu… (#18845)
18845
2023-04-20 23:33:25 +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
2c79f630fb change function version (#18811) 2023-04-20 23:10:39 +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
b2757c4d02 [test](fix) Fix invalid decimal type in regresion test cases (#18844) 2023-04-20 15:49:58 +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
ab9500bfa6 [optimize](string) optimize instr and locate function for constant arguments (#18692)
Optimize instr and locate function for constant arguments.

    instr and locate function constant arguments has 58%~200% performance improvement.
    refactor locate(substr, str, pos) as standardized arguments processing.
2023-04-20 10:40:19 +08:00
7c099c5747 [bugfix](be) Fix segment fault if the PID_DIR wasn't set (#18789)
Doris BE would crash if the PID_DIR wasn't set
2023-04-20 10:39:54 +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
293e115536 [Improvement](bloom filter) initialize bloom filter with adaptive size (#18785) 2023-04-20 10:06:40 +08:00
Pxl
908fbf92cf [Chore](build) ignore compile warning on orc && fix invalid command curdate on conf (#18810)
ignore compile warning on orc && fix invalid command curdate on conf
2023-04-20 10:03:40 +08:00
fa2a50f4c1 Update materialized-view.md (#18827) 2023-04-19 23:31:23 +08:00
e412dd12e8 [chore](build) Use include-what-you-use to optimize includes (PART II) (#18761)
Currently, there are some useless includes in the codebase. We can use a tool named include-what-you-use to optimize these includes. By using a strict include-what-you-use policy, we can get lots of benefits from it.
2023-04-19 23:11:48 +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
f280b04736 [regression-test](iceberg)add iceberg in regression case (#18792)
add iceberg 'in' clause regression case
for #18226
2023-04-19 15:09:20 +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
7d6b1a115a [feature](nereids)Tpc-h 1T plan shape check #18717
add regression test to check tpc-h 1T plan shape
2023-04-19 12:00:54 +08:00
15529afed8 [minor](decimal) forbid to create table with decimal type exceeds 18 (#18763)
* [minor](decimal) forbid to create table with decimal type exceeds 18

* update
2023-04-19 11:34:27 +08:00
0b379de602 [refactor](scan) optimize the agg function of count(1) (#18739) 2023-04-19 09:10:51 +08:00