Commit Graph

4226 Commits

Author SHA1 Message Date
4d516bece8 [feature-wip](array-type)Add element_at and subscript functions (#8597)
Describe the overview of changes.
1. add function element_at;
2. support element_subscript([]) to get element of array, col_array[N] <==> element_at(col_array, N);
3. return error message instead of BE crash while array function execute failed;

element_at(array, index) desc:
>   Returns element of array at given **(1-based)** index. 
  If **index < 0**, accesses elements from the last to the first. 
  Returns NULL if the index exceeds the length of the array or the array is NULL.

Usage example:
1. create table with ARRAY type column and insert some data:
```
+------+------+--------+
| k1   | k2   | k3     |
+------+------+--------+
|    1 |    2 | [1, 2] |
|    2 |    3 | NULL   |
|    4 | NULL | []     |
|    3 | NULL | NULL   |
+------+------+--------+
```
2. enable vectorized:
```
set enable_vectorized_engine=true;
```
3. element_subscript([]) usage example:
```
> select k1,k3,k3[1] from array_test;
+------+--------+----------------------------+
| k1   | k3     | %element_extract%(`k3`, 1) |
+------+--------+----------------------------+
|    3 | NULL   |                       NULL |
|    1 | [1, 2] |                          1 |
|    2 | NULL   |                       NULL |
|    4 | []     |                       NULL |
+------+--------+----------------------------+
```
4. element_at function usage example:
```
> select k1,k3 from array_test where element_at(k3, -1) = 2;
+------+--------+
| k1   | k3     |
+------+--------+
|    1 | [1, 2] |
+------+--------+
```
2022-04-02 12:03:56 +08:00
8bb16bfeb3 [docs] minor update for broker load document (#8812)
[docs] minor update for broker load document
2022-04-02 10:56:04 +08:00
6c5bbc6e4c fix agg functions check failed from empty table (#8785)
fix agg functions check failed from empty table
2022-04-02 10:44:55 +08:00
3698176c40 use row_size as name of variable indicating rows rather than column_size (#8803)
use row_size as name of variable indicating rows rather than column_size
2022-04-02 10:38:16 +08:00
c31c6ae91a [improvement](storage) Add more detailed timer on SegmentIter in profile (#8768)
* [improvement](storage) Add more detailed timer on SegmentIter in profile

* add OutputColumnTime
2022-04-02 10:35:28 +08:00
5e908f5685 [doc] Update data-model-rollup.md (#8782)
* Update data-model-rollup.md
2022-04-02 10:35:02 +08:00
f3539cd3ba [refactor] remove useless code (#8773) 2022-04-02 10:28:16 +08:00
decdc8e8b9 [test][enhance][refactor] support suite block to specify multiple group, suppo… (#8792)
support suite block to specify multiple groups.
TestAction support compare result to iterator, local file and http stream.
support print teamcity service message.
abandon the logical: generate groovy file for sql file
support 3 levels parrallel: script file, suite block, thread action
support specify JAVA_OPTS for boot shell
avoid jvm metaspace oom
use -d to run the suite in some directories, instead of -g. and -g is used to specify groups
2022-04-01 20:59:01 +08:00
9f80f6cf5e [Improvement](Planner)Enable hash join project (#8618) 2022-04-01 15:42:25 +08:00
2730235e5b [typo](docs) update documentation (#8756) 2022-04-01 10:21:03 +08:00
eb68dd0bb5 [fix](ut) Fix be ut not work for byte_buffer_test2 and json_scanner_with_jsonpath_test (#8791) 2022-04-01 10:12:47 +08:00
f315fbd5ac [fix] vectorization decimal avg inconsistent (#8746) 2022-03-31 23:00:40 +08:00
71ac86b183 [improvement](join) Support join project in query engine (#8722) 2022-03-31 23:00:07 +08:00
6729d41c93 [improvement] add switch of quantile_state column (#8706)
Add switch for quantile_state column, default false.
2022-03-31 22:59:27 +08:00
2c774f5c79 [ubsan] avoid null bit offset to be 255 (#8675)
For now, invalid null bit offset is -1, but bit_offset in
NullIndicator is be of uint8_t, so invalid null bit offset
would be 255. Ubsan detects it.
2022-03-31 22:58:51 +08:00
Pxl
01cc0573aa [Bug][Vectorized] fix core dump with HLL and some refactor of Decompressor (#8668) 2022-03-31 17:05:08 +08:00
e684ffa6f5 [fix](compile) fix bug for StorageMediumPB type error (#8777) 2022-03-31 16:40:20 +08:00
71d050d0bc [improvement][test] (log)Add more error message on connect to hdfs failure, and corresponding ut (#8755)
I met a failure of reading hdfs files in broker load, the error message is unclear and
I spent a lot of time to locate the problem.

```
W0330 11:08:01.093812 2755268 broker_scan_node.cpp:364] Scanner[0] process failed. status=connect failed.
W0330 11:08:01.097682 2018787 fragment_mgr.cpp:234] Got error while opening fragment 712ae2b848324cb6-94a83d646173c1e9: Internal error: connect failed.
W0330 11:08:01.097702 2018787 tablet_sink.cpp:148] connect failed.
```

We should add more information when connect to hdfs failed.
2022-03-31 13:56:25 +08:00
b2a56e2ab2 fix_internal_queue_test_ut (#8754) 2022-03-31 13:54:05 +08:00
Pxl
d24735e95a [refactor] add some clang-tidy checks && some code style fix (#8752) 2022-03-31 13:53:41 +08:00
09409e4f96 [docs] update team.md (#8749) 2022-03-31 13:52:13 +08:00
d17ee7b476 [fix](sql-block-rule)Fix sql block rule bug (#8738)
1. Check properties' effectiveness of sql_block_rule, can't set limitations of sql_block_rule to be negative.
2. Optimize the judgment conditions when a query hits a sql_block_rule
3. Check if sql_block_rule has already exist when exec set property for "user" "sql_block_rule" = "xxx"
4. Add UT ad SqlBlockRuleMgrTest.java
2022-03-31 13:51:13 +08:00
82792726ab [ubsan] fix some ubsan complains on vector and pointer (#8733) 2022-03-31 13:50:25 +08:00
835cf1fe20 [fix](data-sink) Sinks call DataSink::close instead of operating _closed directly (#8727)
TabletSink::_is_closed is duplicated with DataSink::_closed and
all sinks should call DataSink::close rather than set _closed
directly.

Fix for https://github.com/apache/incubator-doris/issues/8726.
2022-03-31 12:36:33 +08:00
624e12c496 [test] add test case for issue #8690 (#8712) 2022-03-31 12:33:18 +08:00
9e3af471e5 [refactor] comment code converting decimal format (#8708)
The comment can help newbies read code much more quickly.
2022-03-31 12:32:49 +08:00
13b7af27b6 [refactor] remove useless code in DataTypeDecimal (#8707) 2022-03-31 12:30:35 +08:00
c02625efa9 [refactor][doc] Doris official website new version documentation (#8757)
I started a discussion on this before, you can check it in the mail group

https://lists.apache.org/thread/o770bc3k623kyfks2mzkt21qsc4g6328

In order to facilitate everyone to organize the documents, I created a new-docs directory under the incubator-doris directory. The new directory structure is below this. I just created a directory structure here, which needs to be rearranged.

In the data import scenario, in order to take into account the viewing habits of previous users, the import is organized in two ways:

1. According to the usage scenario: This will give users clearer guidance. For example, the user is the data source of kafka, then the user can directly select the routine to load
2. According to the import method: it is the introduction of the various import methods we provided before

In order to facilitate everyone to run and debug locally, I migrated the entire .vuepress under the original document. After completion, you only need to delete the original docs directory and rename the new new-docs directory to docs. At the same time, you can also run it locally, so that you can organize documents and know the content of each document directory.

In the local debugging execution, switch to the new-docs directory and execute the following command:

````
npm install
npm run dev
````
then through the browser
http://ip:port/zh-CN
http://ip:port/en
2022-03-31 12:01:02 +08:00
e63afc1a3c [feature-wip](remote storage)(step2) add storage_backend_mgr on BE side (#8663)
1. add storage backend mgr
2. remove env_remote
2022-03-31 11:13:14 +08:00
bf73ab69f2 [Bug] Fix DCHECK failed in runtime filter and mutable block (#8720)
Co-authored-by: lihaopeng <lihaopeng@baidu.com>
2022-03-31 11:13:05 +08:00
3a8ca80eab [fix](doc) fix typo for show tablets command (#8740) 2022-03-30 10:22:00 +08:00
b98da02611 [chore][fix](httpv2) Use mariadb-java-client for http query api (#8716)
In #8319, I remove mysql-connector-java dependency because of license incompatibility.
But we need a mysql compatible driver for http query api. So I choose mariadb-java-client,
which is under LGPL.
2022-03-30 09:59:45 +08:00
76e0634030 [fix](ut) fix be ut in olap (#8739) 2022-03-30 09:53:21 +08:00
ba91b44553 [fix](load) fix bug that NodeChannel can not be destroyed ontime (#8705)
After the ReusableClosure is reset, we can not call join() method, or it will blocked forever.
2022-03-30 09:52:11 +08:00
46e1b05490 [refactor] Fix some code comments typo and cleanup unused include (#8684) 2022-03-30 09:51:48 +08:00
22cf6ea17c [chore] Modify build.sh and refactor dependency of FE submodules (#8732)
This PR fixes the #8731 and refactor the `build.sh` script.

The build.sh script is currently responsible for the compilation of the following Doris components.
1. FE
    - fe-common
    - fe-core
    - spark-dpp
    - hive-udf
    - java-udf
    - ui
2. BE
    - palo_be
    - meta_tool
3. broker

In the FE module.
- The 4 submodules `fe-common, fe-core, spark-dpp and ui` together form Frontend.
- `spark-dpp, hive-udf and java-udf` can be compiled separately to produce jar packages for individual use.

In the BE module.
- `palo_be` can start the BE process separately.
- `meta_tool` can be compiled separately to produce binaries.

The modified build.sh script has the following changes:

1. there is no longer an option to compile `ui` separately, build together with `--fe`.
2. `fe/be/spark-dpp/hive-udf/java-udf/palo_be/meta_tool` can be compiled separately.
3. all components except `java-udf` will be compiled by default (`java-udf` is in development)

Remaining issues:

Several submodules of FE have messy dependencies.
For example, `java-udf` depends on `fe-core`, and `fe-core` depends on `spark-dpp`,
resulting in a large binary jar of `java-udf`.
It needs to be reorganized afterwards.
2022-03-30 00:13:24 +08:00
3724f94728 [refactor][optimize](storage) Code optimization and refactoring for low-cardinality columns in storage layer (#8627)
* Optimize predicate calculation and refactor
2022-03-29 19:11:54 +08:00
3f5bc5206d [Improvement] broker load with hdfs support wildcard (#8718)
broker load with hdfs support wildcard
2022-03-29 18:21:41 +08:00
1ddfe20950 fix typo (#8714)
fix typo
2022-03-29 18:21:16 +08:00
92b95e1f57 [doc] Update VARCHAR.md (#8703)
* Update VARCHAR.md
2022-03-29 18:20:30 +08:00
23155e0f37 [typo] Fix runtime filter docs (#8702)
Fix runtime filter docs
2022-03-29 18:20:09 +08:00
c7bdf3e7c1 [doc] Update flink-doris-connector.md (#8696)
* Update flink-doris-connector.md
2022-03-29 18:19:47 +08:00
da87e0c4ee optimize create tpch table statments to achieve higher performance (#8683)
optimize create tpch table statments to achieve higher performance
2022-03-29 18:19:22 +08:00
b20af5ffa2 [Vectorized][refactor] refactor stddev/variance agg functions (#8660)
* [Vectorized][refactor] refactor stddev agg functions
2022-03-29 18:18:06 +08:00
Pxl
a9d185fcc4 [Enhancement] add clang-tidy config && add C++ Code Diagnostic document (#8642)
add clang-tidy config && add C++ Code Diagnostic document
2022-03-29 18:17:09 +08:00
8d2d8893d3 [fix] Fix a typo caused by a refactoring (#8724) 2022-03-29 16:37:17 +08:00
ba933d1e5e [refactor](storage_engine) Remove mem tablet from be (#8694) 2022-03-29 15:06:40 +08:00
66a3c574df [Vectorized][Bug] fix percentile_approx function to return always nullable (#8572) 2022-03-29 14:47:39 +08:00
23b348456b [Bug] Read bitmap/hll column failed for storage layer vectorization (#8560)
* fix bitmap error

* Update be/src/olap/rowset/segment_v2/segment_iterator.cpp

Co-authored-by: Mingyu Chen <morningman.cmy@gmail.com>

Co-authored-by: Wang Bo <wangbo36@meituan.com>
Co-authored-by: Mingyu Chen <morningman.cmy@gmail.com>
2022-03-29 14:18:59 +08:00
0d43f8e130 [refactor] remove atomic.h/cpp use std::atomic instead (#8693) 2022-03-29 12:41:41 +08:00