Commit Graph

2786 Commits

Author SHA1 Message Date
81f7c53bad [fix](Nereids) could not query variant that not from table (#33704) 2024-04-17 23:42:13 +08:00
1c025c0488 [docker](hive) add hive3 docker compose and modify scripts (#33115)
add hive3 docker compose from:
big-data-europe/docker-hive#56
2024-04-17 23:42:13 +08:00
22a6b1d3f5 [feature](function) support hll functions hll_from_base64, hll_to_base64 (#32089)
Issue Number: #31320 

Support two hll functions:

- hll_from_base64
Convert a base64 string(result of function hll_to_base64) into a hll.
- hll_to_base64
Convert an input hll to a base64 string.
2024-04-17 23:42:13 +08:00
3096150d1b [feature](agg) support aggregate function group_array_intersect (#33265) 2024-04-17 23:42:13 +08:00
b07e0a2f06 [FIX](cast)fix full/right out join for cast array (#33475)
in some case, we has code
```
        if (_join_op == TJoinOp::RIGHT_OUTER_JOIN || _join_op == TJoinOp::FULL_OUTER_JOIN) {
            _probe_column_convert_to_null = _convert_block_to_null(*input_block);
        }
```
then do next function like cast , but in function cast we assume block column is same with from_type.which will make status error
2024-04-17 23:42:13 +08:00
d15981abd2 [Enhencement](Nereids) add rule of agg(case when) to agg(filter) (#33598) 2024-04-17 23:42:13 +08:00
8e38549a92 [fix](nereids) Use correct PREAGGREGATION in agg(filter(scan)) (#33454)
1. set `PreAggStatus` to `ON` when agg key column by max or min;
2. #28747 may change `PreAggStatus` of scan, inherit it from the previous one.
2024-04-17 23:42:13 +08:00
7b16cb5a4c [feature](inverted index) add slop functionality to match_phrase (#33225)
https://github.com/apache/doris-website/pull/553 doc
2024-04-17 23:42:12 +08:00
06a155abb0 [branch-2.1](cherry-pick) Pick some partial-update PR from master (#33639)
* [Fix](partial-update) Fix partial update fail when the datetime default value is 'current_time' (#32926)

* Problem: When importing data that includes datetime with a default value of current time for partial column updates, the import fails.
Reason: Partial column updates do not handle the logic for datetime default values.
Solution: During partial column updates, when the default value is set to current time, read the current time from the runtime state and write it into the data.

* [Enhancement](partial update)Add timezone case for partial update timestamp #33177

* [fix](partial update) Support partial update when the date default value is 'current_date'. This PR is a extension of PR #32926. (#33394)
2024-04-17 23:42:12 +08:00
4740b22481 [fix](test) fix some p2 external table test cases (#33624)
bp #33621
Also fix a merge bug from #33245
2024-04-17 23:42:12 +08:00
1be753ed75 [enhancement](mysql compatible) add user and procs_priv tables to mysql db in all catalogs (#33058)
Issue Number: close #xxx

This PR aims to enhance the compatibility of BI tools (such as Dbeaver, DataGrip) when using the mysql connector to connect to Doris, because some BI tools query some tables in the mysql database. In our tests, the user and procs_priv tables were mainly queried. This PR adds these two tables and adds actual data to the user table. However, please note that most of the fields in the user table are in Doris' own format rather than mysql format, so it can only ensure that the BI tool is querying No error is reported when accessing these tables, which does not guarantee that the data is completely displayed, and the tables under Doris's mysql database do not support data modification.
Thanks to @liujiwen-up for assisting in testing
2024-04-17 23:42:12 +08:00
48880c3e1a [Fix](timezone) fix miss of expected rounding of Date type with timezone #33553 2024-04-17 23:42:11 +08:00
1f5116f3c1 [testcases](auto-partition) Add and fix testcases in P0 #33588 2024-04-17 23:42:11 +08:00
379c2e0762 [Fix](Nereids) fix leading hint should have all tables in one query block (#33517) 2024-04-17 23:42:00 +08:00
ae4a7c93ac [feat](nereids) support create view in nereids (#32743) 2024-04-17 23:42:00 +08:00
249a9c9875 [Feature](Variant) support aggregation model for Variant type (#33493)
refactor use `insert_from` to replace `replace_column_data` for variable lengths columns
2024-04-17 23:42:00 +08:00
6bcf24b1f6 [bug](not in) if not in (null) could eos early (#33482)
* [bug](not in) if not in (null) could eos early
2024-04-17 23:41:59 +08:00
9dfc9665fb [Fix](inverted index) fix build index error status when batch_next (#33532) 2024-04-17 23:41:59 +08:00
09fb30c989 (Chore)[regression-test] fix unstable output variant case (#33520) 2024-04-17 23:41:59 +08:00
82d2bde3c7 [fix](nereids) do not transpose semi join agg when mark join (#32475) 2024-04-17 23:41:59 +08:00
272269f9c1 [Fix](inverted index) fix fast execute problem when need read data opt enabled (#33526) 2024-04-17 23:41:59 +08:00
e26a53d8a6 [fix](nereids) SemiJoinSemiJoinTransposeProject rule didn't handle mark join correctly (#33401) 2024-04-12 15:09:25 +08:00
78b81d4150 [fix](test) remove distribute node of shape in some regression test (#33463) 2024-04-12 15:09:25 +08:00
d2f84229ec [chore](test) remove some outdated datetime test case (#33476) 2024-04-12 15:09:25 +08:00
b035c7ceb4 [fix](catalog) fix resource is not reopen when rename catalog (#33432)
During the renaming of `JdbcCatalog`, I noticed that the `jdbcClient` was being closed, 
resulting in exceptions during subsequent queries. This happens because the `removeCatalog` 
method is invoked when changing the name, which in turn calls the `onClose` method of the catalog. 
Ideally, the client should not be closed when renaming the catalog. 
However, to avoid extra checks in the `removeCatalog` method, we can simply execute `onRefresh` 
in the `addCatalog` method to address this issue.
2024-04-12 15:09:25 +08:00
9b7af4c0cf [feature](schema change) unified schema change for parquet and orc reader (#32873)
Following #25138, unified schema change interface for parquet and orc reader, and can be applied to other format readers as well.
Unified schema change interface for all format readers:
- First, read the data according to the column type of the file into source column;
- Second, convert source column to the destination column with type planned by FE.
2024-04-12 15:09:25 +08:00
6f96e2b64a [fix](plsql) Fix handle select that fe can do without be (#33363)
CREATE OR REPLACE PROCEDURE procedure_test1()
BEGIN
select 1;
END; 

call procedure_test1()

fix `ERROR 2027 (HY000): Malformed packet`
2024-04-12 15:09:25 +08:00
215f402df7 [fix](nereids)when clause cannot be regarded as common sub expression (#33358)
* when clause cannot be regarded as common sub expression
2024-04-12 15:09:25 +08:00
18fb8407ae [feature](insert)use optional location and add hive regression test (#33153) 2024-04-12 10:38:54 +08:00
07f296734a [regression](insert)add hive DDL and CTAS regression case (#32924)
Issue Number: #31442

dependent on #32824

add ddl(create and drop) test
add ctas test
add complex type test
TODO:
bucketed table test
truncate test
add/drop partition test
2024-04-12 10:24:23 +08:00
716c146750 [fix](insert)fix hive external return msgs and exception and pass all columns to BE (#32824)
[fix](insert)fix hive external return msgs and exception and pass all columns to BE
2024-04-12 10:23:52 +08:00
9ada38327b [feature](txn insert) txn insert support insert into select (#31666) 2024-04-12 10:11:22 +08:00
3d66723214 [branch-2.1](auto-partition) pick auto partition and some more prs (#33523) 2024-04-11 17:12:17 +08:00
e4eb76212a [fix](Nereids): add order for constraint test (#33323) 2024-04-11 09:31:50 +08:00
Pxl
3070eda58c [Bug](load) fix stream load file on hll type mv column (#33373)
fix stream load file on hll type mv column
2024-04-11 09:31:50 +08:00
ea1e542e31 [fix](partial-update) remove unnecessary DECHEK on IndexChannel::num_rows_filtered (#33160) 2024-04-11 09:31:50 +08:00
Pxl
6462264e77 [Improvement](materialized-view) adjust priority of materialized view match rule (#33305)
adjust priority of materialized view match rule
2024-04-10 16:23:04 +08:00
4eee1a1f0d [fix](nereids) make runtime filter targets in fixed order (#33191)
* make runtime filter targets in fixed order
2024-04-10 16:22:39 +08:00
741d4ff97e [fix](group commit) Fix syntax error when insert into table which column names contain keyword (#33322) 2024-04-10 16:22:09 +08:00
4079a7b6ab [fix](txn insert) Fix txn insert into values for sequence column or column name is keyword (#33336) 2024-04-10 16:21:31 +08:00
5e73d7a281 [fix](compaction) fix incorrect grouping of vertical compaction columns in tables only with key columns (#32896) (#33470) 2024-04-10 16:04:33 +08:00
d61b9f7091 [chore](test) nereids support window function but some cases does not open yet (#33098) 2024-04-10 16:00:12 +08:00
Pxl
2092a862fc [Bug](materialized-view) fix wrong result when salias name same with base slot on mv (#33198)
fix wrong result when salias name same with base slot on mv
2024-04-10 16:00:05 +08:00
b85bf3b6b0 [test](cast) add test for stream load cast (#33189) 2024-04-10 15:26:09 +08:00
b696909775 [fix](plsql) Fix plsql variable initialization (#33186) 2024-04-10 15:26:09 +08:00
9670422d61 [fix](inverted index) fix the incorrect result issue of COUNT_ON_INDEX for key columns (#33164) 2024-04-10 15:26:09 +08:00
5e59c09a60 [Fix](nereids) modify the binding aggregate function in order by (#32758)
modify the bind logical to make the order by has same behavior with mysql when sort child is aggregate.
when an order by Expr has aggregate function, all slots in this order by Expr should bind the LogicalAggregate non-AggFunction outputs first, then bind the LogicalAggregate Child
e.g.
select 2*abs(sum(c1)) as c1, c1,sum(c1)+c1 from t_order_by_bind_priority group by c1 order by sum(c1)+c1 asc;
in this sql, the two c1 in order by all bind to the c1 in t_order_by_bind_priority
2024-04-10 15:26:09 +08:00
6798a24a27 [Enhencement](Nereids) reduce child output rows if agg child is literal (#32188)
with group by:
select max(1) from t1 group by c1; -> select 1 from (select c1 from t1 group by c1);
without group by:
select max(1) from t1; -> select max(1) from (select 1 from t1 limit 1) tmp;
2024-04-10 15:26:08 +08:00
0ab8b57db7 [enhance](mtmv)support create mtmv with other mtmv (#32984) 2024-04-10 15:26:08 +08:00
9bc7902e5a [fix](Nereids) fix bind group by int literal (#33117)
This sql will failed because

    2 in the group by will bind to 1 as col2 in BindExpression
    ResolveOrdinalInOrderByAndGroupBy will replace 1 to MIN (LENGTH (cast(age as varchar)))
    CheckAnalysis will throw an exception because group by can not contains aggregate function

select MIN (LENGTH (cast(age as varchar))), 1 AS col2
from test_bind_groupby_slots
group by 2

we should move ResolveOrdinalInOrderByAndGroupBy into BindExpression

(cherry picked from commit 3fab4496c3fefe95b4db01f300bf747080bfc3d8)
2024-04-10 14:59:46 +08:00