Commit Graph

69 Commits

Author SHA1 Message Date
Pxl
bdafb61ae1 [Docs] Typo fix on CREATE TABLE.md (#6126) 2021-07-01 09:20:12 +08:00
d9c128b744 [BrokerLoad] Support read properties for broker load when read data (#5845)
* [BrokerLoad] support read properties for broker load when read data

Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-06-09 14:59:55 +08:00
a29dd42b47 [BUG][Document] Fix the bug that failed to build the help module (#5917)
There are multiple entries with same key in help documents, which will cause build help module failed.
2021-05-27 22:07:15 +08:00
3cb0174aa2 [Doc] Fix demo in 'CREATE TABLE' (#5865) 2021-05-27 22:03:51 +08:00
ba69f7a7c8 [Command] [SQL] Add show database/table/partition id command (#5807)
In BE, when a problem happened, in the log, we can find the database id, table id, partition id,
but no database name, table name, partition name.

In FE, there also no way to find database name/table name/partition name accourding to
database id/table id/partition id. Therefore, this patch add 3 new commands:

1. show database id;
mysql> show database 10002;
+----------------------+
| DbName               |
+----------------------+
| default_cluster:test |
+----------------------+

2. show table id;
mysql> show table 11100;
+----------------------+-----------+-------+
| DbName               | TableName | DbId  |
+----------------------+-----------+-------+
| default_cluster:test | table2    | 10002 |
+----------------------+-----------+-------+

3. show partition id;
mysql> show partition 11099;
+----------------------+-----------+---------------+-------+---------+
| DbName               | TableName | PartitionName | DbId  | TableId |
+----------------------+-----------+---------------+-------+---------+
| default_cluster:test | table2    | p201708       | 10002 | 11100   |
+----------------------+-----------+---------------+-------+---------+
2021-05-26 09:58:02 +08:00
a55b12da90 [Doc] Fix some flaws in hll-type document (#5795)
Fix some flaws in hll-type document.
2021-05-26 09:56:55 +08:00
07ad038870 [Feature][RoutineLoad] Support for consuming kafka from the point of time (#5832)
Support when creating a kafka routine load, start consumption from a specified point in time instead of a specific offset.
eg:
```
FROM KAFKA
(
    "kafka_broker_list" = "broker1:9092,broker2:9092",
    "kafka_topic" = "my_topic",
    "property.kafka_default_offsets" = "2021-10-10 11:00:00"
);

or

FROM KAFKA
(
    "kafka_broker_list" = "broker1:9092,broker2:9092",
    "kafka_topic" = "my_topic",
    "kafka_partitions" = "0,1,2",
    "kafka_offsets" = "2021-10-10 11:00:00, 2021-10-10 11:00:00, 2021-10-10 12:00:00"
);
```

This PR also reconstructed the analysis method of properties when creating or altering
routine load jobs, and unified the analysis process in the `RoutineLoadDataSourceProperties` class.
2021-05-22 23:37:53 +08:00
12e4ff2689 [Doc] Fix doc for 'SHOW EXPORT' (#5840) 2021-05-19 09:31:57 +08:00
9eacd0a89c [Doc] remove storage_type from docs (#5814) 2021-05-19 09:29:15 +08:00
bf4443578c [Feature] Support show view statement for table (#5813)
Help to find all views which contain the given table
2021-05-19 09:29:00 +08:00
65ff464e3d [Feature] Support show data order by (#5770)
Currently, the `show data` does not support sorting. When the number of tables increases, it is inconvenient to manage. Need to support sorting

like:
```
mysql>  show data order by ReplicaCount desc,Size asc;
+-----------+-------------+--------------+
| TableName | Size        | ReplicaCount |
+-----------+-------------+--------------+
| table_c   | 3.102 KB    | 40           |
| table_d   | .000        | 20           |
| table_b   | 324.000 B   | 20           |
| table_a   | 1.266 KB    | 10           |
| Total     | 4.684 KB    | 90           |
| Quota     | 1024.000 GB | 1073741824   |
| Left      | 1024.000 GB | 1073741734   |
+-----------+-------------+--------------+
```
2021-05-19 09:27:27 +08:00
add8c4bb74 [Load] Support reading multi-line json objects for JsonScanner (#5774)
Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-05-18 15:44:45 +08:00
3fdfe0ba6f [Bug-fix] Export specified column (#5759)
The code logic error causes the user to specify the export column, which may not be effective.
The PR fix this problem.
2021-05-08 10:56:45 +08:00
507664a44d fix spelling mistake in alter table doc (#5723)
Co-authored-by: weizuo <weizuo@xiaomi.com>
2021-04-30 10:12:50 +08:00
9001fd28f4 support show stream load sql (#5488)
Co-authored-by: weizuo <weizuo@xiaomi.com>
2021-04-29 09:20:35 +08:00
de87f4ae84 [Feature] Add list partition support (#5529)
Add list partition support
2021-04-24 17:42:27 +08:00
86af8c76a3 [DOC] Add docs of load and export using S3 protocol (#5551)
Add docs of load and export using S3 protocol
2021-03-27 18:58:29 +08:00
253056ca53 [Docs] Modify schema change sql reference (#5530)
Modify the error examples
2021-03-22 10:50:55 +08:00
64fa305c06 [Doc] correct format errors in English doc (#5487)
Some formate errors in English doc.
They are very straightforward and should not break any existing build.
2021-03-11 22:34:54 +08:00
6cbbc36ea1 [Export] Expand function of export stmt (#5445)
1. Support where clause in export stmt which only export selected rows.

The syntax is following:

Export table [table name]
    where [expr]
To xxx
xxxx

It will filter table rows.
Only rows that meet the where condition can be exported.

2. Support utf8 separator

3. Support export to local

The syntax is following:

Export table [table name]
To (file:///xxx/xx/xx)

If user export rows to local, the broker properties is not requried.
User only need to create a local folder to store data, and fill in the path of the folder starting with file://

Change-Id: Ib7e7ece5accb3e359a67310b0bf006d42cd3f6f5
2021-03-11 20:43:32 +08:00
e93a6da0e5 [Doc] correct format errors in English doc (#5321)
Fix some English doc format errors
2021-02-26 11:32:14 +08:00
6ede4c6ec1 [Feature] Support backup,restore,load,export directly connect to s3 (#5399)
* [doris-1008] support backup and restore directly to cloud storage via aws s3 protocol

* Internal][S3DirectAccess] Support backup,restore,load,export directlyconnect to s3
1. Support load and export data from/to s3 directly.
2. Add a config to auto convert broker access to s3 acces when available

Change-Id: Iac96d4b3670776708bc96a119ff491db8cb4cde7

(cherry picked from commit 2f03832ca52221cc7436069b96c45c48c4bc7201)

* [Internal][S3DirectAccess] File path glob compatible with broker

Change-Id: Ie55e07a547aa22c6fa8d432ca926216c10384e68
(cherry picked from commit d4fb25544c0dc06d23e1ada571ec3f8edd4ba56f)

* [internal] [doris-1008] fix log4j class not found

Change-Id: I468176aca0d821383c74ee658d461aba9e7d5be3
(cherry picked from commit 029adaa9d6ded8503acbd6644c1519456f3db232)

* add poms

Co-authored-by: yangzhengguo01 <yangzhengguo01@baidu.com>
2021-02-22 16:07:56 +08:00
b098261253 docs(Doc): correct wrong num in create table help doc (#5365)
Co-authored-by: liuyuan <liuyuan.a@miaozhen.com>
2021-02-20 10:07:48 +08:00
780900ac9c [Feature] Support preceding filter original data when loading (#5338)
Support conditional filtering of original data in broker load and routine load
eg:

```
LOAD LABEL `label1`
(
DATA INFILE ('bos://cmy-repo/1.csv')
INTO TABLE tbl2
COLUMNS TERMINATED BY '\t'
(event_day, product_id, ocpc_stage, user_id)
SET (
	ocpc_stage = ocpc_stage + 100
)
PRECEDING FILTER user_id = 1381035
WHERE ocpc_stage > 30
)
...
```
2021-02-07 22:37:48 +08:00
b315244ba7 [Doc] Fix the error description for the number of bytes of double type. (#5273)
Modify the error description of double type: 12 bytes is modified to 8 bytes
2021-02-01 00:11:14 +08:00
de57667d6d [Delete] Support delete with multi partitions (#5252)
Support delete statement like:
1. delete from table partitions(p1, p2) where xxx;  // apply to p1, p2
2. delete from table where xxx;     // apply to all partitions

Also remove code about the deprecated sync/async delete job.

This CL changes FE meta version to 94
2021-01-30 20:33:34 +08:00
ca10205137 [Function] Support show create function statement (#5197)
* [Function]Support show create function stmt

Co-authored-by: caiconghui [蔡聪辉] <caiconghui@xiaomi.com>
2021-01-28 10:52:37 +08:00
83b7a23d5c fix alter routine load not work (#5257) 2021-01-20 10:52:02 +08:00
279ae1cb75 Add fuzzy_parse option to speed up json import (#5114)
add a flag of fuzzy_parse, if the json file all object keys are the same and has same order, we only need to parse the first row, and then use index instead key to parse value
2020-12-25 09:19:42 +08:00
74bfd69595 [Bug] Forbidden creating table with dynamic partition when FE.config dynamic_partition_enable=false (#5043)
- There is a fe configuration called dynamic_partition_enable
    which controls the opening and closing of the dynamic partition function.
  When this configuration is false, it means that all tables do not support dynamic partitioning.

- But when the user tried to create the dynamic partition table, Doris did not detect this parameter.
  This will cause the user can normally create a dynamic partition table,
    but in fact Doris cannot create a partition for this table.

- This pr detect this config when building the table.
  The dynamic partition table can be created only when the dynamic_partition_enable configuration is true.
  If the configuration is false, the command to create a dynamic partition table will directly report an error.
2020-12-16 23:44:20 +08:00
bc063ebce2 fix typo in docs (#5046) 2020-12-10 15:10:22 +08:00
55ce88da34 [Schema change] Support More column type in schema change (#4938)
1. Support modify column type CHAR to TINYINT/SMALLINT/INT/BIGINT/LARGEINT/FLOAT/DOUBLE/DATE
and TINYINT/SMALLINT/INT/BIGINT/LARGEINT/FLOAT/DOUBLE convert to a wider range of numeric types (#4937)

2. Use template to refactor code of types.h and schema_change.cpp to delete redundant code.
2020-11-28 09:52:28 +08:00
d6497fedc4 [Config] Change config name 'streaming_load_max_batch_size_mb' to 'streaming_load_json_max_mb' (#4791)
The name and another config name are close to each other and are indistinguishable.
So this pr modify the name.
The document description has also been changed
2020-10-28 23:27:33 +08:00
a605b3160f [Docs] update data types doc and fix some typo (#4712)
* update data types doc and fix some typo

* update data types doc and fix some typo

Co-authored-by: lixueyan07 <lixueyan07@meituan.com>
2020-10-14 09:34:58 +08:00
751aa05cc0 fix docs typo (#4725) 2020-10-14 09:27:50 +08:00
dec91a3d43 fix docs typo (#4723) 2020-10-14 09:27:31 +08:00
3f55c1425c fix docs typo (#4722) 2020-10-14 09:27:12 +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
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
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
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
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
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
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
a5d1d010c0 [Doc] Fix typo about plugin content (#4416) 2020-08-26 10:48:07 +08:00
26fe510011 [Doc] modify the document error (#4357) 2020-08-17 23:06:23 +08:00
1d9b3aeee7 [Doc] Repair document format (#4336)
The error format '##keyword' in a lot of docs. This pr is to repair document format. #4335
2020-08-13 23:39:41 +08:00
eefad13107 [Feature] Support InPredicate in delete statement (#4006)
This PR is to add inPredicate support to delete statement,
and add max_allowed_in_element_num_of_delete variable to
limit element num of InPredicate in delete statement.
2020-08-06 23:19:40 +08:00
237c0807a4 [RoutineLoad] Support modify routine load job (#4158)
Support ALTER ROUTINE LOAD JOB stmt, for example:

```
alter routine load db1.label1
properties
(
"desired_concurrent_number"="3",
"max_batch_interval" = "5",
"max_batch_rows" = "300000",
"max_batch_size" = "209715200",
"strict_mode" = "false",
"timezone" = "+08:00"
)
```

Details can be found in `alter-routine-load.md`
2020-08-06 23:11:02 +08:00