Commit Graph

482 Commits

Author SHA1 Message Date
83f6f46c34 [Config] Limit the version number of tablet (#4687)
Add a BE config `max_tablet_version_num` to limit the version number of a single tablet.
To avoid too many versions
2020-10-13 10:08:16 +08:00
c934cf93e1 [UI Part 5] Enable HTTP Server 2 by FE config (#4684)
This is the last PR of proposal #4308

1. Add a new FE config `enable_http_server_v2` to enable new HTTP Server implementation. The default value is false.
2. Add a new FE config `http_api_extra_base_path` so that we can set base path for Frontend UI.
3. Refactor the new HTTP API response body. The return http status code is always 200, and using internal code in response body to indicate the certain error.
2020-10-13 10:07:50 +08:00
3f0cb04376 [Feature] Support REPLACE TABLE operation. (#4669)
Implement REPLACE TABLE feature.
Details can be found in document `alter-table-replace-table.md`
2020-10-13 10:06:57 +08:00
fd5e3011da [Docs] Added some missing documents (#4710)
1. Add ODBC resource in resource manage doc and add english of resource manage doc
2. Add miss part in sidebar
2020-10-11 15:40:53 +08:00
28f4e922a7 [CREATE TABLE]Support new syntax CREATE TABLE LIKE to clone an existe… (#4705)
Support new synatx CREATE TABLE [IF NOT EXISTS] [db_name].table_name AS [db_name2].table_name2;
to create a new table from existed table with same table schema.
ISSUE: #4355
2020-10-10 21:16:53 +08:00
f3cdf167d1 [Feature] Add time_round builtin functions (#4640)
#4619 
Add time_round functions that provides `time_floor` & `time_ceil` at each time unit.

Fix two related bugs.
- #4618 
- Fix `struct TimeInterval` to use `int64_t` instead of `int32_t`, in case when the second diff overflow
2020-10-09 16:05:51 +08:00
725ee59824 Fix mysqlslap hang under high concurrent (#4680) 2020-10-07 12:30:18 +08:00
0475aa9b93 [Bug]Fix delete on clause may not work in routineLoad (#4683)
fix delete on may not work in some cases, this is describe in #4682
2020-09-30 09:56:19 +08:00
05512d7b47 [Doc] Fix typo 2020-09-28 13:38:39 +08:00
50b576a626 [Docs] Change incorrect bos endpoint in broker docs (#4642) 2020-09-28 13:37:05 +08:00
e611ab96e7 [Docs] Supply BE config docs of setting and examples (#4641) 2020-09-28 13:36:12 +08:00
e072002edc [Doc] Update data-model-rollup.md (#4659)
fix typo
2020-09-25 10:26:05 +08:00
4e3b576fd3 [NewFeature] Support ExternalCatalogResource to simplify external table manage operation. (#4559)
1. Add new Resource ExternalCatalogResource

```
create external resource "odbc"
properties
(
   "type" = "external_catalog", (required)
   "user" = "test",(required)
   "password" = "", (required)
   "host" = "192.168.0.1", (required)
   "port" = "8086", (required)
   "type" = "oracle" , (optinal,only odbc exteranl table use)
   "driver" = "Oracle 19 ODBC driver" (optional,only odbc exteranl table use)
)
```

2.After create ExternalCatalogResource, can create external table like:

```
CREATE TABLE `test_mysql` (
  `k1` tinyint(4) NOT NULL,
  `k2` smallint(6) NOT NULL,
  `k3` int(11) NOT NULL,
  `k4` bigint(20) NOT NULL,
  `k5` decimal(9,3) NOT NULL,
  `k6` char(5) NOT NULL,
  `k10` date DEFAULT NULL,
  `k11` datetime DEFAULT NULL,
  `k7` varchar(20) NOT NULL,
  `k8` double NOT NULL,
  `k9` float NOT NULL
) ENGINE=MYSQL
PROPERTIES (
"external_catalog_resource" = "odbc",
"database" = "test",
"table" = "test"
);
```
2020-09-25 10:20:33 +08:00
a61d0de173 [ODBC SCAN NODE] 4/4 Add ODBC_SCAN_NODE and Odbc_Scanner in BE and add ODBC_SCAN_NODE docs (#4438) 2020-09-25 10:19:50 +08:00
fd37c4f352 [Document] Fix some typo in alter table document
Fix some typos in document that confusing users.
2020-09-22 16:23:23 +08:00
1821d1baea [Compile] Add pluginRepository for java-cup-plugins (#4636)
the cup-maven-plugin of net.sourceforge.czt.dev is missing in maven central repo.
It has been moved to https://repository.cloudera.com/content/groups/public/

Co-authored-by: morningman <chenmingyu@baidu.com>
2020-09-21 12:38:28 +08:00
d01ef41a0a [Doc] modify documents of dynamic partition (#4607)
If some partitions between `dynamic_partition.start` and `dynamic_partition.end` are lost
due to some unexpected circumstances when using dynamic partition.
the lost partitions between the current time and `dynamic_partition.end` will be recreated,
but the lost partitions between `dynamic_partition.start` and the current time will not be recreated.
2020-09-20 20:53:13 +08:00
5f43fb3bde [Cache][BE] LRU cache for sql/partition cache #2581 (#4005)
1. Find the cache node by SQL Key, then find the corresponding partition data by Partition Key, and then decide whether to hit Cache by LastVersion and LastVersionTime
2. Refers to the classic cache algorithm LRU, which is the least recently used algorithm, using a three-layer data structure to achieve
3. The Cache elimination algorithm is implemented by ensuring the range of the partition as much as possible, to avoid the situation of partition discontinuity, which will reduce the hit rate of the Cache partition,
4. Use the two thresholds of maximum memory and elastic memory to control to avoid frequent elimination of data
2020-09-20 20:50:51 +08:00
a1f52ec2ab [SQL] Support where, limit, order clause in show resourcestmt. (#4502)
* [SQL] Support where, limit, order clause in show resourcestmt.

Grammar

    SHOW RESOURCES
    [
        WHERE
        [NAME [ = "your_resource_name" | LIKE "name_matcher"]]
        [RESOURCETYPE = ["SPARK"]]
    ]
    [ORDER BY ...]
    [LIMIT limit][OFFSET offset];

issue #4501
2020-09-16 17:57:48 +08:00
1191048f5f [UI Part 2] Add HTTP API documents of Frontend (#4584)
Origin:

bootstrap-action
cancel-load-action
check-decommission-action
check-storage-type-action
config-action
connection-action
get-ddl-stmt-action
get-load-info-action
get-load-state
get-log-file-action
get-small-file
ha-action
hardware-info-action
health-action
log-action
meta-action
meta-info-action
meta-replay-state-action
profile-action
query-detail-action
query-profile-action
row-count-action
session-action
set-config-action
show-data-action
show-proc-action
show-runtime-info-action
system-action
table-query-plan-action
table-row-count-action
table-schema-action

New:

logout-action
show-meta-info-action
statement-execution-action
upload-action
2020-09-16 15:02:38 +08:00
95111f9228 [Feature] Support alter table syntax for sequence column (#4582)
* enable sequence col

Co-authored-by: yangwenbo6 <yangwenbo3@jd.com>
2020-09-15 10:19:38 +08:00
2f0d725a25 [Batch Delete] Add a session variable to show or hide hidden columns (#4579)
Sometimes we need to show hidden columns for debug.
So we need to add a session variable to show or hide hidden columns
2020-09-13 19:14:31 +08:00
c38593702f [Config] Add default configuration of max_fiter_ratio #4541# (#4553)
Co-authored-by: shqmh <shqmh@126.com>
2020-09-13 19:12:45 +08:00
4571b09dd6 [storage][compatibility] Add meta format detection to prevent data loss. (#4539)
After 0.12 version, doris remove the format convert functiion which can convert from hdr_ format
to tabletmeta_ format when loading metas, the commit link: 3bca253

When we update doris version and there are old format meta in storage,
BE will not read the old format tablet. It can lead to data loss.

So we add meta format detection function to prevent data loss.
When there are old format meta in olap_meta, BE can find and print log or exit.
2020-09-13 11:58:22 +08:00
31e451b8c7 [Feature] Doris can set default configuration of database data quota and replica quota #4540# (#4550)
When Doris create a database, the database of data quota and replica quota is initialized by configuration(Config.default_db_data_quota_bytes and Config.default_db_replica_quota_bytes).
In other words, I convert FeConstants.default_db_data_quota_bytes to Config.default_db_data_quota_bytes
Config.default_db_data_quota_bytes can be change in configuration file.
2020-09-12 11:17:27 +08:00
81784d6471 Revert "Add a session variable to show or hide hidden columns (#4510)" (#4576)
This reverts commit fe0260e54f8dfa37260423cffcf42096de19ed1f.
2020-09-10 15:18:36 +08:00
fe0260e54f Add a session variable to show or hide hidden columns (#4510)
* add session variable to show hidden columns
2020-09-10 13:07:43 +08:00
8be04fac64 [Variable] Add a new global variable "performance_schema" to support Mysql JDBC 8.0.16 or later.#4537# (#4542) 2020-09-08 09:25:20 +08:00
bcb443fb63 [Feature]Support SELECT Optimizer Hints SET_VAR (#4504) 2020-09-06 20:27:53 +08:00
03d9f6d8b4 [Feature] support hour time unit with dynamic parition (#4514)
Many tables are so large that need seperate partitions with "HOUR" time unit.
But now dynamic partition doesn't support "HOUR" time unit and it was marked as "TODO".
So I support the feature and it works.
2020-09-06 20:25:27 +08:00
068707484d Support sequence column for UNIQUE_KEYS Table (#4256)
* add sequence  col

Co-authored-by: yangwenbo6 <yangwenbo3@jd.com>
2020-09-04 10:10:17 +08:00
a64c3a7acd [ODBC SCAN NODE] 3/4 Add ODBC_TABLE and ODBC_SCAN NODE in FE. (#4430)
we can create odbc_table use SQL like

```
CREATE EXTERNAL TABLE `baseall_oracle` (
  `k1` decimal(9, 3) NOT NULL COMMENT "",
  `k2` char(10) NOT NULL COMMENT "",
  `k3` datetime NOT NULL COMMENT "",
  `k5` varchar(20) NOT NULL COMMENT "",
  `k6` double NOT NULL COMMENT ""
) ENGINE=ODBC
PROPERTIES (
"host" = "192.168.0.1",
"port" = "8086",
"user" = "happenlee",
"password" = "doris",
"database" = "doris",
"table" = "baseall",
"driver" = "Oracle 19 ODBC driver",
"type" = "oracle"
);
```

Now we only support Oracle and MySQL Database and this feature default turned off by conf enable_odbc_table.
2020-09-04 09:30:01 +08:00
5166a6c6bc [Bug] function str_to_date()'s behavior on BE and FE is inconsistent (#4495)
Main CL:
1. Copy the code from BE to implement the `str_to_date()` function in FE. 
2. `str_to_date("2020-08-08", "%Y-%m-%d %H:%i:%s")` will return `2020-08-08 00:00:00` instead of `2020-08-08`.
2020-09-03 17:16:19 +08:00
ac3bbdd3ab [BatchDelete] Add a configuration indicating whether to enable the batch delete function (#4493) 2020-09-03 16:56:37 +08:00
f207036cad [Spark load][Document] Add docs about spark and yarn client for spark load (#4489)
Add docs about spark and yarn client for spark load
2020-09-02 10:52:49 +08:00
8bb65863f5 [Doc] Update doc of fe-idea-dev.md (#4485) 2020-08-31 10:09:10 +08:00
1d93ba027a [Compaction] Compaction show policy type and disk format (#4466)
Add more information in compaction show api
1、add cumulative policy type
2、format rowset total disk size
2020-08-30 21:09:47 +08:00
wyb
ffe696d17c [Doc] Add spark load sql statement doc and update manual (#4463)
1. add sql statement in dml
2. update spark load manual
2020-08-30 21:09:17 +08:00
0db9194dc0 [Doc] Fix wrong doc name (#4477)
Co-authored-by: morningman <chenmingyu@baidu.com>
2020-08-28 11:56:59 +08:00
174c9f89ea [DOCS] Add batch delete docs (#4435)
update documents for batch delete #4051
2020-08-28 09:24:07 +08:00
ad738fa198 Add OLAP_ERR_DATE_QUALITY_ERR error status to display schema change failure (#4388)
In the process of historical data transformation of materialized views, it may occur that the transformation fails due to data quality.
Add an error status code :OLAP_ERR_DATE_QUALITY_ERR to determine if a data problem is causing the failure

#3344
2020-08-27 17:52:53 +08:00
8b0b120aca [Profile] Add 2 Segment related metrics in query profile (#4348)
Total number of segments and filterd number of segment
2020-08-27 12:07:21 +08:00
b4d8b3d9ba Forbidden the illegal column types on BITMAP_UNION OR HLL_UNION mv (#4432)
1. The base column of bitmap_union could must be integer. The largeint is not supported too.
2. The base column of hll_union could not be decimal.

Check error msg of const expr in Union Node

If user wants to insert a negative number into bitmap mv, Doris will thrown exception 'invalid input'.
The const value in Union Node is checked in this commit.
2020-08-26 10:49:32 +08:00
a5d1d010c0 [Doc] Fix typo about plugin content (#4416) 2020-08-26 10:48:07 +08:00
1410d4e623 [Doc] Add in predicate support content in delete-manual.md (#4404)
Add in predicate support content in delete-manual.md
2020-08-24 21:52:28 +08:00
67b842ce04 [License] Organize and modify the license of the code (#4371)
1. Disable the MySQL client and LZO library by default when building the Doris.

    MySQL client library is used for MySQL external table feature.
    This feature will be replaced by the new ODBC external table soon.

    LZO library is used to compress/decompress data of some old data format of Doris,
    which is no longer used anymore.

2. Add missing license to some files.

3. For all non-Apache-License code, all are explained in NOTICE file and the corresponding license is declared.

4. Remove the js source code from webroot, it will be downloaded as thirdparty
2020-08-24 21:51:55 +08:00
976820ba20 [SegmentV2] Change the default storage format to SegmentV2 (#4387)
Since the Segment V2 has been released for a long time, we should make it as default storage format for newly created table.

This CL mainly changes:
1. For all newly created tables, their default storage format is Segment V2.
2. For all already exist tablets, their storage format remain unchanged.
3. Fix  bugs described in Fix #4384 and Fix #4385
2020-08-24 21:51:17 +08:00
0715c54004 Fix mispelling (#4407)
Centers to centos
2020-08-21 09:14:21 +08:00
04a75b7c28 [Doc] Fix spelling errors in dynamic partition docs (#4395)
Change-Id: I84de1602b99c6b89b59ccc5869c96516c40a181d
2020-08-20 09:31:33 +08:00
bfb39a2826 [SQL][Function] Add replace() function (#4347)
replace is an user defined function, which is to replace all old substrings with a new substring in a string, as follow:
mysql> select replace("http://www.baidu.com:9090", "9090", "");
+------------------------------------------------------+
| replace('http://www.baidu.com:9090', '9090', '') |
+------------------------------------------------------+
| http://www.baidu.com: |
+------------------------------------------------------+
2020-08-20 09:28:53 +08:00