Commit Graph

9679 Commits

Author SHA1 Message Date
eb6dbc03e0 [typo](docs) add regression test doc & fix api doc (#18329) 2023-04-03 17:40:41 +08:00
d4688620e9 [opt](array) optimize array_sortby using qsort instead of bubble sort #18311 2023-04-03 17:10:51 +08:00
96a64dc9e8 [Improvement](pipeline) Use bloom runtime filter by default for pipeline engine (#18177) 2023-04-03 15:31:48 +08:00
368a2f7ace [Bug](decimal) Fix string to decimal (#18282) 2023-04-03 15:30:48 +08:00
3078ee1854 [regression](decimalv3)Add decimal type as filter condition in regression test (#17160)
Add decimal type as filter condition in regression test
2023-04-03 14:20:09 +08:00
aff260c06f [Enhancement](HttpServer) Support https interface (#16834)
1. Organize http documents
2. Add http interface authentication for FE
3. **Support https interface for FE**
4. Provide authentication interface
5. Add http interface authentication for BE
6. Support https interface for BE
2023-04-03 14:18:17 +08:00
ecd3fd07f6 [feature](colocate) support cross database colocate join (#18152) 2023-04-03 14:03:42 +08:00
e260dca7a1 [Improvement](multi catalog)Change hive metastore cache split value type to Doris defined Split. Fix split file length -1 bug (#18319)
HiveMetastoreCache type for file split was Hadoop InputSplit. In this pr, change it to Doris defined Split
This change could avoid convert it every time.
Also fix the explain verbose result return -1 for split file length.
2023-04-03 13:54:28 +08:00
6677841b7e [fix](merge-on-write) fix that failed to capture_consistent_rowsets when revise tablet meta (#18283)
Should modify _timestamped_version_tracker firstly before capture_consistent_rowsets when update delete bitmap in revise_tablet_meta.
2023-04-03 13:02:34 +08:00
961f5d1bb7 [feature](function)Add St_Angle/St_Azimuth function (#18293)
Add St_Angle/St_azimuth function:
St_Angle:
Enter three point, which represent two intersecting lines. Returns the angle between these lines. Point 2 and point 1 represent the first line and point 2 and point 3 represent the second line. The angle between these lines is in radians, in the range [0, 2pi). The angle is measured clockwise from the first line to the second line.

`

mysql> SELECT ST_Angle(ST_Point(1, 0),ST_Point(0, 0),ST_Point(0, 1));
+----------------------------------------------------------------------+
| st_angle(st_point(1.0, 0.0), st_point(0.0, 0.0), st_point(0.0, 1.0)) |
+----------------------------------------------------------------------+
| 4.71238898038469 |
+----------------------------------------------------------------------+
1 row in set (0.04 sec)
`

St_azimuth:
Enter two point, and returns the azimuth of the line segment formed by points 1 and 2. The azimuth is the angle in radians measured between the line from point 1 facing true North to the line segment from point 1 to point 2.
`

mysql> SELECT st_azimuth(ST_Point(0, 0),ST_Point(1, 0));
+----------------------------------------------------+
| st_azimuth(st_point(0.0, 0.0), st_point(1.0, 0.0)) |
+----------------------------------------------------+
| 1.5707963267948966 |
+----------------------------------------------------+
1 row in set (0.04 sec)
2023-04-03 13:01:59 +08:00
Pxl
e77833bfa1 [Bug](materialized-view) fix where clause persistence replay incorrect (#18228)
fix where clause persistence replay incorrect
2023-04-03 12:49:01 +08:00
94e3472050 [bug](function) fix count equal function return incorrect value (#18200)
fix count equal function return incorrect value
2023-04-03 11:20:36 +08:00
ce4dc681be [test](stats) Test framework for stats estimation on TPCH-1G dataset (#18267)
Implement a test framework for stats estimation on TPCH-1G dataset to ensure accuracy
2023-04-03 11:01:57 +08:00
2bce4db81a [Enchancement](mysql-compatable) add regression-test for MySQLdump #18208
add regression-test for like this:
mysqldump -h127.0.0.1 -P9030 -uroot --no-tablespaces --databases > /backup/mysqldump/test.db

To prevent errors Unknown table 'column_statistics' in information_schema (1109), the table information_schema.column_statistics was added.
2023-04-03 09:49:07 +08:00
7cd8f7c9ba [fix](grouping) fix coredump of grouping function for outer join (#18292)
Result of functions grouping and grouping_id is always not nullable, but outer join will convert the result column to nullable when necessary, which will cause mismatch of column type and column object when executing unctions grouping and grouping_id.
2023-04-03 09:35:31 +08:00
b66e9f8906 [fix](load) handle null map right in OlapDataConvertor (#18236)
The offset of _nullmap and _value are inconsistent in OlapDataConvertor, so the obtained null flag is incorrect when calling get_ data_ at function. When the key column or sequence column has null values, the encoding of the short key index or primary key index may be wrong.
This was introduced by #10883 #10925.
2023-04-03 09:14:05 +08:00
b9381570d6 [feature](nereids) semi and anti join estimation (#18129)
in this pr, we add a new algorithm to estimate semi/anti join row count.
In original alg., we reduce row count from cross join. usually, this is not good.
for example, L left semi join R on L.a=R.a
suppose L is larger than R, and ndv(L.a) < ndv(R.a)
the estimated row count is rowcount(R) * rowcount(L) / ndv(R.a). in most cases, the estimated row count is larger than rowcount(L).

in new alg, we use ndv(R.a)/originalNdv(R.a) to estimate result rowCount. the basic idea is as following:
1. Suppose ndv(R.a) reduced from m to n.
2. Assume that the value space of L.a is the same as R.a if R.a is not filtered.(this assumption is also hold in original alg.)
regard `L left join R` as a filter applied on L, that is, if L.a is in R.a, then this tuple stays in result.
R.a shrinks to m/n, so L.a also shrinks to m/n
2023-04-03 09:11:10 +08:00
4b914c196a [fix](expr pushdown) Fix VRuntimeFilterWrapper cannot get children #18289 2023-04-03 09:09:52 +08:00
03e49b986d [fix](conf) fix be JAVA_OPTS conf #18305
Co-authored-by: zhangyu209 <zhangyu209@meituan.com>
2023-04-03 09:07:13 +08:00
03fc41ea51 [doc](catalog) add faq for hive catalog (#18298) 2023-04-03 09:01:49 +08:00
8011bdb30d [improvement](test) print exception when streamload fails (#18315) 2023-04-03 08:56:54 +08:00
7131c60e05 [fix](audit-log) fixslow query missing in audit log (#18317)
#17738 changed the column name in audit log, causing "slow_query" will not be recorded in fe.audit.log
2023-04-03 08:52:14 +08:00
4fcd93ac00 [Enhancement](Nereids)add datelikev2 type support for fold constant. #18275
add datelikev2 type support for fold constant.
date_add / years_add / mouths_add / days_add / hours_add / minutes_add / seconds_add and xxx_sub.
2023-04-03 08:47:47 +08:00
ff66efd7d0 [improvement](test) print response of streamload (#18313)
We need reponse text to reason failures of streamload.
2023-04-02 20:08:28 +08:00
419aa4f12a [fix](thrift_server) do not check started state in ThriftServer::join (#18314)
started may be set to false when server thread is stopped.
2023-04-02 19:24:41 +08:00
04929ff6d4 [fix](doc) suggest use window function to replace running_difference (#18281) 2023-04-02 16:35:10 +08:00
7d49d9cf99 [improvement](dynamic partition) Fix dynamic partition no bucket (#18300)
Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
2023-04-02 15:51:21 +08:00
97aab138aa [fix](parquet-reader) reset value idx in bool rle decoder and support iceberg datetime(3) (#18245)
1. Fix value  idx in bool rle decoder 
2. Iceberg table support datetimev2(3).  In the previous version, we converted hive timestamp to datetimev2(0) default.
2023-04-01 21:00:01 +08:00
9e087622ab [fix](Nereids): fix JoinReorderContext in withXXX() of LogicalJoin. (#18299) 2023-04-01 16:51:27 +08:00
365867a867 [feature](SSL) default enable SSL MySQL connection to FE (#18285) 2023-03-31 21:31:23 +08:00
5e7ea5e305 [fix](memory) Fix bthread_setspecific log fatal on UBSAN build (#18274) 2023-03-31 19:46:53 +08:00
Pxl
236ee1411e [Chore](case) add p0 testSubQuery,testJoinOnLeftProjectToJoin,testAggregateMVCalcAg 2023-03-31 19:46:05 +08:00
7e61a85331 [refactor](libhdfs) introduce hadoop libhdfs (#18204)
1. Introduce hadoop libhdfs 
2. For Linux-X86 platform, use the hadoop libhdfs
3. For other platform, use libhdfs3, because currently we don't have  hadoop libhdfs binary for other platform

Co-authored-by: adonis0147 <adonis0147@gmail.com>
2023-03-31 18:41:39 +08:00
a77921d767 [refactor](typesystem) remove unused rpc common file and using function rpc (#18270)
rpc common is duplicate, all its method is included in function rpc. So that I remove it.
get_field_type is never used, remove it.
---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-31 18:13:25 +08:00
3ea98b65df [Fix](Nereids) fix nereids failed to parse set operation with query in parenthesis (#18062)
sql like the format (q1, q2, q3 is a query): 

``` sql
(q1) 
UNION ALL (q2)
UNION ALL (q3)
ORDER BY keys
```
cannot be parsed by nereids, because order will be recognized as an alias of query, we add queryOrganization to avoid it.
2023-03-31 15:55:52 +08:00
22a705543b [fix](string_ref) Incorrect result caused by the improperly comparing of StringRef on macOS with Apple silicon or using non-avx2 #18264
On macOS systems with Apple silicon, the '==' operator of StringRef uses string_compare, which takes StringRef as a C-String with null-terminated chars.
2023-03-31 15:11:11 +08:00
c3e2269c4c [fix](merge-on-write) fix that missed rows don't match merged rows for base compaction (#18262) 2023-03-31 15:06:51 +08:00
1027abe0d3 [enhancement](query exec) should print error status when query meet error (#18247)
If BE is in heavy load, the query may failed, but BE will try to connect to FE using thrift, if FE is also in heavy load the thrift connection will failed. And the status is rewritten at line 342, and the actual failure reason for the query is lost. Should print the error status every time during update.
Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-31 14:08:24 +08:00
1a56c56e90 [fix](planner) lateral view do not support lower case table name config (#18165)
TableFunctionNode lower_case_table_names set to 1 and 2
2023-03-31 13:42:24 +08:00
1c2f95b887 [improve](clickhouse jdbc) support clickhouse jdbc 4.x version (#18258)
In clickhouse's 4.x version of jdbc, some UInt types use special Java types, so I adapted Doris's ClickHouse JDBC External
```
com.clickhouse.data.value.UnsignedByte;
com.clickhouse.data.value.UnsignedInteger;
com.clickhouse.data.value.UnsignedLong;
com.clickhouse.data.value.UnsignedShort;
```
2023-03-31 13:40:10 +08:00
20b3bdb000 [vectorized](function) support array_first_index function (#18175)
mysql> select array_first_index(x->x+1>3, [2, 3, 4]);
+-------------------------------------------------------------------+
| array_first_index(array_map([x] -> x(0) + 1 > 3, ARRAY(2, 3, 4))) |
+-------------------------------------------------------------------+
|                                                                 2 |
+-------------------------------------------------------------------+

mysql> select array_first_index(x -> x is null, [null, 1, 2]);
+----------------------------------------------------------------------+
| array_first_index(array_map([x] -> x(0) IS NULL, ARRAY(NULL, 1, 2))) |
+----------------------------------------------------------------------+
|                                                                    1 |
+----------------------------------------------------------------------+

mysql> select array_first_index(x->power(x,2)>10, [1, 2, 3, 4]);
+---------------------------------------------------------------------------------+
| array_first_index(array_map([x] -> power(x(0), 2.0) > 10.0, ARRAY(1, 2, 3, 4))) |
+---------------------------------------------------------------------------------+
|                                                                               4 |
+---------------------------------------------------------------------------------+
2023-03-31 12:51:29 +08:00
Pxl
307170030c [Bug](materialized-view) fix core dump when create mv have case different with base table (#18206)
fix core dump when create mv have case different with base table
2023-03-31 12:32:09 +08:00
1b2aaab2f2 [vectorized](bug) fix some case in enable fold constant (#17997)
fix some case in enable fold constant
2023-03-31 11:41:31 +08:00
f800ba8f4c [Exec](opt) Optimize function call for const columns (#18212) 2023-03-31 11:36:21 +08:00
Pxl
e7bcd970f5 [Bug](materialized-view) fix isDisableTuplesMVRewriter rreturn true when expr is literal (#18246)
fix isDisableTuplesMVRewriter rreturn true when expr is literal
2023-03-31 11:30:47 +08:00
8e15388074 [fix](Nereids): use CBO rule instead of using rewrite rule. (#18256) 2023-03-31 11:23:26 +08:00
1938899aa3 [regression-test] add grouping sets test case (#18194) 2023-03-31 11:00:38 +08:00
35bae25568 [Improve](row store) add more profile info in log for point query and make row column page size more configurable (#18181)
save about 20% FE cpu cost for point query with prepared statement which table contains 100 columns
2023-03-31 10:58:59 +08:00
7d92bf095a [fix](expr) refractor create_tree_from_thrift to avoid stack overflow (#18214) 2023-03-31 10:38:20 +08:00
479272f86f [bugfix](topn) fix topn optimzation wrong result for NULL values (#18121)
1. add PassNullPredicate to fix topn wrong result for NULL values
2. refactor RuntimePredicate to avoid using TCondition
3. refactor using ordering_exprs in fe and vsort_node
2023-03-31 10:02:07 +08:00