Commit Graph

1430 Commits

Author SHA1 Message Date
8ea5907252 Update arrow's version to 0.15.1 and shaded it in spark-doris-connector (#2769) 2020-01-15 21:08:34 +08:00
9bc306d17c Replace PowerMock/EasyMock by Jmockit (2/4) (#2749) 2020-01-15 20:31:30 +08:00
4496ebb632 [Alter View] Fix bug that alter view operation lost when replaying from image (#2773)
When "replay" something, we should use Catalog.getCurrentCatalog() instead
of Catalog.getInstance(), otherwise, we may get wrong Catalog instance.
2020-01-15 20:04:09 +08:00
7fe6431ac7 Fix delete handler init when schema change (#2767)
delete handler init failed because there are missed version. Schema change should return failure when get version failed.
2020-01-15 15:42:56 +08:00
54952a24ad Remove and comment some FE code (#2766) 2020-01-15 15:14:52 +08:00
9e54751098 [Snapshot] Modify the prefer snapshot version (#2748)
In this CL, prefer snapshot version in snapshot request is defined
in thrift. So that both FE and BE can use this version value.
2020-01-15 15:10:14 +08:00
7768629f08 Add bitmap_contains and bitmap_has_any functions (#2752) 2020-01-15 14:31:44 +08:00
1f0ea2d2e0 Merge pull request #2765 from morningman/routine_load_clean_label
[Routine Load] Fix bug that history routine load jobs are cleaned prematurely
2020-01-15 11:27:33 +08:00
70c7281bf2 [Routine Load] Fix bug that history routine load jobs are cleaned prematurely 2020-01-15 11:18:34 +08:00
e5717efc5a [Insert] Return more info of insert operation (#2718)
Standardize the return results of INSERT operations,
which is convenient for users to use and locate problems.

More details can be found in insert-into-manual.md
2020-01-15 10:39:53 +08:00
9bafcc99f6 Don't balance when Available BE num equals or less then tablet Replica num (#2740) 2020-01-15 10:39:18 +08:00
a36193dfab Support decimal and timestamp type in orc load (#2759) 2020-01-15 07:40:30 +08:00
64b2291347 Allow user to ignore the broken disk (#2755)
Add a BE config `ignore_broken_disk`.
2020-01-14 22:40:43 +08:00
f071d5a307 Support ends_with function (#2746) 2020-01-14 22:37:20 +08:00
ef6cd9ae25 Add files to gitignore (#2753) 2020-01-14 22:29:56 +08:00
e5197eff94 Update the doc of doris to fix some mistakes (#2758) 2020-01-14 22:26:49 +08:00
fafc684e0d [External Table] Fix bug that query external hdfs table throw NPE. (#2756) 2020-01-14 15:44:54 +08:00
1ccd377b33 [Colocate Table] Fix colocate table balance forever (#2744) 2020-01-13 23:13:58 +08:00
273edced77 Replace PowerMock/EasyMock by Jmockit (1/3) (#2732)
This commit replaces the PowerMock/EasyMock in our unit tests, But not all.
PS.(The tests relevant to DescribeStmt are ignored until I find a way to fix it)
2020-01-13 21:28:18 +08:00
a99a49a444 Add bitamp_to_string function (#2731)
This CL changes:

1. add function bitmap_to_string and bitmap_from_string, which will
 convert a bitmap to/from string which contains all bit in bitmap
2. add function murmur_hash3_32, which will compute murmur hash for
input strings
3. make the function cast float to string the same with user result
logic
2020-01-13 12:31:37 +08:00
4e868252fc Add .clang-format and docs (#2724)
The problem of inconsistence style in Doris code is too big, it's hard to minimize modification when reformatting code.
So here, our aim is to make the style rules, tune the config in .clang-format.

Note: I choose clang-format-8.0+ to support richer sytle options.
2020-01-11 20:54:20 +08:00
e00343b6ec Choose tablets in ConsistencyChecker in batch (#2736) 2020-01-11 20:45:06 +08:00
089b358dcd Skip dropped be when choose dest be in TabletScheduler (#2734) 2020-01-11 20:32:26 +08:00
e391fe1e70 [SQL] Ignore the null type when getCmpType (#2730)
In previous versions, if the children of the IN predicate included NULL, all child types would be converted to DOUBLE for calculation.
For example:
select * from t1 where k1 in ('TABLE', NULL);
But children like varchar cannot be converted to double, so the query cannot be executed.
The error is "TABLE is not a number"

The current version, if null exists in the child, it will not enter the calculation of compatibility type.
For the above query, the compatibility type is varchar, so the 'TABLE' is not converted to double, and the query could be executed.

Also, for JDBC. It will convert 'show tables;' to :
```
SELECT
TABLE_SCHEMA AS TABLE_CAT, NULL AS TABLE_SCHEM, TABLE_NAME,
 CASE WHEN TABLE_TYPE='BASE TABLE'
 THEN CASE WHEN TABLE_SCHEMA = 'mysql' OR TABLE_SCHEMA = 'performance_schema'
 THEN 'SYSTEM TABLE' ELSE 'TABLE'END WHEN TABLE_TYPE='TEMPORARY'
 THEN 'LOCAL_TEMPORARY' ELSE TABLE_TYPE END AS TABLE_TYPE, TABLE_COMMENT AS REMARKS, NULL AS TYPE_CAT, NULL AS TYPE_SCHEM, NULL AS TYPE_NAME, NULL AS SELF_REFERENCING_COL_NAME, NULL AS REF_GENERATION
 FROM INFORMATION_SCHEMA.TABLES
 WHERE TABLE_SCHEMA LIKE 'test_db'
 AND TABLE_NAME LIKE '%'
 HAVING TABLE_TYPE IN ('TABLE','VIEW',null,null,null)
 ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME
```
In previous version, Doris could not return the correct tables to JDBC. It will thrown the error "'TABLE' is not a number".
After this commit, #2729 is fixed. Doris could return the tables schema by JDBC.
2020-01-11 14:03:50 +08:00
ccaa97a5ac Make bitmap functions accept any expression that returns bitmap (#2728)
This CL make bitmap_count, bitmap_union, and bitmap_union_count accept any expression whose return type is bitmap as input so that we can support flexible bitmap expression such as bitmap_count(bitmap_and(to_bitmap(1), to_bitmap(2))).

This CL also create separate documentation for each bitmap UDF to conform with other functions.
2020-01-11 14:02:12 +08:00
60dc7c394f Fix rowset state transition bug of release (#2726)
Add on_release to tranfer state when release is called. When release called, state should transfer from unloading to unloaded, not from loaded.
2020-01-10 18:29:54 +08:00
3690f3e917 Add rowset state (#2691)
1. add rowset state to rowset
2. add close api to rowset to release resources
issue: #2665
2020-01-10 14:17:57 +08:00
18a11f5663 Convert from arrow to rowbatch (#2723)
For #2722
In our test environment, Doris cluster used 1 fe and 7 be (32C+128G). When using spakr-doris connecter to query a table containing 67 columns, it took about 1 hour for the query to return 69 million rows of data. After the improvement, the same query condition took 2.5 minutes and the query performance was significantly improved
2020-01-10 14:11:15 +08:00
81be684bae [FE Meta]fix schema change job write edit log error (#2721)
fix when there is no indexChange still write editlog and will not read
2020-01-10 11:12:03 +08:00
4b8f7f9c32 Use cgroups memory limit and cpu cores in container (#2710) 2020-01-10 00:45:50 +08:00
fa4407cf4f Fix bug for cumulative compaction on singleton rowset with multiple segments (#2719)
Row will be scanned mistakenly after cumulative compaction on singleton rowset.
If I have (1, 1), (2, 2), (3, 3) three records.
Now I have read (1, 1), this bug will make return row is (2, 2)
instead of (1, 1).
2020-01-09 21:08:21 +08:00
e7b763309d Skip missing version replica when getQueryableReplicas (#2715) 2020-01-09 17:19:23 +08:00
425b1cf29b Fix port already in use (#2716) 2020-01-09 16:01:17 +08:00
f7cea6dda5 CreateViewStmt/AlterViewStmt support cte and fix bug (#2641)
This commit contains the following changes:
1. Let create/alter view statement support cte sql. (Issue #2625 )

e.g.
```
Alter view test_tbl_view (h1, h2)
as
with testTbl_cte (w1, w2) as 
(
    select col1, col2 from testDb.testTbl
)
select w1 as c1, sum(w2) as c2 from testTbl_cte 
where w1 > 10 
group by w1 order by w1
```

2. Fix the bug that view's schema remains unchanged after replaying alter view. (Issue #2624 )
2020-01-08 23:11:38 +08:00
87b266cd11 Add cpp connect sample (#2685) 2020-01-08 23:10:58 +08:00
6bc54ef3f0 [Document] Add dynamic partition docs (#2711) 2020-01-08 23:08:48 +08:00
e309eb1d40 [Compaction] Rowset with only one segment should be considered as non-overlapping (#2700)
Currently all singleton rowsets with data are considered overlapping upon construction, even when the rowset contains only one segment. In the meanwhile, singleton rowsets could be input to base compaction (when the tablet hasn't been compacted for base_compaction_interval_seconds_since_last_operation) as long as they are converted into non-overlapping rowsets by cumulative compactor.

By making rowset with one segment non-overlapping, we can avoid the work to convert such rowset to non-overlapping rowset in cumulative compaction.
2020-01-08 23:05:11 +08:00
1c9cfa7e0f Fix invalid to_bitmap input lead to BE core (#2706) 2020-01-08 22:14:37 +08:00
a028c52edd Add BE function bitmap_or and bitmap_and (#2707) 2020-01-08 19:59:44 +08:00
d4a3b34319 [Meta Serialization] Support GSON serialization for class "Type" (#2709)
"Type" is a abstract class, it has 4 sub classes:
1. ScalarType
2. ArrayType
3. MapType
4. StructType

This CL only support ScalarType. Other types can be added later.
2020-01-08 19:56:56 +08:00
e90170a5d0 Fix bug: map erase in txn_manager (#2705) 2020-01-08 18:53:11 +08:00
e94d4656d8 Fix roles typo in privilege document (#2702) 2020-01-08 15:39:10 +08:00
b2b2b661ee Update notice year to 2020 (#2696) 2020-01-08 12:54:03 +08:00
367b4c058c [Doc]Remove used doc content about be_rpc_port (#2694) 2020-01-07 22:20:50 +08:00
13e5fdd512 [AlphaRowset] set num_segments field in rowset meta if missing (#2658)
the num segments should be read from rowset meta pb.
But the previous code error caused this value not to be set in some cases.
So when init the rowset meta and find that the num_segments is 0(not set),
we will try to calculate the num segments from AlphaRowsetExtraMetaPB,
and then set the num_segments field.
This should only happen in some rowsets converted from old version.
and for all newly created rowsets, the num_segments field must be set.
2020-01-07 21:46:02 +08:00
4e2f01a9fa [Compaction] Fix a bug that CumulativeCompaction compares time of different precision (#2693)
time(NULL) returns second-resolution timestamp, however all compaction related time in Tablet are in millis-resolution. Therefore should use UnixMillis() instead.
2020-01-07 21:31:36 +08:00
844ccaafc9 Remove boost filesystem exception in FileUtils (#2692)
If `errer_code` is provided, then the `boost::filesystem` functions
will not throw an exception, so we do not need to catch it.
2020-01-07 07:29:05 -06:00
7d2610d091 Change bitmap functions return type to BITMAP (#2690) 2020-01-07 19:27:21 +08:00
852046de29 Fix incompatibility with arm architecture in olap #2645 (#2682) 2020-01-07 19:16:10 +08:00
72fd745086 [Load] Fix broker load's file format npe bug (#2689) 2020-01-07 16:50:02 +08:00