Commit Graph

2212 Commits

Author SHA1 Message Date
12c21287a5 [docs](struct-type) Add docs for struct type (#19694) 2023-05-16 19:13:27 +08:00
325a1d4b28 [vectorized](function) support array_count function (#18557)
support array_count function.
array_count:Returns the number of non-zero and non-null elements in the given array.
2023-05-16 17:00:01 +08:00
9535ed01aa [feature](tvf) Support compress file for tvf hdfs() and s3() (#19530)
We can support this by add a new properties for tvf, like :

`select * from hdfs("uri" = "xxx", ..., "compress_type" = "lz4", ...)`

User can:

Specify compression explicitly by setting `"compression" = "xxx"`.
Doris can infer the compression type by the suffix of file name(e.g. `file1.gz`)
Currently, we only support reading compress file in `csv` format, and on BE side, we already support.
All need to do is to analyze the `"compress_type"` on FE side and pass it to BE.
2023-05-16 08:50:43 +08:00
e48524009d [doc](fqdn)fqdn doc en (#19634) 2023-05-16 08:48:34 +08:00
ac9e92e1aa [typo](docs) Optimize mac compilation documentation (#19629) 2023-05-15 20:34:47 +08:00
c87e78dc35 [bug](jsonb) fix jsonb query bug When the json key value contains "." (#19185)
Issue Number: close #19173

mysql> SELECT jsonb_extract('{"a.b.c":{"k1":"v31", "k2.a1": 300},"a":"opentelemetry"}', '$."a.b.c".k1');
+-------------------------------------------------------------------------------------------+
| jsonb_extract('{"a.b.c":{"k1":"v31", "k2.a1": 300},"a":"opentelemetry"}', '$."a.b.c".k1') |
+-------------------------------------------------------------------------------------------+
| "v31" |
+-------------------------------------------------------------------------------------------+
1 row in set (0.06 sec)
2023-05-15 15:43:12 +08:00
6748ae4a57 [Feature] Collect the information statistics of the query hit (#18805)
1. Show the query hit statistics for `baseall`

   ```sql
    MySQL [test_query_db]> show query stats from baseall;
    +-------+------------+-------------+
    | Field | QueryCount | FilterCount |
    +-------+------------+-------------+
    | k0    | 0          | 0           |
    | k1    | 0          | 0           |
    | k2    | 0          | 0           |
    | k3    | 0          | 0           |
    | k4    | 0          | 0           |
    | k5    | 0          | 0           |
    | k6    | 0          | 0           |
    | k10   | 0          | 0           |
    | k11   | 0          | 0           |
    | k7    | 0          | 0           |
    | k8    | 0          | 0           |
    | k9    | 0          | 0           |
    | k12   | 0          | 0           |
    | k13   | 0          | 0           |
    +-------+------------+-------------+
    14 rows in set (0.002 sec)

    MySQL [test_query_db]> select k0, k1,k2, sum(k3) from baseall  where k9 > 1 group by k0,k1,k2;
    +------+------+--------+-------------+
    | k0   | k1   | k2     | sum(`k3`)   |
    +------+------+--------+-------------+
    |    0 |    6 |  32767 |        3021 |
    |    1 |   12 |  32767 | -2147483647 |
    |    0 |    3 |   1989 |        1002 |
    |    0 |    7 | -32767 |        1002 |
    |    1 |    8 |    255 |  2147483647 |
    |    1 |    9 |   1991 | -2147483647 |
    |    1 |   11 |   1989 |       25699 |
    |    1 |   13 | -32767 |  2147483647 |
    |    1 |   14 |    255 |         103 |
    |    0 |    1 |   1989 |        1001 |
    |    0 |    2 |   1986 |        1001 |
    |    1 |   15 |   1992 |        3021 |
    +------+------+--------+-------------+
    12 rows in set (0.050 sec)

    MySQL [test_query_db]> show query stats from baseall;
    +-------+------------+-------------+
    | Field | QueryCount | FilterCount |
    +-------+------------+-------------+
    | k0    | 1          | 0           |
    | k1    | 1          | 0           |
    | k2    | 1          | 0           |
    | k3    | 1          | 0           |
    | k4    | 0          | 0           |
    | k5    | 0          | 0           |
    | k6    | 0          | 0           |
    | k10   | 0          | 0           |
    | k11   | 0          | 0           |
    | k7    | 0          | 0           |
    | k8    | 0          | 0           |
    | k9    | 1          | 1           |
    | k12   | 0          | 0           |
    | k13   | 0          | 0           |
    +-------+------------+-------------+
    14 rows in set (0.001 sec)
   ```

2. Show the query hit statistics summary for all the mv in a table

   ```sql
   MySQL [test_query_db]> show query stats from baseall all;
    +-----------+------------+
    | IndexName | QueryCount |
    +-----------+------------+
    | baseall   | 1          |
    +-----------+------------+
    1 row in set (0.005 sec)
   ```

3. Show the query hit statistics detail info for all the mv in a table

   ```sql
    MySQL [test_query_db]> show query stats from baseall all verbose;
    +-----------+-------+------------+-------------+
    | IndexName | Field | QueryCount | FilterCount |
    +-----------+-------+------------+-------------+
    | baseall   | k0    | 1          | 0           |
    |           | k1    | 1          | 0           |
    |           | k2    | 1          | 0           |
    |           | k3    | 1          | 0           |
    |           | k4    | 0          | 0           |
    |           | k5    | 0          | 0           |
    |           | k6    | 0          | 0           |
    |           | k10   | 0          | 0           |
    |           | k11   | 0          | 0           |
    |           | k7    | 0          | 0           |
    |           | k8    | 0          | 0           |
    |           | k9    | 1          | 1           |
    |           | k12   | 0          | 0           |
    |           | k13   | 0          | 0           |
    +-----------+-------+------------+-------------+
    14 rows in set (0.017 sec)
   ```

4. Show the query hit for a database

   ```sql
    MySQL [test_query_db]> show query stats for test_query_db;
    +----------------------------+------------+
    | TableName                  | QueryCount |
    +----------------------------+------------+
    | compaction_tbl             | 0          |
    | bigtable                   | 0          |
    | empty                      | 0          |
    | tempbaseall                | 0          |
    | test                       | 0          |
    | test_data_type             | 0          |
    | test_string_function_field | 0          |
    | baseall                    | 1          |
    | nullable                   | 0          |
    +----------------------------+------------+
    9 rows in set (0.005 sec)
   ```

5. Show query hit statistics for all the databases

   ```sql
    MySQL [(none)]> show query stats;
    +-----------------+------------+
    | Database        | QueryCount |
    +-----------------+------------+
    | test_query_db   | 1          |
    +-----------------+------------+
    1 rows in set (0.005 sec)
   ```
2023-05-15 10:56:34 +08:00
91d5e956a0 [typo](doc) Fixed typos in cluster-action.md (#19549) 2023-05-14 23:52:41 +08:00
80886af828 [doc](grant)add the version for grant for user; (#19556) 2023-05-14 23:52:18 +08:00
859b203b1d [typo](doc) Fixed typos in query-profile-action.md (#19552) 2023-05-14 23:51:58 +08:00
2b402483a9 add release shade and sdk doc (#19576) 2023-05-14 23:51:17 +08:00
f4aea2a6db [Doc](binlog-load) delete binlog-load doc side bar (#19593) 2023-05-14 23:50:55 +08:00
be0f4abc71 [doc](doris-future)Add doc for doris future (#19617) 2023-05-14 20:22:05 +08:00
f8ef25bb10 [enhancement](load) lazy-open necessary partitions when load (#18874) 2023-05-14 16:09:55 +08:00
cd9d633c1b [doc](multi-catalog)add properties converter docs (#18287)
update doc for #18005
2023-05-12 21:03:30 +08:00
26d1eb64d2 [Doc](statistics) add statistics documents (#19323)
The stats feature will continue to be refined, and the documentation will change over time.
2023-05-12 20:11:29 +08:00
feef5afa0b [typo](doc) Fixed typos in SHOW-ROUTINE-LOAD.md (#19573) 2023-05-12 14:37:28 +08:00
e8f1ce4eaa [typo](docs) fix doc bug of 'collect_list' and 'deploy' (#19531) 2023-05-11 16:53:29 +08:00
834bf2eab7 [feature](array) Add array_last lambda function (#18388)
Add array_last lambda function
2023-05-11 13:15:54 +08:00
41d4ed8367 [Improvement](multicatalog) support show_partitions for hms catalog (#19242)
* [Improvement](multicatalog) support show_partitions for hms catalog

* update according review advice
2023-05-11 01:17:23 +08:00
840dbdc7c0 [typo](docs) add comment of partition and key/value column (#19448)
* change docker compose to 'docker-compose'

* modify sql of mysql

* fix docker start and stop cmd

* new commit

* add comment of partition and key/value column

* Update cn doc format

---------

Co-authored-by: Luzhijing <82810928+luzhijing@users.noreply.github.com>
2023-05-11 01:14:17 +08:00
d20b5f90d8 [feature](executor) Automatically set the instance_num using the info from be. (#19345)
1. fixed some error regressions (results error with big nstance_num due to incorrect order by).
2. if set parallel_fragment_exec_instance_num to 0, the concurrency in the Pipeline execution engine will automatically be set to half of the number of CPU cores.
3. add limit to parallel_fragment_exec_instance_num that it cannot be set to more than fe.conf::max_instance_num(Default: 128)
```
mysql [(none)]>set parallel_fragment_exec_instance_num = 514;
ERROR 1231 (42000): errCode = 2, detailMessage = Variable 'parallel_fragment_exec_instance_num' can't be set to the value of '514(Should not be set to more than 128)'
```
2023-05-10 17:07:41 +08:00
0dd35c81b4 [docs](data-model):add sql statements to import data (#19390)
* [docs](data-model):add sql statements to import data
* [docs](data-model)synchronize documents in English
2023-05-10 17:06:50 +08:00
Pxl
9b7a419aed [Chore](build) update some doc about build enviroment (#19325)
update some doc about build enviroment
2023-05-10 16:18:44 +08:00
bdf54963ae Update query-analysis.md (#19456) 2023-05-10 16:05:51 +08:00
7631c82eff [typo](doc) Fixed typos in native-user-defined-function.md (#19459) 2023-05-10 16:05:30 +08:00
e1d8d2aa64 [typo](doc)optimize description of bitmap in materialized view document (#19464)
* [DOC]optimize descreption of bitmap in materialized view document

* Update materialized-view.md

---------

Co-authored-by: zhuwei <zhuwei8421@gmail.com>
Co-authored-by: Luzhijing <82810928+luzhijing@users.noreply.github.com>
2023-05-10 16:05:16 +08:00
e60129a28b [typo](doc) Fixed typos in variables.md (#19451)
* [typo](doc) Fixed typos in variables.md

* Update variables.md
2023-05-10 16:04:53 +08:00
a05dbd3f81 [chore](compile) Improves PCH cache hit ratio (#19469)
Supplement the documentation of be-clion-dev, avoid the problem of undefined DORIS_JAVA_HOME and inability to find jni.h when using clion development without directly compiling through build.sh
Complete the classification of header files in pch.h and introduce some header files that are not frequently modified in doris.
Separate the declaration and definition in common/config.h. If you need to modify the default configuration now, please modify it in common/config.cpp.
gen_cpp/version.h is regenerated every time it is recompiled, which may cause PCH to fail, so now you need to get the version information indirectly rather than directly.
2023-05-10 12:49:01 +08:00
096aa25ca6 [improvement](orc-reader) Implements ORC lazy materialization (#18615)
- Implements ORC lazy materialization, integrate with the implementation of https://github.com/apache/doris-thirdparty/pull/56 and https://github.com/apache/doris-thirdparty/pull/62.
- Refactor code: Move `execute_conjuncts()` and `execute_conjuncts_and_filter_block()` in `parquet_group_reader `to `VExprContext`, used by parquet reader and orc reader.
- Add session variables `enable_parquet_lazy_materialization` and `enable_orc_lazy_materialization` to control whether enable lazy materialization.
- Modify `build.sh` to update apache-orc submodule or download package every time.
2023-05-09 23:33:33 +08:00
7c7db9ce93 [typo](docs) Add an open page cache hint to the benchmark (#19449) 2023-05-09 21:28:39 +08:00
aeb3450151 [feature](graph)Support querying data from the Nebula graph database (#19209)
Support querying data from the Nebula graph database
This feature comes from the needs of commercial customers who have used Doris and Nebula, hoping to connect these two databases

changes mainly include:

* add New Graph Database JDBC Type
* Adapt the type and map the graph to the Doris type
2023-05-09 15:30:11 +08:00
f23e6dd8c1 [typo](doc)fix invalid url (#19398) 2023-05-08 22:59:50 +08:00
b11e937778 [typo](docs) fix the wrong description about cte with (#19403) 2023-05-08 22:59:34 +08:00
e08de52ee7 [chore](compile) using PCH for compilation acceleration under clang (#19303) 2023-05-08 19:51:06 +08:00
bc1bf420d1 [typo](docs) fix err to dynamic schema table doc (#19380) 2023-05-08 16:35:57 +08:00
4a65f8cad9 [doc](fix) compaction config param (#19368) 2023-05-08 16:34:47 +08:00
e5a6b002a3 fixed (#19329) 2023-05-08 14:24:40 +08:00
c7a04fa05a [improvement](JDBC Catalog)Added Presto connection to Presto/Trino (#19307) 2023-05-08 14:05:56 +08:00
1e5000c9b2 [typo](docs) fix err to mac local dev doc (#19367) 2023-05-08 14:05:33 +08:00
e78149cb65 [Enhencement](Export) add property for outfile/export and add test (#18997)
This pr does three things:
1. add `delete_existing_files` property for outfile/export. If `delete_existing_files = true`, export/outfile will delete all files under file_path first.
2. add p2 test for export
3. modify docs
2023-05-08 14:02:20 +08:00
05c5c5949c [refactor](FileCache) set FE session variable enable_file_cache=false as default (#19327)
Users should set `enable_file_cache=true` in FE session variables and BE configuration to enable file cache.
2023-05-08 13:53:51 +08:00
9203e0392f [typo](docs) add mac local dev docs (#19342)
* [typo](docs) add mac local dev docs
2023-05-06 22:58:40 +08:00
5bf1396efe [enhancement](load) merge single-replica related services as non-standalone (#18421) 2023-05-06 22:54:56 +08:00
f584ad52ca [UDF](demo) add new demo code for java udf (#19276) 2023-05-06 16:17:54 +08:00
ff6e0d3943 [Improvement](meta) support return no partition info for show_create_table (#19030)
Some tables have a mount of partitions, when use show create table stmt on them,
you will get so many lines of result that a whole screen cannot  show them all, even if you scroll up to the top.

show create table table2;
| table2 | CREATE TABLE `table2` (
  `k1` int(11) NULL COMMENT 'test column k1',
  `k2` int(11) NULL COMMENT 'test column k2'
) ENGINE=OLAP                                        
DUPLICATE KEY(`k1`, `k2`)
COMMENT 'test table1'          
PARTITION BY RANGE(`k1`)           
(PARTITION p01 VALUES [("-2147483648"), ("10")),
PARTITION p02 VALUES [("10"), ("100"))) 
 DISTRIBUTED BY HASH(`k1`) BUCKETS 1
PROPERTIES (                                                                                                                        
"replication_allocation" = "tag.location.default: 1",
"storage_format" = "V2",
"light_schema_change" = "true",
"disable_auto_compaction" = "false"
);


show brief create table table2;
| table2 | CREATE TABLE `table2` (  `k1` int(11) NULL COMMENT 'test column k1',
  `k2` int(11) NULL COMMENT 'test column k2'
) ENGINE=OLAP
DUPLICATE KEY(`k1`, `k2`)
COMMENT 'test table1'
DISTRIBUTED BY HASH(`k1`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"storage_format" = "V2",
"light_schema_change" = "true",
"disable_auto_compaction" = "false"
); |
2023-05-06 14:45:08 +08:00
1223f81228 [doc](flinkconnector) fix english doc #19315
Co-authored-by: wudi <>
2023-05-06 12:04:26 +08:00
34228ba805 [doc](release note) add 2.0.0 alpha1 release note (#19286) 2023-05-05 18:06:25 +08:00
70236adc1f [Refactor](doc)(config)(variable) use script to generate doc for FE config and session variables (#19246)
The document of configs(FE and BE) and session variables is hard to maintain.
Because developer need to modify both code and document.
And you can see that some of config's document is missing.

So I plan to write the document of config or variables directly in code, and using
script to generate document automatically.

How To
This CL mainly changes:

Add field in Config and Session Variables' annaotion

description: The description of the config or variable item. It is a String array. And first element is in Chinese, second is in English
options: the valid options if the config or variable is enum.
Add a scripts docs/generate-config-and-variable-doc.sh

Simple run sh docs/generate-config-and-variable-doc.sh and it will generate docs of FE config and variables,
And save it under docs/admin-manual/config/fe-config.md and docs/advanced/variables.md,
both in Chinese and in English.

And there are template markdowns for this script to read and replace with real doc content.

TODO
Too many description need to be filled. I will finish them in next PR. And now the origin doc remain unchanged.
Find a way to check the description field of config and variables, to make sure we won't missing it.
Generate doc for BE config.
2023-05-05 14:42:43 +08:00
525ede54cb [doc](fix)fix array_map doc tag wrong #19249 2023-05-05 12:44:46 +08:00