Commit Graph

5724 Commits

Author SHA1 Message Date
b99ac973d2 [fix](meta) update killed query state (#) (#25917) 2023-12-19 17:44:15 +08:00
a871409259 [feature](mtmv)after creating a materialized view, if other operations fail, roll back (#28621)
after create mtmv, if create job failed,need drop mtmv
2023-12-19 17:25:31 +08:00
372a2e20f9 [fix](Nereids) stats estimation of lessThan #28444 2023-12-19 15:45:03 +08:00
a104914880 [feature](mtmv)create mtmv support refresh_partition_num (#28566)
- create/alter mtmv support refresh_partition_num
- mtmv task according to refresh_partition_num executes refresh tasks in batches
- `tasks` tvf add column `CompletedPartitions` and `progress`
- fix mtmv can not `show temp partition` and `drop temp partition`
- fix task can not get error msg when insert overwrite error
- fix when the partition field is capitalized, the verification of creating a mtmv does not pass
2023-12-19 15:09:19 +08:00
87d36d0ffa [opt](Nereids)when both Nereids and old parsers report errors, prompt error messages for the Nereids (#28580) 2023-12-19 12:04:08 +08:00
d24a1645d9 [improvement](http) add show_table_data http api (#28380)
In some cases, users need to get the data size of single replica of a table, and evaluate certain actions based on this, such as estimating the precise backup size.

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-12-19 11:44:33 +08:00
ddba98159e [feature](Nereids) support datev1 and datetimev1 (#28581) 2023-12-19 11:31:28 +08:00
8da9bb659d [feature](Nereids): eliminate semi join (#28588)
Eliminate Semi/Anti Join which is FALSE or TRUE.
2023-12-19 11:30:44 +08:00
88f0bee722 [Performance](point query)Opimize partition prune for point query (#28150)
* [Performance](point query)Opimize partition prune for point query
2023-12-19 11:00:13 +08:00
7b7845e695 [fix](planner) choice wrong length of string type output of union (#28514) 2023-12-19 10:43:39 +08:00
Pxl
d6514618b2 [Improvement](decimal) reduce overhead on disable check decimal overflow (#28249)
reduce overhead on disable check decimal overflow
2023-12-19 10:12:30 +08:00
6503aaf7db [feature](planner) allow HLL and QUANTILE_STATE types on duplicate and unique table (#28546) 2023-12-19 09:54:24 +08:00
66fbb22ad7 [fix](group commit) Fix some wal problems on group commit (#28554) 2023-12-19 09:51:03 +08:00
ddcfba0368 [chore](Nereids): remove SemiJoinCommute in rewriter (#28563) 2023-12-18 20:47:17 +08:00
9cf9d568c7 [feature](Nereids): add is null in predicate and put or expansion rule in rewriter (#28348)
add is null in predicate
put or expansion rule in rewrite job
2023-12-18 20:00:32 +08:00
b50bc0d2c9 [fix](Nereids) explain should fallback too if Nereids is not enable (#28475) 2023-12-18 16:44:10 +08:00
6e855dd198 [feature](sql-dialect) support convert sql use sql convertor service (#27581)
Add a new FE Config `sql_convertor_service`.
If this config is set, and the session variable `sql_dialect` is set,
Doris will try to use a standalone sql converter service to convert user input sql to
specified sql dialect. eg:

```
mysql> set sql_dialect="presto";
Query OK, 0 rows affected (0.02 sec)

Database changed
mysql> select * from db1.tbl1 where "k1" = 1;  # will be converted to select * from db1.tbl1 where `k1` = 1;
+------+------+
| k1   | k2   |
+------+------+
|    1 |    2 |
+------+------+
1 row in set (0.08 sec)
```

The sql converter service should be a http service.
The request and response body can be found in `SQLDialectUtils.java`
2023-12-18 10:32:52 +08:00
b06f3edcab [fix](meta) fix meta replay issue when upgrading from v2.0 to master (#28532)
Introduced from #27861

The `dbName` saved in `CreateTableInfo` has `default_cluster` prefix, it should be removed.

Also modify the entry of `getDb` in internal catalog. This is a cover-up plan in case there may still 
db name exist with `default_cluster` prefix.
2023-12-17 22:16:42 +08:00
9b3d4bb5bc [fix](Export) Fix an export error when lower_case_table_names=1 (#28389) 2023-12-17 20:45:43 +08:00
0f3c544260 [feature](mtmv)mtmv support partition (#28144)
- create MTMV support partition and `AUTO` refresh method
- refresh mtmv support support specified partitions
- MTMV support incremental updates
- add property `EXCLUDED_TRIGGER_TABLES` for mv
- Maintain MTMVCache after successful task refresh for plan rewrite(MTMV.getOrGenerateCache)
- show partitions add "SyncWithBaseTables"
- drop job before drop MTMV
- task tvf add "MvId,MvDatabaseId,ErrorMsg,TaskContext,RefreshMode,RefreshPartitions"
- add `NotAllowFallback` for mtmv not fallback to old planner
- add `MTMVUtils.getMTMVCanRewritePartitions() `and `Env.getCurrentEnv().getMtmvService().getRelationManager().getAvailableMTMVs()` for plan rewrite
2023-12-17 18:28:03 +08:00
2f775260d7 [bugfix](jdbc catalog) refresh catalog close jdbcclient (#28300) 2023-12-16 23:38:24 +08:00
61ad3b8dc4 [fix](nereids)LogicalCTEConsumer's output lost column info in SlotReference (#28452) 2023-12-16 23:35:09 +08:00
8c05f7a784 [refactor](cluster)(step-4) remove cluster related to Database (#27861)
Issue Number: #19897

Remove `default_cluster` prefix related to database.
When upgrading, all prefix will be removed.
2023-12-16 18:28:53 +08:00
a3e2c6affe [fix](jdbc catalog) fix JdbcScanNode NOT CompoundPredicate filter expr handling errors (#28497) 2023-12-16 12:54:55 +08:00
92a4a9770c [improvement](hint) query fail print tablet detail info (#28476) 2023-12-16 12:54:25 +08:00
3ea68d576b [improve](group commit) Fix select tablet policy for random partition and remove some log (#28498)
This pr contains 2 improvements:

For random partition table, select tablet in the original way for load balance;
Skip execute stmt audit log since it's expensive in CPU;
2023-12-16 11:02:52 +08:00
f12a225844 [fix](session variables) Make default value of max_execution_time same to query_timeout #28474
Current problem, UNSET global VARIABLE ALL will write an oplog, which makes query_timeout = 0 when we replay it in a future time-stamp. So we change default value of max_execution_time to 90000 which is consistent to query_timeout default value.
2023-12-16 10:59:05 +08:00
0f93ee8793 [fix](Nereids): TransposeSemiJoinAgg can't apply in Scalar Agg (#28434)
Scalar Agg shouldn't be pushdown, it will cause wrong result
2023-12-15 16:18:16 +08:00
8986bb6bb4 [fix](Planner): parse more Punctuation Date/DateTime (#28432)
parse more Punctuation as separator, like `2021@01@01 00/00/00`;
2023-12-15 16:17:44 +08:00
97b033813a [perf](Nereids) add back canEliminate temporary (#28017) 2023-12-15 14:26:29 +08:00
e6b135c76a [improvement](fe) Add reason log when Env is not ready (#28286) 2023-12-15 12:22:06 +08:00
4c51558f6b [feature](nereids) Support basic aggregate rewrite and function rollup using materialized view (#28269)
Add aggregate materializedviewRules for query rewrite.
it support the query rewrite as following:

    def mv = "select lineitem.L_LINENUMBER, orders.O_CUSTKEY, sum(O_TOTALPRICE) as sum_alias " +
            "from lineitem " +
            "inner join orders on lineitem.L_ORDERKEY = orders.O_ORDERKEY " +
            "group by lineitem.L_LINENUMBER, orders.O_CUSTKEY "
    def query = "select lineitem.L_LINENUMBER, sum(O_TOTALPRICE) as sum_alias " +
            "from lineitem " +
            "inner join orders on lineitem.L_ORDERKEY = orders.O_ORDERKEY " +
            "group by lineitem.L_LINENUMBER"
2023-12-15 11:30:02 +08:00
c4242ab69e [Chore](Job)Add the configuration of the maximum number of persistence tasks for the job (#28411) 2023-12-15 11:14:06 +08:00
Pxl
8661b5ec21 [Bug](function) fix npe on select http_stream directly (#28423)
fix npe on select http_stream directly
2023-12-15 11:09:45 +08:00
1877389f12 [fix](Nereids) set card to olap table break card block rule (#28417)
we have card block rule to avoid scan too many data.
so we must set olap scan card by only scanned bucket.
2023-12-15 10:28:05 +08:00
415c6d854d [fix](partial update) Fix some bugs about partial update (#28358) 2023-12-15 00:04:29 +08:00
8ca7bd8f98 [enhancement](bitmap)support bitmap type for non-key column in duplicate table (#28392) 2023-12-14 23:59:12 +08:00
4300fdce43 [feature](merge-on-write) enable merge-on-write by default again (#28105)
fix #27188, #28096
2023-12-14 19:35:52 +08:00
a540b7eb43 [fix](Nereids) multi_distinct_sum should inherit NullableAggregateFunction (#28349) 2023-12-14 19:27:06 +08:00
429a3ed4df [fix](Nereids) simplify range produce true when reference is nullable (#28386)
if reference is nullable, even if range is all, we should not return
true, but should return reference is not null. for example,

before simplify: c1 > 5 or c1 < 10
after simplify:
    c1 is nullable: c1 IS NOT NULL
    c1 is not nullable: TRUE
2023-12-14 18:10:17 +08:00
01c94a554d [fix](autoinc) Fix broker load when target table has autoinc column (#28402) 2023-12-14 18:02:54 +08:00
c08ab9edc7 [feature](HiveCatalog) Support for getting hive meta data from relational databases under HMS (#28188) 2023-12-14 17:50:17 +08:00
ee24667b9f [fix](group commit) Fix some group commit problems (#28319) 2023-12-14 14:38:56 +08:00
bb23078d43 [feture](Nereids) support delete from without using (#28083)
support sql: DELETE FROM <table_name> WHERE <predicates>
2023-12-14 13:54:33 +08:00
e5a57f82ec [fix](Variant Type) Fixes the desc failure (#28343)
fix the desc failure when there is no decomposition of columns in the variant column.
2023-12-14 13:20:43 +08:00
c00dca70e6 [pipelineX](local shuffle) Support parallel execution despite of tablet number (#28266) 2023-12-14 12:53:54 +08:00
099b1b7106 [fix](statistics)Fix column stats trigger info bug (#28303)
Before, we didn't update the jobType info in ColStatsMeta. This will case the jobType always be the type
when it first be set. For example, if we manually analyzed table, the jobType will always be MANUAL,
even if this table is auto analyzed again later.
2023-12-13 20:31:03 +08:00
0868526f6a [fix](sequence column) fix update fail on nereids planner (#28031)
1. if we set enable_fallback_to_original_planner to false, the UPDATE sql in regression case test_unique_table_sequence will fail due to:“Table test_uniq_sequence has sequence column, need to specify the sequence column”,The bug is introduced by [fix](sequence column) insert into should require sequence column in all scenario #27780
2. fix insert fail in transaction mode, which is introduced by [refactor](Nereids) let insert into compatible with legacy planner #27947
3. add cases with session variable enable_fallback_to_original_planner false
2023-12-13 19:41:41 +08:00
dbc2b081d7 [fix](Nereids) could not do partition prunning when predicates is NULL (#28294) 2023-12-13 19:36:42 +08:00
ea832744df [fix](journal) ensure txns are matched with the master before replaying (#28192) 2023-12-13 18:14:51 +08:00