Commit Graph

5755 Commits

Author SHA1 Message Date
584b33f95b [Bug] Fix the bug of NULL do not show in CTE statement. (#4932)
All Column create in inlineView will set `allowNull = false`, which will cause `NULL` data in CTE be process will be ignore.
So we should set column in inlineView allowNull to make sure correct of query.
2020-11-22 20:58:03 +08:00
c28769c512 [Bug] Avoid partition prune if predicate is not with SlotRef (#4833) (#4921) 2020-11-22 20:49:20 +08:00
4f7c6da1f5 [Refactor] Refactor function getScanRangeLength (#4912)
getScanRangeLength always return 1, it is no need to maintain a function like this.
2020-11-22 20:44:11 +08:00
f1b57c4418 [Optimize] Avoid repeated sending of common components in Fragments (#4904)
This CL mainly changes:

1. Avoid repeated sending of common components in Fragments

    In the previous implementation, a query may generate multiple Fragments,
these Fragments contain some common information, such as DescriptorTable.
Fragment will be sent to BE in a certain order, so these public information will be sent repeatedly
and generated repeatedly on the BE side.

    In some complex SQL, these public information may be very large,
thereby increasing the execution time of Fragment.

    So I improved this. For multiple Fragments sent to the same BE, only the first Fragment will carry
these public information, and it will be cached on the BE side, and subsequent Fragments
no longer need to carry this information.

    In the local test, the execution time of some complex SQL can be reduced from 3 seconds to 1 second.

2. Add the time-consuming part of FE logic in Profile

    Including SQL analysis, planning, Fragment scheduling and sending on the FE side, and the time to fetch data.
2020-11-22 20:38:05 +08:00
e507fcc3b3 [Enhancement] Improve list comparing performance (#4880)
The function equalSets is not efficient enough currently, the time complexity is O(n^2).
To improve the performance of comparing two lists, this patch tries to use hash map structure
to make the time complexity to be O(n).
2020-11-22 20:35:12 +08:00
f445ed5b8a Disable the creation of segment v1 table (#4913) 2020-11-20 09:51:14 +08:00
64b219f04d Fix typo (#4923) 2020-11-20 09:48:27 +08:00
6101155679 [CodeStyle]Replace tab with spaces (#4909) 2020-11-18 21:56:07 +08:00
ec9da30c9c [New Feature]Support udf when loading data (#4863)
Many time, our users want to use UDFs they developed to ETL the data
when loading the data into Doris.
But currently, broker load does not support to use UDF.
As UDF belongs to a database, it needs to check whether it has the SELECT permission of the database.
This patch try to solve this problem.
2020-11-18 21:51:59 +08:00
dcca3bbe5b Avoid duplicate column when adding slot in empty tuple (#4901)
Fixed #4900  
When the supplementary column already exists in the tuple, this column is directly materialized instead of adding a new slot.
2020-11-17 15:52:36 +08:00
448df42fb0 [Compatibility] Add table_privileges, schema_privileges and user_privileges tables(#4899)
Add privileges tables in information_schema database
2020-11-16 21:58:30 +08:00
55080ba888 [BUG] Fix colocate join memory limit problem (#4894)
In colocate join, the memory limit of each instance is usually less than the value of exec_mem_limit,
which could lead to query failure (Memory exceed limit).
Since the purpose of resetting colocate-join memory limit
(/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java) is unclear to me,
I just change the default value of query_colocate_join_memory_limit_penalty_factor from 8 to 1, as a hotfix.
2020-11-16 21:57:00 +08:00
c5e435146d [Refactor] Remove break label for readability (#4890)
Co-authored-by: tanhao <tanhao.0902@bytedance.com>
2020-11-16 21:56:10 +08:00
5aefd701cb [Improve]modify isDecommissioned be capacity calculate rule (#4889)
I use containerized deployment of BE nodes, both using the same distributed disk.
When doing data migration, the current logic will lead to errors.
For example, my distributed disk has 10t and has been used by other services for 9T,
at this time, it is assumed that all the 9T data is used by BE nodes
2020-11-16 21:55:35 +08:00
2af4bc294f [Bug] Java Version BitmapValue deserialized failed when only has 32-bit bitmap (#4884) 2020-11-16 21:54:07 +08:00
18a22bd347 [BUG] Fix field error in information_schema.columns (#4858) 2020-11-15 22:01:32 +08:00
69c422e31e [Bug] Fix bug #4886 and #4586 by refactoring code of method 'getDbs' (#4887)
fix issue #4886
2020-11-13 11:55:10 +08:00
97867364e7 Revert "[FEATURE]Check date type to avoid scan all partitions (#4756)" (#4877)
This reverts commit c8df76a807b4856f71bcb6a3a023849f3bf294d7.

This commit has some problem when handling predicate like:
`k1 = "2020-10-10 10:00:00.000"`

This is a valid predicate, and FE Datetime can not support milli or micro seconds, so it will treat it as invalid date time value.

So we revert it, and may find some better solution later.
2020-11-12 13:52:10 +08:00
1810f10497 [Bug] Fix bug that failed to create view with complex select stmt (#4840)
Fix bug that failed to create view with complex select stmt.
Fix #4839
2020-11-12 10:04:00 +08:00
1151a0063c [Bug] Make 'LastStartTime' in backends list as the actual BE start time (#4872)
We use 'LastStartTime' in backends list to check whether there is an unexpected
restart of BE, but it will be changed as BE's first heartbeat time after FE
restarted, it would be better to set it to BE's actual start time.
2020-11-11 21:24:06 +08:00
4ccd7b84ad [Bug] Rename table logic error (#4870)
1. Rename table operation will failed to drop table with old name in Catalog.
2. Rename table operation forget the check rollup names.
2020-11-11 21:22:10 +08:00
53c570a273 [Broker Load] Ignore empty file when file format is parquet or orc. (#4810)
* [Broker Load] Ignore empty file when file format is parquet or orc.

We can not ready empty parquet or orc format file. So we should skip them
when doing broker load.
2020-11-10 10:55:48 +08:00
17af23edae 【Improvement】Avoid null host when forward to master (#4844)
Co-authored-by: wangxixu <wangxixu@xiaomi.com>
2020-11-10 10:54:29 +08:00
4204a878c8 [Bug] Fix some bugs of load job scheduler (#4869)
* [Bug] Fix some bugs of load job scheduler

1. The fix load meta bug logic should be removed since 0.12.
2. The load task thread pool's waiting queue should be as long as desired pending jobs num.
3. Submit the load task outside database lock to prevent holding lock for long time.
2020-11-10 10:50:31 +08:00
04cfcf6c36 Update fe-idea-dev.md (#4852)
* Update fe-idea-dev.md

use `brew install thrift@0.9` to install thrift 0.9.3.1
`brew edit thrift090 | head` shows thrift@0.9 uses thrift 0.9.3.1

* [Refactor] Remove the unnecessary if statement

Future<?> submit(Runnable task)
Submits a Runnable task for execution and returns a Future representing that task. The Future's get method will return null upon successful completion.
2020-11-08 20:52:15 +08:00
59c7d5021d [Bug][Load] Catch retry submit exception (#4796)
When `Load Job Task Queue` is filled, continue to submit more jobs to the queue will cause 
`RejectedExecutionException`.
But `callback.onTaskFailed` function does not catch the exception, that will cause
re-submitting job failed, and status is not updated to failed.
issue: #4795
2020-11-08 20:50:50 +08:00
bde84e4ae5 [Bug][SQL] Fix bug that query failed when SQL contains Union and Colocate join (#4842)
SQL like:
`select a join b union select c join d`;

if a b is colocate join, and c d is also colocate join, the query may failed
with error like:

`failed to get tablet. tablet_id=26846, with schema_hash=398972982, reason=tablet does not exist`
2020-11-05 20:57:11 +08:00
1d89e0670a [License] Add other license declare in NOTICE (#4831) 2020-11-05 20:30:49 +08:00
c5b034acc4 [FE UI] Fix some bugs about new FE UI (#4830)
1. Add a search boxer in the left tree view of Playground.
2. Fix some visual bugs of UI.
3. Fix bugs that link failed in QueryProfile view.
4. Fix bugs that cookie is always invalid.
5. Set cookie to HTTP_ONLY to make it more safe.
2020-11-05 20:30:09 +08:00
c8df76a807 [FEATURE]Check date type to avoid scan all partitions (#4756)
`select day from test where day='2020-10-32'`
table 'test' is parititioned by day. In this case, '2020-10-32' will be taken as CastExpr not LiteralExpr,
and condition "day='2020-10-32'" will not be recognized as partitionfilter.
This case will scan all partitions. To avoid scall all partitions, it is better to filter invalid date value.

issue: #4755
2020-11-05 20:25:53 +08:00
80d5f6e3d8 [LoadBalance] make BeLoadRebalancer extends from base class Rebalancer (#4771) 2020-11-03 20:23:48 +08:00
d0b7286099 [optimize] optimize default value for thriftserver's config key "thrift_client_timeout_ms" (#4808)
* optimize  default value for thrift server's config key "thrift_client_timeout_ms"

Co-authored-by: liwei5 <liwei5@vipkid.com.cn>
2020-10-30 17:10:03 +08:00
c03808a4e4 [TabletScheduler] Fix some bug where decommission operations cannot be completed (#4804)
1.
When we decommission some BEs with SSD disks,
if there are no SSD disks on the remaining BEs, it will be impossible to select a suitable destination path.
In this case, we need to ignore the storage medium property and try to select the destination path again.
Set `isSupplement` to true will ignore the storage medium property.

2.
When the BE nodes where all replicas of a tablet are located are decommission,
and this task is a VERSION_INCOMPLETE task.
This will lead to failure to select a suitable dest replica.
At this time, we should try to convert this task to a REPLICA_MISSING task, and schedule it again.
2020-10-30 11:50:47 +08:00
a291f4d285 [SQL][Bug] Fix union bug (#4772) (#4807) 2020-10-30 11:49:43 +08:00
44498a1ae2 [Compatibility] Add table "views" in information_schema database (#4778)
To support some tools like DBeaver
2020-10-30 11:44:44 +08:00
9099191038 remove (#4818)
Co-authored-by: yangwenbo6 <yangwenbo3@jd.com>
2020-10-30 10:05:47 +08:00
6b234fb2ce Fix create rollup may duplicate hidden column (#4816) 2020-10-30 10:04:21 +08:00
fe6ac26b74 [BUG] Cast int type to date type (#4806) 2020-10-29 20:36:45 +08:00
54fa76359b [ODBC] Support ODBC external table of PostgreSQL and revise the doc. (#4798) 2020-10-29 14:31:23 +08:00
bfdb15c730 [Bug] Fix some date functions to make their result same as MySQL (#4786)
dayofweek, dayofmonth, dayofyear, weekofyear, timediff

Also fix ut compilation problem
2020-10-27 12:52:44 +08:00
c8d496830b [Compile] Remove unused import (#4794) 2020-10-26 22:54:27 +08:00
a61eea3b2e Make some debug log settings configurable and change some log level from info to debug to avoid performance bottlenecks (#4766) 2020-10-26 16:10:19 +08:00
f89b660c94 [Feature] Support Alter Table Clause For External Table (#4699)
* Support Alter Table Clause For External Table
5 alter operation be supported:

* RENAME
* ADD COLUMN
* DROP COLUMN
* MODIFY COLUMN
* REORDER COLUMN
2020-10-25 17:17:56 +08:00
2fa3ffda7b change code style (#4776) 2020-10-24 17:36:06 +08:00
0213e93ea1 [Feature][Config] Support persistence of configuration items modified at runtime (#4704)
Support persistence of configuration items modified at runtime via HTTP API.

```
FE:
GET /api/_set_config?key=value&persist=true

BE
POST /api/update_config?key=value&persist=true
```

The modified config will be saved in `fe_custom.conf` or `be_custom.conf`.
And when process starts, it will load `fe.conf/be.conf` first, then `fe_custom.conf/be_custom.conf`.
2020-10-22 21:39:02 +08:00
16f5d223e8 [Compile] Update Repository for java-cup and cup-maven-plugin (#4769) 2020-10-22 21:38:19 +08:00
fae5c624ea Fix delete_sign predicate assigned to join node (#4770) 2020-10-22 14:29:16 +08:00
0c37b42bc7 [Bug] Because of thread-safety problem , replace connectionMap with concurrentMap from hashMap. (#4774)
Thread [Connect-Scheduler-Check-Timer] fail to iterate the connectionMap , because other threads will modify the connectionMap at the same time.
Fe's connection which is timed out can't be released because of thread [Connect-Scheduler-Check-Timer] not working.
2020-10-22 11:15:21 +08:00
349cc9ef17 [Bug] Do not push down limit operation when ODBC table do not push all conjunct as filter. (#4764) 2020-10-21 10:12:12 +08:00
a95ce69c0d [Doc] Bug fix that help commend not work (#4760)
There are 2 docs with same name "bitmap", which cause error
when building help system.
2020-10-20 09:47:51 +08:00