Commit Graph

5948 Commits

Author SHA1 Message Date
51e210869a [ARM64] Fix some problem when compiling on ARM64 platform (#6836) (#6872)
With thirdparties 1.4.0 to 1.4.1

1. Add patch for aws-c-cal-0.4.5
2. Add some solutions for `undefined reference libpsl`
3. Move libgsasl to fix link problme of libcurl.
4. Downgrade openssl to 1.0.2k to fix problem of low version glibc
2021-10-19 13:26:02 +08:00
bd25d1a828 [Doc] Add documents for MySQL Binlog Load (#6859)
* add zh-CN docs

* add en docs and image

* fix

* fix
2021-10-19 10:25:42 +08:00
e96882f6c5 Update materialized_view.md (#6867) 2021-10-19 10:24:38 +08:00
fbd75c88d0 [Docs] Fix exporter document error (#6864)
* fix exporter document error

* update en doc
2021-10-19 10:24:08 +08:00
63dbcbc4e1 [UT] Fix ut bugs (#6862)
Co-authored-by: morningman <chenmingyu@baidu.com>
2021-10-18 10:12:55 +08:00
da99749e7f [Bug] Fix bug that BE will crash when backup using S3 (#6855) 2021-10-17 22:54:42 +08:00
bb2b29c64f [Doc] Add type BOOLEAN when enter 'help create table' in mysql client (#6852)
some user do not know Doris support type boolean, they use TINYINT,
so i add type BOOLEAN when enter 'help create table' in mysql client.

currently, type BOOLEAN size is 1 byte, but the value of boolean column only in {0,1} ,
which waste some memory, and i want change it's implement to 1 bit in the future.
2021-10-17 22:54:12 +08:00
bc069eac8b [BUG] fix bug for schema schange (#6839)
This commit has an error:
#6791
when you only change the order of column, error will apear.
2021-10-17 22:53:28 +08:00
eff076b355 [BUG] Fix printing ReservationTrackerCounters cause BE crash when mem_limit is reached (#6849)
When the memory usage of BE reaches mem_limit, printing ReservationTrackerCounters through MemTracker
may cause BE crash in high concurrency.

ReservationTrackerCounters is not actually used in the current Doris, and the memory tracker in Doris
will be redesigned in the future.
2021-10-16 21:57:09 +08:00
59017cebe6 [ARM64] Fix some problem when compiling on ARM64 platform (#6836)
1. Refactor the create method of hdfs reader & writer.

    libhdfs3 does not support arm64. So we should not support hdfs reader & writer on arm64.

2. And micro for LowerUpperImpl
2021-10-16 21:56:49 +08:00
4cc01892f6 [SQL Cache] Add all view stmt as the suffix of cache sqlkey (#6832)
Use all view stmt as the cache sqlkey suffix, so that when the view is modified, the cache can recognize.
2021-10-16 21:56:24 +08:00
a0b3840daa [MemerySave] Change TabletSchema in tablet to reference to save mem (#6814)
Change TabletSchema in tablet to reference to save memory
2021-10-16 21:54:32 +08:00
8baded8a0e [BUG] Key is 'True',Extra is 'NONE' when add rollup for DUP table (#6763)
fix #6762

The result is displayed after the repair

```
mysql> desc test2 all;
+-----------+---------------+-------+---------------+------+-------+---------+-------+---------+
| IndexName | IndexKeysType | Field | Type          | Null | Key   | Default | Extra | Visible |
+-----------+---------------+-------+---------------+------+-------+---------+-------+---------+
| test2     | DUP_KEYS      | a     | BIGINT        | Yes  | true  | NULL    |       | true    |
|           |               | b     | BIGINT        | Yes  | true  | NULL    |       | true    |
|           |               | c     | BIGINT        | Yes  | false | NULL    | NONE  | true    |
|           |               | d     | BIGINT        | Yes  | false | NULL    | NONE  | true    |
|           |               | e     | VARCHAR(1024) | Yes  | false | NULL    | NONE  | true    |
|           |               | f     | VARCHAR(1024) | Yes  | false | NULL    | NONE  | true    |
|           |               |       |               |      |       |         |       |         |
| r1        | DUP_KEYS      | c     | BIGINT        | Yes  | true  | NULL    |       | true    |
|           |               | e     | VARCHAR(1024) | Yes  | true  | NULL    |       | true    |
|           |               | a     | BIGINT        | Yes  | false | NULL    | NONE  | true    |
+-----------+---------------+-------+---------------+------+-------+---------+-------+---------+

```
2021-10-16 21:54:00 +08:00
607eef8d4d [Doc] Update compile docs add 0.15 build support. (#6850) 2021-10-15 18:37:24 +08:00
24d38614a0 [Dependency] Upgrade thirdparty libs (#6766)
Upgrade the following dependecies:

libevent -> 2.1.12
OpenSSL 1.0.2k -> 1.1.1l
thrift 0.9.3 -> 0.13.0
protobuf 3.5.1 -> 3.14.0
gflags 2.2.0 -> 2.2.2
glog 0.3.3 -> 0.4.0
googletest 1.8.0 -> 1.10.0
snappy 1.1.7 -> 1.1.8
gperftools 2.7 -> 2.9.1
lz4 1.7.5 -> 1.9.3
curl 7.54.1 -> 7.79.0
re2 2017-05-01 -> 2021-02-02
zstd 1.3.7 -> 1.5.0
brotli 1.0.7 -> 1.0.9
flatbuffers 1.10.0 -> 2.0.0
apache-arrow 0.15.1 -> 5.0.0
CRoaring 0.2.60 -> 0.3.4
orc 1.5.8 -> 1.6.6
libdivide 4.0.0 -> 5.0
brpc 0.97 -> 1.0.0-rc02
librdkafka 1.7.0 -> 1.8.0

after this pr compile doris should use build-env:1.4.0
2021-10-15 13:03:04 +08:00
adb9b0d9c6 [Bug] Return 0 when hex(0) (#6837) 2021-10-15 10:18:55 +08:00
fcd15edbf9 [Export] Support export job with label (#6835)
```
EXPORT TABLE xxx
...
PROPERTIES
(
    "label" = "mylabel",
    ...
);
```

And than user can use label to get the info by SHOW EXPORT stmt:
```
show export from db where label="mylabel";
```

For compatibility, if not specified, a random label will be used. And for history jobs, the label will be "export_job_id";

Not like LOAD stmt, here we specify label in `properties` because this will not cause grammatical conflicts,
and there is no need to modify the meta version of the metadata.
2021-10-15 10:18:11 +08:00
58440b90f0 [Bug] Left() string function behaves not identically to the mysql implementation (#6811)
See Fix #6810
2021-10-15 10:17:21 +08:00
05e59f6487 [Improvement] fix typo (#6831) 2021-10-14 14:22:53 +08:00
Wei
80c4007a34 [Refactor] Refactor ConnectProcessor's code doc and unused code (#6823)
Co-authored-by: wei.zhang2 <wei.zhang2@dmall.com>
2021-10-13 11:44:29 +08:00
3ff63fef99 [Bug] Select outfile failed after query stmt being rewritten. (#6816) 2021-10-13 11:44:01 +08:00
5d3ebad836 modify comments of DropPartitionClause (#6812)
Co-authored-by: qzsee <shizhiqiang03@meituan.com>
2021-10-13 11:40:19 +08:00
cfeb515f5e [Enhancement] add spark load config spark_load_checker_interval_second (#6809)
the internal seconds for spark load to check and update etl job status, 60 seconds for default

Co-authored-by: weixiang <weixiang06@meituan.com>
2021-10-13 11:39:51 +08:00
5ef3f59928 [Optimize][RoutineLoad] Avoid sending tasks if there is no data to be consumed (#6805)
1 Avoid sending tasks if there is no data to be consumed
By fetching latest offset of partition before sending tasks.(Fix [Optimize] Avoid too many abort task in routine load job #6803 )

2 Add a preCheckNeedSchedule phase in update() of routine load.
To avoid taking write lock of job for long time when getting all kafka partitions from kafka server.

3 Upgrade librdkafka's version to 1.7.0 to fix a bug of "Local: Unknown partition"
See offsetsForTimes fails with 'Local: Unknown partition' edenhill/librdkafka#3295

4 Avoid unnecessary storage migration task if there is no that storage medium on BE.
Fix [Bug] Too many unnecessary storage migration tasks #6804
2021-10-13 11:39:01 +08:00
Wei
e547e77f86 Fix variable dbName that is never used (#6802)
Co-authored-by: wei.zhang2 <wei.zhang2@dmall.com>
2021-10-13 11:37:58 +08:00
32f6dec80f fix dup table don't schema schange (#6791)
Co-authored-by: qzsee <shizhiqiang03@meituan.com>
2021-10-13 11:37:39 +08:00
6a058792af [Feature][Step1] Support lateral view FE part (#6745)
* [Feature] Support lateral view

The syntax:
```
select k1, e1 from test lateral view explode_split(k1, ",") tmp as e1;
```
```explode_split``` is a special function of doris,
which is used to separate the string column according to the specified split string,
and then convert the row to column.
This is a conforming function of string separation + table function,
and its behavior is equivalent to explode in hive ```explode(split(string, string))```

The implement:
A tablefunction operator is added to the implementation to handle the syntax of the lateral view separately.
The query plan is following:
```
MySQL [test]> explain select k1, e1 from test_explode lateral view explode_split (k2, ",") tmp as e1;
+---------------------------------------------------------------------------+
| Explain String                                                            |
+---------------------------------------------------------------------------+
| PLAN FRAGMENT 0                                                           |
|  OUTPUT EXPRS:`k1` | `e1`                                                 |
|                                                                           |
|   RESULT SINK                                                             |
|                                                                           |
|   1:TABLE FUNCTION NODE                                                   |
|   |  table function: explode_split(`k2`, ',')                             |
|   |                                                                       |
|   0:OlapScanNode                                                          |
|      TABLE: test_explode                                                  |
+---------------------------------------------------------------------------+
```

* Add ut

* Add multi table function node

* Add session variables 'enable_lateral_view'

* Fix ut
2021-10-13 11:37:12 +08:00
ad949c2f65 Optimize Hex and add related Doc (#6697)
I tested hex in a 1000w times for loop with random numbers,
old hex avg time cost is 4.92 s,optimize hex avg time cost is 0.46 s which faster nearly 10x.
2021-10-13 11:36:14 +08:00
6cbefa9f10 [Docs] Update materialized view document (#6710)
* [Docs] Update materialized view document
2021-10-13 11:35:23 +08:00
630e273d94 use segmentV2 as default storage format for old tables using storage format 'DEFAULT' (#6807) 2021-10-13 11:34:40 +08:00
30bf6c0d1d [DOC] minor update (#6820) 2021-10-13 09:14:56 +08:00
a6e905eae9 [Revert] "[Bug] When using view, make toSql method generates the final sql (#6736)" (#6793)
This reverts part of commit 11ec38dd6fd9f86632d83c47bd9d8bc05db69a2b(#6736)
Because it will cause view query problem described in #6792 

The following bug fix kept:
1. Fix the problem that the WITH statement cannot be printed when UNION is included in SQL
2021-10-11 10:29:50 +08:00
f439e5e533 [Doc] Documentation error (#6797)
Documentation error
2021-10-10 23:08:16 +08:00
ea17682d1f [Typo] Correct misspellings in SparkDpp (#6789)
Correct misspellings in SparkDpp
2021-10-10 23:07:39 +08:00
Wei
979df5635f [Code Refactor] Remove unnecessary return statement (#6786)
Co-authored-by: wei.zhang2 <wei.zhang2@dmall.com>
2021-10-10 23:07:18 +08:00
Wei
a679d04b3b [Typo] Modify code description (#6785)
Co-authored-by: wei.zhang2 <wei.zhang2@dmall.com>
2021-10-10 23:06:53 +08:00
bd19491b5b [Doc] Modify the description of dynamic partition hot partition (#6764)
Modify the description of dynamic partition hot partition
2021-10-10 23:06:14 +08:00
675aef7d75 [AliasFunction] Add support for cast in alias function (#6754)
support #6753
2021-10-10 23:05:44 +08:00
0941322dd6 [Optimiaze] Optimize HyperLogLog (#6625)
1. Replace std::max with a ternary expression, std::max is much heavier than the ternary operator
2. Replace std::set with arrays, std::set is based on red-black trees, traversal will follow the chain domain, and cache hits are not good
3. Optimize the serialize function, improve the calculation speed of num_non_zero_registers by reducing branches, and the serialization of _registers after optimization is faster
4. The test found that the performance improvement is more obvious
2021-10-10 23:04:39 +08:00
4232f787ad [Doc] datax doriswriter use case (#6612)
datax doriswriter use case
2021-10-10 23:03:12 +08:00
237a8ae948 [Feature] support spark connector sink data using sql (#6796)
Co-authored-by: wei.zhao <wei.zhao@aispeech.com>
2021-10-09 15:47:36 +08:00
9e67b3a392 [Bug] Fix bug that replayCreateLoadJob will cause fe memory leak in non master node because InsertLoadJob cannot be removed from TxnStateCallbackFactory (#6795) 2021-10-08 13:17:22 +08:00
53fed2d35e [BUG] Fix the bug of query in expr (#6767) (#6768) 2021-10-05 12:26:10 +08:00
5f3559a94c [Bug][Binlog] Fix Bug that multiple sync jobs can connect to the same canal instance (#6756)
When creating sync jobs, we should ban that different jobs can connect to the same canal instance,
or else these jobs will compete with each other for the data produced by the same canal instance,
which may cause data inconsistency.
2021-10-03 12:21:06 +08:00
8cf7ff78df [Bug] big_int * big_int product overflow (#6788)
while query with multi where conditions, such as `where dt in (20210926,20210919) and hour<=13`,
will cause int * int product overflow result. and then in the function extend_scan_key will call 
`range.convert_to_fixed_value()` mistakenly. And for a big `range[_low_value, _high_value)`,
mass value will be inserted into _fixed_values, result in oom finally.
2021-10-03 12:17:03 +08:00
7297b275f1 [Optimize] Optimize cpu consumption when importing parquet files (#6782)
Remove part of dynamic_cast, reduce the overhead caused by type conversion,
and probably reduce the cpu consumption of parquet file import by about 10%
2021-10-03 12:14:35 +08:00
fb7fc27a0a [Bug] Fix duplicate result in colocated agg node (#6727)
Fixed #6726

If the plan fragment contains colocated agg plan node, it will be a colocated fragment.
The scan range and backend id of colocated fragment instance should be different from ordinary scheduler logic.
Tablets in the same bucket must fall on the same be.
For example, for the same bucket in different partitions,
even though the tablet id is different, they must be scheduled to the same be for scan node.
2021-10-03 11:59:38 +08:00
83003cc372 [Thirdparty] Change libhdfs3 download url to a stable one(#6744) 2021-10-03 11:56:36 +08:00
7a20d6d4c2 [Doc] Modify document of resource tag (#6778)
Fix typo
2021-10-03 11:37:45 +08:00
e7707c8180 [FOLLOWUP] create table like clause support copy rollup (#6580)
* Remove `ALL` key word to make grammar more clear.

Co-authored-by: qzsee <shizhiqiang03@meituan.com>
2021-09-30 18:26:21 +08:00