Commit Graph

8289 Commits

Author SHA1 Message Date
8e9e1b1bfd [fix](planner) Disable infer expr column name when query on old optimizer (#25317)
Disable infer expr column name when query on old optimizer.
This bug is be brought in #24990

if your query SQL is
select id, name, sum(target) FROM db_test.table_test2 group by id, name;
the result column name when query is as following:
|id|name |sum(cast(target as DOUBLE))|

when you create view as following:
CREATE VIEW v1 as select id, name, sum(target) FROM db_test.table_test2 group by id, name;
then query the view v1, the result is as following:
|id|name |__sum_2|
2023-10-16 02:08:52 -05:00
1a27ac8d56 [opt] use correct column label when execute query in FE (#25372)
SET @a = '4';
SELECT @a;

previous:
+-----+
| '4' |
+-----+
| 4   |
+-----+

current:
+----+
| @a |
+----+
| 4  |
+----+
2023-10-16 02:03:33 -05:00
f698f205d5 [Fix](merge-on-write) throw exception when the user don't specify the insert columns in insert statement for partial update (#25437) 2023-10-16 14:05:06 +08:00
29d4e8ee90 [Fix](Nereids) fix test leading change disable join reorder parameter (#23657)
Problem:
when running pipeline, we get randomly failed of test_leading
Reason:
physical distribute was generated and choosed to be the best plan because we can not get any statistic information of empty table. So we would get some unexpect result because we can not expect the order in memo
Solved:
Add statistic of columns used in test_leading, try repeatly in pipeline
2023-10-15 22:59:45 -05:00
934d82816c [fix](Nereids) add int type alias 'integer' (#25376) 2023-10-15 22:12:44 -05:00
4c57c31c5c [fix](Nereids) count should not accept complex and json type (#25354) 2023-10-15 22:08:35 -05:00
dfc7d04626 [fix](functions) add quantile_state_empty function signature (#25306) 2023-10-16 11:05:48 +08:00
471cf2c48b [improvement](auth) support show view priv (#25370)
Issue Number: close #xxx

current ,if user has select_priv or load_priv,he can show create table view_name,
but this is not safe,so add show_view_priv for show create table view_name

mysql SHOW VIEW description: https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_show-view
2023-10-14 22:37:51 +08:00
03316e2355 [fix](fe rest api)api gets execution plan, table name case problem (#25112)
The user has configured the parameter lower_case_table_names, which ignores the case of the table name. When executed on the SQL client, the table name can be queried in both case.
But when using Connector to read doris data, the table names must be in the same case, otherwise an error will be reported.
2023-10-14 19:48:24 +08:00
e5ef0aa6d4 [refactor](mysql result format) use new serde framework to tuple convert (#25006) 2023-10-14 19:46:42 +08:00
6bb0c918eb [fix](statistics) use replication_num as replica num (#25325) 2023-10-13 20:14:25 +08:00
b56eecb341 update secure flag to false (#25412)
update secure flag to false
2023-10-13 17:00:58 +08:00
522faa8cd2 [fix](jni) the offset in map type is int64 (#25394)
The offset in map type column is int64, but #24810 has put as int32, causing error like:
2023-10-13 14:23:17 +08:00
6757d2f361 Revert "[Enhancement](show-backends-disks) Add show backends disks (#24229)" (#25389)
This reverts commit 21223e65c59c23cfcb9e8ab610ea321168bcb75a.
2023-10-13 14:08:45 +08:00
6f9a084d99 [Fix](Outfile) Use data_type_serde to export data to parquet file format (#24998) 2023-10-13 13:58:34 +08:00
4f65a9c425 [fix](auth)fix not display be_port (#25197)
fix not display be_port who has ADMIN_PRIV
2023-10-13 11:56:00 +08:00
ffacbe7d74 [feature](thrift) Add FE thrift rpc redirect master address (#25371)
Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
2023-10-13 11:17:46 +08:00
aa0b74d63a [improvement](fe and broker) support specify broker to getSplits, check isSplitable, file scan for HMS Multi-catalog (#24830)
I want to use Doris Multi-catalog to accelerate HMS query. My organization has custom distributed file system, and we think wrapping the fs access difference into broker (listLocatedFiles, openReader..) would be a elegant approach.

This pr introduce HMS catalog conf `bind.broker.name`. If we set this conf, file split, query scan operation will send to broker.

usage:
create a hms catalog with broker usage
```
CREATE CATALOG hive_catalog_broker PROPERTIES (
    'type'='hms',
    'hive.metastore.uris' = 'thrift://xxx',
    'broker.name' = 'hdfs_broker'
);
```
When we try to query from this catalog, file split and query scan request will send to broker `hdfs_broker`.

More details about this pr:
1. Introduce HMS catalog proporty `bind.broker.name` to specify broker name to do remote path work. When `broker.name` is set, `enable.self.splitter` must be `true` to ensure file splitting process is executed in Fe
2. Introduce 2 more interfaces to broker service:
- `TBrokerIsSplittableResponse isSplittable(1: TBrokerIsSplittableRequest request)`, helps to invoke input format `isSplitable` interface.
- `TBrokerListResponse listLocatedFiles(1: TBrokerListPathRequest request)`, helps to do `listFiles` or `listLocatedStatus` for remote file system
3. 3 parts of whole processing will be executed in broker:
- Check whether the path with specified input format name `isSplittable`
- `listLocatedFiles` of table / partition locations.
- `OpenReader` for specified file splits.

Co-authored-by: chenlinzhong <490103404@qq.com>
2023-10-13 11:04:38 +08:00
a30d30e7b5 [improvement](resource-tag) limit the default user's resource tag to 'default' (#25331)
In previous, if user property `'resource_tags.location'` is not set, the can use Backends with any resource tag.
It may confuse that when the DBA set part of Backends to resource group A, then the current existing user
should not be able to use this group A util it's `'resource_tags.location'` is set.

So in this PR, I change the behavior, that if user property `'resource_tags.location'` is not set, it can only use the
Backends with `default` tag.
2023-10-13 10:50:00 +08:00
11bbeb9a21 [Enhance](resource group)db support replication_allocation (#25195)
- db support replication_allocation,when create table,if not set `replication_num` or `replication_allocation `,will use it in db
- fix partition property will disappear when table partition is not null
2023-10-13 10:24:01 +08:00
21223e65c5 [Enhancement](show-backends-disks) Add show backends disks (#24229)
* Add statement to query disk information corresponding to data directory of BE node


[msyql]->'show backends disks;'
+-----------+-------------+------------------------------+---------+----------+---------------+-------------+-------------------+---------+
| BackendId | Host | RootPath | DirType | DiskState| TotalCapacity | UsedCapacity| AvailableCapacity | UsedPct |
+-----------+-------------+------------------------------+---------+----------+---------------+-------------+-------------------+---------+
| 10002 | 10.xx.xx.90 | /home/work/output/be/storage | STORAGE | ONLINE | 7.049 TB | 2.478 TB | 4.571 TB | 35.16 % |
| 10002 | 10.xx.xx.90 | /home/work/output/be | DEPLOY | ONLINE | 7.049 TB | 2.478 TB | 4.571 TB | 35.16 % |
| 10002 | 10.xx.xx.90 | /home/work/output/be/log | LOG | ONLINE | 7.049 TB | 2.478 TB | 4.571 TB | 35.16 % |
+-----------+-------------+------------------------------+---------+----------+---------------+-------------+-------------------+---------+
2023-10-12 20:24:45 +08:00
66db3c9deb [Fix](mvn source) Fix fe compile java-cup and cup-maven-plugin not found #25348
use official address
2023-10-12 19:21:55 +08:00
0a38546596 [opt](Nereids) reject group commit insert temporarily (#25359)
group commit insert introduced by PR #22829. since nereids has not
support it, we forbid it temporarily on Nereids until impl it.
2023-10-12 06:20:59 -05:00
bdb64eab73 [feature](meta) queries as table valued function (#25052) (#25052)
1. Add queries view as table function.
2. Proxy result to other FEs and return merged results back to BE.

Co-authored-by: yiguolei <676222867@qq.com>
2023-10-12 16:26:14 +08:00
d6ff9744c9 [feature](Nereids) covert predicate to SARGABLE (#25180)
covert predicate to SARGABLE 
1. support format like `1 - a`
2. support rearrange `year/month/week/day/minutes/seconds_sub/add` function
2023-10-12 14:46:56 +08:00
c63bf24c84 [Improvement](statistics) Improve sample count accuracy (#25175)
While doing sample analyze, the result of row count, null number and datasize need to multiply a coefficient based on 
the sample percent/rows. This pr is mainly to calculate the coefficient according to the sampled file size over total size.
2023-10-12 14:42:02 +08:00
80a49ed97a [fix](nereids)fix some function signature issue (#25301)
1. remove wrong signature of nvl
2. the promoted type datetimev2 for datetime should be datetimev2(0)
2023-10-12 01:23:20 -05:00
a0d3206d78 [fix](Nereids) support nested complex type literal (#25287) 2023-10-12 01:17:38 -05:00
42f8b253aa [function](nereids) support array_apply/array_repeat/group_uniq_array/ipv4numtostring (#25249)
nereids support functions: array_apply/array_repeat/group_uniq_array/ipv4numtostring
2023-10-12 11:08:42 +08:00
Pxl
a0d2b1ec56 [Bug](materialized-view) fix not match mv when some alias on agg (#25321)
fix not match mv when some alias on agg
2023-10-12 11:02:55 +08:00
9a4baf7ccf [fix](Nereids)Fix the bug that count(*) does not push down for tables with only one column. (#25222)
after pr #22115 .

Fixed the bug that when selecting count(*) from table, if the table has only one column, the aggregate count is not pushed down.
2023-10-11 23:17:30 +08:00
d1f59a4025 [fix](catalog)fix when modifying comments in property, it will modify the comments in the catalog (#24857)
- fix when modifying comments in property, it will modify the comments in the catalog
- add `alter catalog modify comment` to modify comment for catalog
- abstract some logic of `alter catalog` to parent class
2023-10-11 23:16:19 +08:00
73c3e3ab55 [Feature](x-load) support config min replica num for loading data (#21118) 2023-10-11 21:07:35 +08:00
ba87f7d3a3 [fix](pipelineX) add table sink and some fix in pipelineX (#25314) 2023-10-11 20:18:08 +08:00
46be6c07e1 [opt](Nereids) expose multi distinct functions (#25309) 2023-10-11 05:42:39 -05:00
1e300d895d [improvement](checkpoint) checkpoint thread update tablet invert index (#25098) 2023-10-11 18:18:03 +08:00
2d19f2fbfe [fix](planner)need call materializeSrcExpr for materialized slots in join node (#25204) 2023-10-11 16:34:53 +08:00
dabeeb0338 [fix](planner)should always use plan node's getTblRefIds method to get unassigned conjuncts for this node (#25130) 2023-10-11 16:34:21 +08:00
2221c8e2ed [fix](planner)implicit cast should use type member variable instead of targetTypeDef (#24582) 2023-10-11 16:33:48 +08:00
e9554e36a8 [fix](nereids)disable parallel scan in some case (#25089) 2023-10-11 16:32:09 +08:00
a9b84ae6ee [test](nereids)add more case in PushdownFilterThroughAggregationTest (#24927) 2023-10-11 16:14:36 +08:00
6d999f5b95 [enhancement](nereids)add eliminate filter on one row relation rule (#24980)
1.simplify PushdownFilterThroughSetOperation rule
2.add eliminate filter on one row relation rule
2023-10-11 16:12:24 +08:00
47578c0fc9 [fix](Nereids) fix toSql of date literal (#25243)
toSql should return '2023-2-1 ' for DateLiteral 2023-2-1
2023-10-11 13:04:05 +08:00
0d603dd4c3 [Bug](delete) Use date as common type for date comparison (#25262) 2023-10-11 11:51:43 +08:00
1e6d34d1d0 [Enhancement](sql-cache) Add partition update time for hms table and use it at sql-cache. (#24491)
Now FE does not record the update time of hms tbl's partitons, so the sql cache may be hit even the hive table's partitions have changed. This pr add a field to record the partition update time, and use it when enable sql-cache.
The cache will be missed if any partition has changed at hive side.

Use System.currentTimeMillis() but not the event time of hms event because we would better keep the same measurement with the schemaUpdateTime of external table. Add this value to ExternalObjectLog and let slave FEs replay it because it is better to keep the same value with all FEs, so the sql-cache can be hit by the querys through different FEs.
2023-10-11 11:05:16 +08:00
b91bce8a62 [feature](Nereids) add array distance functions (#25196)
- l1_distance
- l2_distance
- cosine_distance
- inner_product
2023-10-10 21:35:06 -05:00
d4673ce28a [Feature](Job)Jobs in the Finish state will be automatically deleted after three days. (#25170) 2023-10-11 10:04:19 +08:00
fb3b888ff1 [prune](partition)support prune partition when is auto partition with function call (#24747)
now create table use auto create partition:
AUTO PARTITION BY RANGE date_trunc(event_day, 'day')
so the value of event_day will be insert into partition of date_trunc(event_day, 'day'),
eg: select * from partition_range where date_trunc(event_day,"day")= "2023-08-07 11:00:00";
we can prune some partitions by invoke function of date_trunc("2023-08-07 11:00:00","day" );
2023-10-10 20:39:43 +08:00
62a6b132be [Fix](func numbers) Remove backend_nums argument of numbers function (#25200) 2023-10-10 20:25:58 +08:00
fc1bad9a6b [feature](Nereids) support query MATERIALIZED_VIEW type table (#25227) 2023-10-10 06:44:29 -05:00