Commit Graph

13721 Commits

Author SHA1 Message Date
d8eb3ec6f7 fix set command example to enable_pipeline_engine (#17103) 2023-02-26 11:06:04 +08:00
14e80b18c8 Add csv file header filter documentation example (#17115) 2023-02-26 11:05:45 +08:00
32d08c9556 Update run-docker-cluster.md (#17116) 2023-02-26 11:05:28 +08:00
8e179d3a54 [minor][typo] fix typo in load-clickbench-data script (#17133) 2023-02-26 10:56:04 +08:00
3a9aa03aab [BugFix](oracle-catalog) Modify the doris data type mapping of oracle NUMBER(p,s) type (#17051)
The data type `NUMBER(p,s)` of oracle has some different of doris decimal type in semantics. 
For Oracle Number(p,s) type:
1. 
if s<0 , it means this is an Interger. This `NUMBER(p,s)` has (p+|s| ) significant digit,
and rounding will be performed at s position.
eg:  if we insert 1234567 into `NUMBER(5,-2)` type, then the oracle will store 1234500. In this case,
Doris will use
int type (`TINYINT/SMALLINT/INT/.../LARGEINT`).

2. if s>=0 && s<p , it just like doris Decimal(p,s) behavior.

3. if s>=0 && s>p, it means this is a decimal(like 0.xxxxx).
p represents how many digits can be left to the left after the decimal point,
the figure after the decimal point s will be rounded. eg: we can not insert 0.0123456 into `NUMBER(5,7)` type,
because there must be two zeros on the right side of the decimal point,
we can insert 0.0012345 into `NUMBER(5,7)` type. In this case, Doris will use `DECIMAL(s,s)`

4. if we don't specify p and s for `NUMBER(p,s)` like `NUMBER`,
the p and s of `NUMBER` are uncertain. In this case, doris can not determine p and s,
so doris can not determine data type.
2023-02-26 09:05:41 +08:00
f6ce072297 [Enhencement](csv-reader) Optimize csv_reader _split_value and fix json_reader case sensitive (#17093)
1. Enhencement:
    For single-charset column separator,csv_reader use another method of `split value`.
2. BugFix
    Set `json` file format loading to be sensitive.
2023-02-26 09:03:04 +08:00
c43e521d29 [feature](multi-catalog) support map&struct type in parquet&orc reader (#17087)
Support parsing map&struct type in parquet&orc reader.

## Remaining Problems
1. Doris use array type to build the key and value column of a `map`, but doesn't fill the offsets in value column, so the offsets in value column is wasted.
2. Parquet support reading only key or value column in `map`, this PR hasn't supported yet.
3. Parquet support reading partial columns in `struct`, this PR hasn't supported yet.
2023-02-26 08:55:39 +08:00
e42465ae59 [fix](OrcReader) handle null values in orc reader for string type (#17135)
Orc doesn't fill null values in new batch, but the former batch has been release.
Other types like int/long/timestamp... are flat types without pointer in them, 
so other types do not need to be handled separately like string.
2023-02-26 08:10:40 +08:00
50b423e09b [improvement](mysql) merge connect context and mysql channel and reduce send buffer memory (#17125) 2023-02-25 21:07:23 +08:00
e7f9819168 [chore](tools) Fix NoSuchMethodError while loading data by http requests (#17075)
When we used the tool multi-fe to start multiple FEs cluster and loaded data by stream load way,
the request failed. See the following log.

The issue was caused by the netty libraries.
There are multiple netty libraries in classpath and the FE used the newer version netty library which made these errors.
2023-02-25 12:28:35 +08:00
6eeba204f9 [Enhancement] path scan causes disk io to skyrocket (#16968) 2023-02-25 09:15:15 +08:00
c071c327e7 [fix](load) fix add broken tablet core dump (#17104) 2023-02-24 23:59:03 +08:00
4093ef9e4b [fix](auth) fix losing global priv bug and refactor default role name (#16966)
This PR mainly changes:

When upgrading from old version to master, the ADMIN_PRIV for normal user may be lost.
This may only happen if:

Create a user with ADMIN_PRIV privilege.
Upgrade Doris to v1.2.x or master before the meta image which contains the edit log in step 1 is generate.
And the ADMIN_PRIV will be lost in Global Privileges
This PR will rectify this bug and set ADMIN_PRIV to the right place

Refactor the user's implicit role name

In [feature](auth)Implementing privilege management with rbac model #16091, we refactor the Doris auth model by introducing RBAC. And each user will have an implicit role,
named with prefix default_role_rbac_. But it has wrong format like:
default_role_rbac_'default_cluster:user1'@'%'

This PR change the role name's format, like:

default_role_rbac_user1@%
default_role_rbac_user2@[domain]
NOTICE: this change may cause incompatible metadata, but since [feature](auth)Implementing privilege management with rbac model #16091 is not released, we should fix it soon.

Add a new session variable show_user_default_role

When set to true, it will show implicit role of user in the result of show roles stmt. Default is false
2023-02-24 23:36:53 +08:00
530b3b68bc [regression](mtmv) sleep a while to avoid table state not normal issue (#17012) 2023-02-24 23:35:55 +08:00
83e5ecdecc [fix](Nereids) use a threshold to check the equal double values in n-th rank (#17118)
The cost is inaccurate, so we use a threshold to check the equal double values
2023-02-24 22:12:47 +08:00
a90e11a025 [fix](regression case)fix regression case: test_materialized_view_struct #17122
this case missed
sql "ADMIN SET FRONTEND CONFIG ('enable_struct_type' = 'true');"
if enable_struct_type==false, the case will fail

Issue Number: close #xxx
2023-02-24 21:52:37 +08:00
Pxl
2db4a981b3 [Feature](Materialized-View) forbiden rename column on materialized view (#17030)
forbiden rename column on materialized view
2023-02-24 21:28:31 +08:00
c53b6a9532 [fix](Nereids) fix nullable() of lead/lag (#17014)
fix bug when we use NULL as default value for window function lead() and lag()
2023-02-24 21:27:44 +08:00
5f2dad29ca [enhancement](inverted index) Support inverted index without specified parser to use match query (#17110) 2023-02-24 20:34:55 +08:00
b5d67781a2 [Fix](function)fix datatime-diff function's overflow (#16935) 2023-02-24 20:06:06 +08:00
707160ab73 [fix](regression) fix regression test case of convert function (#17107) 2023-02-24 18:27:08 +08:00
54e68fe250 [feature](cooldown)add ut for CooldownConfHandler (#17007)
* add ut for CooldownConfHandler

* add ut for CooldownConfHandler

* add ut for CooldownConfHandler
2023-02-24 17:06:55 +08:00
Pxl
0691586eb7 [Chore](regression-test) add createMV action && add some mv case from fe ut MaterializedViewFunctionTest (#16825)
1. add createMV action
2. add some mv case from fe ut MaterializedViewFunctionTest
3. reduce mv scheduler interval time from 10s to 0.3s
2023-02-24 16:35:37 +08:00
cf5bc9594b [fix](planner) conjuncts of the outer query block didn't work when it's on the results expr of inline view (#17036)
Here is a cases:

select id, name
from (select '123' as id, '1234' as name, age from test_insert ) a
where name != '1234';
2023-02-24 15:27:34 +08:00
c39914c0a0 [feature](partition)add default list partition (#15509)
This pr implements the list default partition referred in related #15507.
It's similar as GreenPlum's default's partition which would store all data not satisfying prior partition key's
constraints and optimizer wouldn't filter default partition which means default partition would be scanned
each time you try to select data from one table with default partition.

User could either create one table with default partition or alter add one default partition.

```sql
PARTITION LIST(key) {
PARTITION p1 values in (xx,xx),
PARTITION DEFAULT
}

ALTER TABLE XXX ADD PARTITION DEFAULT
```

We don't support automatically migrate data inside default partition which meets newly added partition key's
constraint to newly add partition when alter add new partition. User should select default partition using new 
constraints as predicate and insert them to new partition.

```sql
insert into tbl select * from tbl partition default where partition_key=xx;
```
2023-02-24 15:24:59 +08:00
479d57df88 [fix](planner) the project expr should be calculated in join node in some case (#17035)
Consider the sql bellow:

select sum(cc.qlnm) as qlnm
FROM
  outerjoin_A
  left join (SELECT
      outerjoin_B.b,
      coalesce(outerjoin_C.c, 0) AS qlnm
    FROM
      outerjoin_B
      inner JOIN outerjoin_C ON outerjoin_B.b = outerjoin_C.c
  ) cc on outerjoin_A.a = cc.b
group by outerjoin_A.a;

The coalesce(outerjoin_C.c, 0) was calculated in the agg node, which is wrong.
This pr correct this, and the expr is calculated in the inner join node now.
2023-02-24 15:20:05 +08:00
7470198df6 [Docs](docs) Organize http documents (#16618)
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-02-24 15:17:01 +08:00
d562428b1d [enhancement](memory) reduce memory usage for failed broker loads (#16974)
Reduce more memory usage for failed broker load msg in fe after pr  #15895
2023-02-24 12:07:02 +08:00
03a4fe6f39 [enhancement](streamload) make stream load context as shared ptr and save it in global load mgr (#16996) 2023-02-24 11:15:29 +08:00
be047f11aa [BugFix](csv_reader) csv_reader support datev2/datetimev2 (#17031) 2023-02-24 11:13:48 +08:00
c3538ca804 [Enhancement](HttpServer) Add http interface authentication (#16571)
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-02-24 10:59:33 +08:00
a12b3c3f0c [fix](alter inverted index) fix incorrect CreateTime of 'show alter' query result after fe restart (#17043)
For add or drop inverted index, when replay the logModifyTableAddOrDropInvertedIndices will new a schema change job, that has a new CreateTime, here should new a schema change job when not replay log.
2023-02-24 10:25:48 +08:00
325757b411 [Fix](inverted index) fix memory leak when DorisCompoundReader strdup file name (#17062)
1. strdup(const char*) will copy a temporary char array.
2. std::string's copy construct will copy the temporary char array to std::string buffer.
3. finally the temporary char array will leak.
2023-02-24 10:15:04 +08:00
Pxl
03f4c7a94d [Doc](Materialized-View) update documentation about materialized view enhancement (#17025)
update documentation about materialized view enhancement
2023-02-24 10:06:35 +08:00
Pxl
c4edea5936 [Enchancement](function) refact and optimize some function register (#16955)
refact and optimize some function register
2023-02-24 10:05:11 +08:00
37b9b038c4 [typo](docs) fix Fix incorrect url address in export-manual.md. (#17072) 2023-02-24 09:42:28 +08:00
1cce5782a0 [typo](docs) collect doc md language annotation (#17090) 2023-02-24 09:41:54 +08:00
883f575cfe [fix](string function) fix wrong usage of iconv_open (#17048)
* [fix](string function) fix wrong usage of iconv_open

Also add test case for function convert

* fix test case
2023-02-24 09:13:10 +08:00
f49b0c6f39 add_conf_file_jdbc_drivers_dir (#17083) 2023-02-24 08:36:34 +08:00
ad81424603 Revert "[fix](merge-on-write) add check for segment num (#14032)" (#17058)
This reverts commit b7d2bec8ea3baaf8e4d52da5264f148ae827467b.
2023-02-23 21:18:31 +08:00
7229751bd9 [Improve](map-type) Add contains_null for map (#16948)
Add contains_null for map type.
2023-02-23 20:47:26 +08:00
c416bfbaef [typo](docs)fix disk format (#17050)
* change docker compose to 'docker-compose'

* modify sql of mysql

* fix docker start and stop cmd

* new commit

* markdown format adjust
2023-02-23 20:32:05 +08:00
92ecd16573 (feature)[DOE]Support array for Doris on ES (#16941)
* (feature)[DOE]Support array for Doris on ES
2023-02-23 19:31:18 +08:00
48fd528a2b [feature](Nereids) Add hint NTH_OPTIMIZED_PLAN to let the optimzier select n-th optimized plan (#16992)
Add hint NTH_OPTIMIZED_PLAN to let the optimzier can select n-th optimized plan. For example, you could use,

select /*+SET_VAR("nth_optimized_plan"=2) */ * from table;

to select the second-best plan in the optimizer.
2023-02-23 18:56:51 +08:00
e5f884a6fc [enhancement](cache) make segment cache prune more effectively (#17011)
BloomFilter in MoW table may consume lots of memory, and it's life cycle is same as segment. This patch try to improve the efficiency of recycling segment cache, to release the memory in time.
2023-02-23 18:24:18 +08:00
526a66e9fb [Function](array-type) support array_apply (#17020)
Filter array to match specific binary condition

```
mysql> select array_apply([1000000, 1000001, 1000002], '=', 1000002);
+-------------------------------------------------------------+
| array_apply(ARRAY(1000000, 1000001, 1000002), '=', 1000002) |
+-------------------------------------------------------------+
| [1000002]                                                   |
+-------------------------------------------------------------+
```
2023-02-23 17:38:16 +08:00
edead494cb [Enhancement](storage) add a new hidden column __DORIS_VERSION_COL__ for unique key table (#16509) 2023-02-23 15:47:17 +08:00
ad5022dd38 [regression-test](profile) add regression tests for query profile and insert profile (#16998) 2023-02-23 15:35:20 +08:00
52a731a2df fix compile error while use gcc12 (#17016)
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2023-02-23 15:07:31 +08:00
91fc9fae8e [Bug](complex-type) Fix is null predicate in delete stmt for array/struct/map type (#17018) 2023-02-23 15:06:49 +08:00