Commit Graph

13073 Commits

Author SHA1 Message Date
391d534ae7 [Bug]Fix bug that BE crash when load ORC file (#4350) 2020-08-17 22:55:29 +08:00
e69496feaf [MysqlCompatibility] Support collate field option in expr (#4365)
Support SQL like:
```
select
collation_name,
character_set_name,
is_default collate utf8_general_ci = 'Yes' as is_default
from information_schema.collations
```
2020-08-17 22:52:57 +08:00
38921d4343 [MV]Forbidden aggregated partition key column on mv (#4343)
The partition column of table also must be the key in materialized view.
If not, when user wants to add partition of table, the be will core.
The materialized view could not create partition correctly when partition column has been aggregated.
2020-08-15 11:38:50 +08:00
d6028863f3 [Compaction] Manually trigger compaction RESTapi interface (#4312)
Add restapi to be which do compaction task by manual trigger. The detail design in #4311 .
2020-08-13 23:41:46 +08:00
4fa35c9f39 [Bug][RoutineLoad] Fix routine load timezone property invalid (#4339) 2020-08-13 23:40:54 +08:00
05fa55047e [Doc][Json Load] Improve json data format load documents (#4337)
And some detail explaination of JsonPath and Columns parameter
2020-08-13 23:39:57 +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
ac9c7741e9 [SQL]Support datagrip show database information (#4332)
Support show schema()
2020-08-13 23:39:05 +08:00
11ec7bbe24 [Bug]Add LargeInt cast to Date and Datatime, add timezone to stale_version_path_json_doc (#4321)
(1) Add LargeInt cast to date and datatime,  see #3864 
    LargeInt can cast to  date and datatime.  Fix this error: 
Unable to find _ZN5doris13CastFunctions16cast_to_date_valEPN9doris_udf15FunctionContextERKNS1_11LargeIntValE
    
(2) Add local timezone info to stale_version_path_json_doc rest api
Add timezone to "last create time" field.
{
        "path id": "1",
        "last create time": "1970-01-01 10:46:40 +0800",
        "path list": "1 -> [2-3] -> [4-5]"
 },
 and add timezone to the test unix,  see #4121 .
2020-08-13 23:38:30 +08:00
790779fb6f [SparkLoad]remove unncessary convert from dataframe to rdd (#4304) 2020-08-13 23:37:38 +08:00
48d89e06c3 [Bug fix]fix query id assign bug (#4291) 2020-08-12 22:42:36 +08:00
10e3fc2778 [BUG] Fix abs function cannot handle bigint or bigger data type (#4326) 2020-08-12 20:58:35 +08:00
98fe80dd5a [MV]Forbidden no grouping mv on aggregation table (#4317)
If user wants to create a no grouping mv on aggregation table, the doris will thrown exception.
The correct approach is that explicit declare the grouping column.
For example:
Agg table: k1, k2, sum(k3)
Create materialized view stmt: select k1, k2 from agg_table group by k1, k2.

Fixed #4316
2020-08-12 20:57:25 +08:00
d655b271b8 [Feature][Web] Add new feature to list all tablets on a particular BE (#4268)
A new feature has been added to acquire tablet id and schema hash of all the tablets on a particular BE node
via Web page,so that more detailed information of each tablet can be obtained according to these
tablet id and schema hash. In accordance with different web request, there are two ways 
(table and json)to show these acquired tablet id and schema hash on Web page.
2020-08-12 20:55:19 +08:00
3354645c77 [BugFix][ColocateJoin] Fix bug of issue 4305 (#4306)
This PR use fragmentIdToSeqToAddressMap replace seqtoAddresss,
Beacause SeqBucket to Address should bind to fragment
2020-08-12 12:11:47 +08:00
48f3ba35ec [Doris On ES][Bug-Fix] Resolve NullPointerException when multi fields with text type (#4300) 2020-08-11 12:09:17 +08:00
493c88c1d6 [BUG] Fix NPE when distinct in predicate push down (#4294)
**Describe the bug**
Predicate push down where sub query has distinct may throw NPE

**To Reproduce**
Steps to reproduce the behavior:
1.  create table like 
```
+--------------+--------------+------+-------+---------+---------+
| Field        | Type         | Null | Key   | Default | Extra   |
+--------------+--------------+------+-------+---------+---------+
| event_day    | DATETIME     | No   | true  | NULL    |         |
| title        | VARCHAR(600) | No   | true  | NULL    |         |
| report_value | VARCHAR(50)  | No   | false | NULL    | REPLACE |
+--------------+--------------+------+-------+---------+---------+
```
2. exec query 
```

```SELECT
    *
FROM
    (
        SELECT
            DISTINCT event_day,
            title
        FROM
            click_show_window
    ) a
WHERE
    a.title IS NOT NULL
```
4. See error

```
ERROR 1064 (HY000): errCode = 2, detailMessage = Unexpected exception: null
```

This is because DISTINCT generate grouping exprs in agginfo, but this clause does not have a group by clause
2020-08-11 11:07:51 +08:00
912547260a [UnitTest] Refactor BE unit test script (#4266)
1. Rename run-ut.sh to run-be-ut.sh
2. Find all test files from build dir instead of declaring separately in the script
3. Add gtest output to collect the result of unit test.
2020-08-11 10:23:51 +08:00
a480dec7a4 Do not wrap NULL type tuple (#4245)
Do not wrap NULL type expr to IF(TupleIsNull(tids), NULL, expr)
2020-08-11 09:38:42 +08:00
6abb374d0c Fix duplicate table export fail (#4293) 2020-08-11 09:37:43 +08:00
0f30e03914 [BUG] Fix TabletSinkTest unit test (#4318) 2020-08-10 21:28:28 +08:00
4ad943e45d [Feature][Cache] Cache proxy and coordinator #2581 (#4248)
* [Feature][Cache] Cache proxy and coordinator #2581
1. Cache's abstract proxy class and BE's Cache implementation
2. Cache coordinator implemented by consistent hashing

* Adjusted the formatting code, naming and variables according to the comments
2020-08-10 16:40:25 +08:00
411ced5715 Secure singleton mode (#4257)
Co-authored-by: wangxixu <wangxixu@xiaomi.com>
2020-08-10 11:26:56 +08:00
f516172f23 Fix window function with limit zero bug 2 (#4235) 2020-08-10 10:29:05 +08:00
c81862ebec Remove palo::PInternalService_Stub in BE code. (#4298)
We can remove the caller in sender side.
After all node are upgraded, we can remove the callee
in receiver side.
2020-08-10 09:46:17 +08:00
651a7e50d0 [Doc] Update compilation.md (#4297) 2020-08-09 20:50:33 +08:00
47fff6841b [Bug][ColocateJoin] Fix bug of #4287 and #4285 of Colocatejoin (#4289)
1.Table join itself should have same single partition to valid colocate join.
2.Check eqjoinConjuncts column order to valid colocate join.
2020-08-09 20:48:36 +08:00
bdbe59a41a [Bug]Fix be crash caused by decimal to date (#4282)
Fix be crash caused by cast decimal to date. A be crashed bug caused by Unable to find. _ZN5doris18DecimalV2Operators16cast_to_date_val.
also see #4281
2020-08-09 20:47:43 +08:00
4beed51366 [Comment]Fix spelling error (#4249) 2020-08-09 00:04:43 +08:00
a54b0eab0c [Bug]fix cancel query bug (#4275)
ConnectContext.kill() use executor to cancel query, but executor has never been set.
2020-08-08 20:29:32 +08:00
d5909ae503 [MaterializedView]Change the type of slot when mv is selected (#4272)
The column types of the materialized view and the base table are different.
When mv is selected in query plan, the type of slot should be changed by mv column type.
For example:
base table: k1 int, k2 int
mv table: k1 int, k2 bigint sum
The k2 type of slot ref should be changed from int to bigint.
Closed. #4271
2020-08-08 20:29:07 +08:00
e71152132c [metrics] Redesign metrics to 3 layers (#4115)
Redesign metrics to 3 layers:
    MetricRegistry - MetricEntity - Metrics
    MetricRegistry : the register center
    MetricEntity : the entity registered on MetricRegistry. Generally a MetricRegistry can be registered on several 
        MetricEntities, each of MetricEntity is an independent entity, such as server, disk_devices, data_directories, thrift 
        clients and servers, and so on. 
    Metric : metrics of an entity. Such as fragment_requests_total on server entity, disk_bytes_read on a disk_device entity, 
        thrift_opened_clients on a thrift_client entity.
    MetricPrototype: the type of a metric. MetricPrototype is a global variable, can be shared by the same metrics across 
        different MetricEntities.
2020-08-08 11:23:01 +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
5ba4b024e7 [Docs] Add Materialized view manual (#4229)
Add usage manual of materialized view in Chinese and English
2020-08-06 23:18:06 +08:00
4c05eddc10 [SQL] Support approx_count_distinct rewrite to hll union in mv rewriter (#4239)
The new function approx_count_distinct is the alias of function ndv.
So Doris also need to rewrite approx_count_distinct to hll function when it is possible to match the hll materialized view.
2020-08-06 23:16:15 +08:00
3372958a4c [BUG] Fix calculation of cumulative point (#4259)
Fix calculation of cumulative point. The problem is calculation of cumulative point
is wrong when be restarts and there is delete rowset. also see #4258
2020-08-06 23:13:43 +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
c98b411500 [Bug] Revert part of #4199 to avoid BE crash(#4269)
Revert “Change type of sum, min, max function column in mv”

This pr is revert pr #4199 .
The daily test is cored when the type of mv column has been changed.
So I revert the pr.
The daily core will be fixed in the future. After that, the pr#4199 will be enable.

Change-Id: Ie04fcfacfcd38480121addc5e454093d4ae75181
2020-08-06 19:06:00 +08:00
b62ff8508f Revert "[BUG] Using attachement strategy of brpc to send packet with big size. (#4237)" (#4267)
This reverts commit 120f30bcaec5ba8318ba1849b513b5d06d8df281.
2020-08-06 08:56:07 +00:00
173bc09833 [Alter]Analyze define expr before replay Rollup job (#4236)
The define expr should be analyzed after replay RollupJob.
The slot desc of define expr is used to transfrom to thrift and send to backend.
2020-08-05 21:47:18 +08:00
a4f3d43e15 fix version check bug (#4244)
Co-authored-by: gengjun <gengjun@dorisdb.com>
2020-08-05 21:45:36 +08:00
421828d52a [Doc] Fix format in doris_storage_optimization.md (#4250) 2020-08-05 21:45:03 +08:00
1b341601fe Generate jave files using maven (#4133)
generate generated-java files using maven instead of by build.sh
2020-08-05 15:20:39 +08:00
120f30bcae [BUG] Using attachement strategy of brpc to send packet with big size. (#4237)
Using attachement strategy of brpc to send packet with big size.
BRPC send packet should serialize it first and then send it.
If we send one batch with big size, it will encounter a connection failed.
So we can use attachment strategy to bypass the problem and eliminate
the serialization cost.
2020-08-05 10:29:41 +08:00
bfb8c654c1 [Bug] Fix UT bug after making MemTracker shared (#4243)
after making MemTracker shared(#4135), some code haven't been fixed,
and add some useless ut back to build. Fixed in this pr.
2020-08-04 17:52:11 +08:00
3f31866169 [Bug][Load][Json] #4124 Load json format with stream load failed (#4217)
Stream load should read all the data completely before parsing the json.
And also add a new BE config streaming_load_max_batch_read_mb
to limit the data size when loading json data.

Fix the bug of loading empty json array []

Add doc to explain some certain case of loading json format data.

Fix: #4124
2020-08-04 12:55:53 +08:00
de7f83230c [Delete][Bug]fix decimal delete error (#4228)
Querys like DELETE FROM tbl WHERE decimal_key <= "123.456";
when the type of decimal_key is DECIMALV2 may failed randomly,
this is because the precision and scale is not initialized.
2020-08-02 22:10:56 +08:00
5caa347e86 [ColocateJoin] ColocateJoin support table join itself (#4230) (#4231)
if left table and right table is same table, they are naturally colocate relationship.
2020-08-02 22:05:45 +08:00
85e0a68783 [SQL][Bug] Fix multi predicate in correlation subquery analyze fail (#4211) 2020-08-02 22:05:23 +08:00
d64d65322b [Bug][DynamicPartition]Fix bug that Modify a dynamic partition property in a non-dynamic partition table will throw a Exception (#4127) 2020-08-02 22:03:57 +08:00