Commit Graph

7313 Commits

Author SHA1 Message Date
e693249f5b [fix](Nereids) remove useless substr of string like type cast (#29997) 2024-01-16 20:23:09 +08:00
4e41e1d797 [feat](Nereids) persist constraint in table (#29767) 2024-01-16 18:49:29 +08:00
168afdb965 [fix](disk balance) Change disk rebalance unpick time to configurable (#28949) 2024-01-16 18:49:04 +08:00
74991c4af2 [bugfix](paimon)support native and jni to read paimon for minio/cos #29933 2024-01-16 18:49:01 +08:00
4bf4239d7a [feature](Nereids): optimize logical group expression in dphyp (#30000) 2024-01-16 18:48:20 +08:00
6ce9c67383 [fix](Nereids) struct type coercion call wrong api (#30018) 2024-01-16 18:48:20 +08:00
55a0f90003 [fix](jobs)fix create task int job (#30011) 2024-01-16 18:46:19 +08:00
75cafa8672 [enhancement](jdbc catalog) Enhance function pushdown of Jdbc Oracle Catalog (#29972) 2024-01-16 18:46:19 +08:00
f53d2c28cb [improvement](catalog) fix jdbc mysql catalog to_date fun pushdown (#29900) 2024-01-16 18:46:19 +08:00
22978726e3 [opt](nereids) if column stats are unknown, 10-20 table-join optimization use cascading instead of dphyp (#29902)
* if column stats are unknown, do not use dphyp
tpcds query64 is optimized in case of no stats
sf500, query64 improved from 15sec to 7sec on hdfs, and from 4sec to 3.85sec on olaptable
2024-01-16 18:46:19 +08:00
e1bcdc35fd (fix)[group-commit] Fix some group commit case (#30008) 2024-01-16 18:46:19 +08:00
07de535c4c [fix](Nereids) should not fold constant when do ordinal group by (#29976) 2024-01-16 18:46:19 +08:00
ce2e84e9a6 [fix](nereids)need validate auto partition columns in DDL (#29985) 2024-01-16 18:46:19 +08:00
f7e12605a2 [fix](Nereids): fix NPE InferPredicates (#29978)
PredicatePropagation shouldn't add null into List.
2024-01-16 18:46:19 +08:00
2bf8c51baa [test](regression) Add debug level log of editlog for p0 p1 (#29992) 2024-01-16 18:42:09 +08:00
66513d57f9 [feature](function) support ip function named ipv6_cidr_to_range(addr, cidr) (#29812) 2024-01-16 18:42:09 +08:00
0ea5f0f5de [fix](Nereids): fix offset in PlanTranslator (#29789)
Current BE operator don't support `offset`, we need add offset into `ExchangeNode`
2024-01-16 18:41:21 +08:00
d5dcdf3e07 [Improve](array) support array_enumerate_uniq and array_suffle for nereids (#29936) 2024-01-16 18:40:32 +08:00
94bfa6e46d [fix](Nereids): fix wrong api calling (#29977) 2024-01-16 18:40:32 +08:00
b99b9efda8 [fix](Nereids) top-n with top project should hit top-n opt (#29971)
in PR #29312, we limit top-n opt only enable in simplest cases.
in this PR, we let go of some restrictions.
2024-01-16 18:40:32 +08:00
e09118eb9c extract agg in struct info node (#29853) 2024-01-16 18:39:37 +08:00
f6dc6ea13b [improvement](catalog) Escape characters for columns in recovery predicate pushdown in SQL (#29854)
In the previous logic, when we restored the Column in the predicate pushdown based on the logical syntax tree for JdbcScanNode, in order to avoid query errors caused by keywords such as `key`, we added escape characters for it, but before we only Binary predicates are processed, which is imperfect. We should add escape characters to all columns that appear in the predicate to avoid errors with keywords or illegal characters.
2024-01-16 18:39:00 +08:00
e35b26f4fc [feature](auditlog)Add runtime cpu time/peak memory metric (#29925) 2024-01-16 18:39:00 +08:00
97955da749 [enhancement](fe-memory) support label num threshold to reduce fe memory consumption (#22889)
Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
2024-01-16 18:38:54 +08:00
b47e289560 [refactor](Nereids): avoid ConnectContext.get() ASAP to improve proformance (#29952) 2024-01-16 18:37:44 +08:00
7a574df9fc [fix](pipelineX) fix multi be may be missing profiles #29914 2024-01-16 18:37:44 +08:00
4b4fd1a290 [improvement](log) add txn log (#28875) 2024-01-16 18:37:06 +08:00
d48c8a1dce [test](ut) added UT cases for show partitions external table (#29565) 2024-01-16 18:33:51 +08:00
e5c8192d47 [ut](stats) Added tests for JDBC analysis tasks (#28591) 2024-01-16 18:33:51 +08:00
7c493b08c5 [refactor](dialect) make http sql converter plugin and audit loader as builtin plugin (#29692)
Followup #28890

Make HttpSqlConverterPlugin and AuditLoader as Doris' builtin plugin.
To make it simple for user to support sql dialect and using audit loader.

HttpSqlConverterPlugin

By default, there is nothing changed.

There is a new global variable sql_converter_service, default is empty, if set, the HttpSqlConverterPlugin will be enabled

set global sql_converter_service = "http://127.0.0.1:5001/api/v1/convert"

AuditLoader

By default, there is nothing changed.

There is a new global variable enable_audit_plugin, default is false, if set to true, the audit loader plugin will be enable.

Doris will create audit_log in __internal_schema when startup

If enable_audit_plugin is true, the audit load will be inserted into audit_log table.

3 other global variables related to this plugin:

audit_plugin_max_batch_interval_sec: The max interval for audit loader to insert a batch of audit log.
audit_plugin_max_batch_bytes: The max batch size for audit loader to insert a batch of audit log.
audit_plugin_max_sql_length: The max length of statement in audit log
2024-01-16 18:31:59 +08:00
a69ce49b07 [fix](Nereids) adjust min/max stats for cast function if types are comparable (#28166)
estimate column stats for "cast(col, XXXType)"

-----cast-est------
query4 41169 40335 40267 40267
query58 463 361 401 361
Total cold run time: 41632 ms
Total hot run time: 40628 ms

----master------
query4 40624 40180 40299 40180
query58 487 389 420 389
Total cold run time: 41111 ms
Total hot run time: 40569 ms
2024-01-16 18:31:59 +08:00
0b16938b7f [Fix](Nereids) Fix datatype length wrong when string contains chinese (#29885)
When varchar literal contains chinese, the length of varchar should not be the length of the varchar, it should be 
the actual length of the using byte.
Chinese is represented by unicode, a chinese char occypy 4 byte at mostly. So if meet chinese in varchar literal, we 
set the length is 4* length.

for example as following:
>        CREATE MATERIALIZED VIEW test_varchar_literal_mv
>             BUILD IMMEDIATE REFRESH AUTO ON MANUAL
>             DISTRIBUTED BY RANDOM BUCKETS 2
>             PROPERTIES ('replication_num' = '1')
>             AS
>             select case when l_orderkey > 1 then "一二三四" else "五六七八" end as field_1 from lineitem;

mysql> desc test_varchar_literal_mv;
the def of materialized view is as following:
+---------+-------------+------+-------+---------+-------+
| Field   | Type        | Null | Key   | Default | Extra |
+---------+-------------+------+-------+---------+-------+
| field_1 | VARCHAR(16) | No   | false | NULL    | NONE  |
+---------+-------------+------+-------+---------+-------+
2024-01-16 18:31:59 +08:00
115815739c [bugfix](fe) add check for leg/lead function params (#29617) 2024-01-16 18:31:59 +08:00
c92648cb27 [ut](meta) added unit test for frontend service impl (#28455) 2024-01-16 18:31:59 +08:00
d127527af3 [feat](meta) Reuse HMS statistics analyzed by Spark engine for Analyze Task. (#28525)
Taking the Idea further from PR #24853 (#24853)
Column statistics already analyzed and available in HMS from spark, this PR proposes to reuse the analyzed stats from external source, when executed WITH SQL clause of analyze cooamd.

Spark analyzes and stores the statistics in Table properties instead of HiveColumnStatistics. In this PR, we try to get the statistics from these properties and make it available to Doris.
2024-01-16 18:31:27 +08:00
7b30119537 [improve](multi-table-load) pause job when can not find table #29870
If there is no table that can be found, the task will cycle forever and no data will be loaded. To avoid invalid scheduled tasks, It is better to pause the job rather than run it.
2024-01-16 18:31:27 +08:00
6598b4f7c8 [fix](http) fix exception when querying map data through http #29686
The mysql type code mapped by the map type is 400, but 400 is an unknown type for mysql.
For the jdbc driver of mariadb, when querying through the http api of /api/query or using the jdbc driver of mariadb, an exception will occur.
For the jdbc driver of mysql, it will be converted into binary form, and the correct data can be read through the string type.
Therefore, the mysql custom type of map was removed and changed to string type, so that both the jdbc driver of mariadb and mysql can work normally.
2024-01-16 18:31:27 +08:00
e1a12cf222 [improvement](auth)Not allowed to operate internal_schema database (#29790)
Only root user can operate __internal_schema database
The scope of impact includes:
create database
drop database
alter database
create table
drop table
alter table
truncate table
insert overwrite
insert
delete
update
load(root also not allowed)

delete support check auth
2024-01-16 18:31:27 +08:00
1dc0c74ad9 [improvement](statistics)Stop analyze quickly after user close auto analyze. #29809 2024-01-16 18:31:27 +08:00
b3e37b3efa [unit test](statistics)Add unit test case for auto analyze. #29904
Add unit and p0 test case for auto analyze.
2024-01-16 18:31:27 +08:00
d47adbb81f [Fix](nereids) Fix cte rewrite by mv failure and predicates compensation by mistake (#29820)
Fix cte rewrite by mv wrongly when query has scalar aggregate but view no
For example as following, it should not be rewritten by materialized view successfully

// materialzied view define
def mv20_1 = """
select
l_shipmode,
l_shipinstruct,
sum(l_extendedprice),
count()
from lineitem
left join
orders on lineitem.L_ORDERKEY = orders.O_ORDERKEY
group by
l_shipmode,
l_shipinstruct;
"""
// query sql
def query20_1 =
"""
select
sum(l_extendedprice),
count()
from lineitem
left join
orders
on lineitem.L_ORDERKEY = orders.O_ORDERKEY
"""

Fix predicates compensation by mistake
For example as following, it can return right result, but it's wrong earlier.

// materialzied view define
def mv7_1 = """
select l_shipdate, o_orderdate, l_partkey, l_suppkey
from lineitem
left join orders
on lineitem.l_orderkey = orders.o_orderkey
where l_shipdate = '2023-12-08' and o_orderdate = '2023-12-08';
"""
// query sql
def query7_1 = """
select l_shipdate, o_orderdate, l_partkey, l_suppkey
from (select * from lineitem where l_shipdate = '2023-10-17' ) t1
left join orders
on t1.l_orderkey = orders.o_orderkey;
"""

and optimize some code usage and add more comment for method
2024-01-16 18:31:27 +08:00
1998735432 [Improvement](function) enable ipv6_num_to_string function to support handling of IPv6 type (#29886)
Enable ipv6_num_to_string function to handle IPv6 type normally in addition to handling 16 byte string types
2024-01-16 18:30:23 +08:00
ee66f1563e [fix](Nereids) fix rf push down union (#29847)
Current union rf push down only support rf from parent join, but not support ancestor join.
The pr fixes this problem on project/distribute node's rf pushing down checking.
2024-01-16 18:30:22 +08:00
fd4795dace [opt](Nereids) add graph sql function and one arg truncate (#29864) 2024-01-16 18:30:22 +08:00
12af86176a [fix](class-loader) fix class loader conflict on BE side (#29942)
1. make `hadoop-common` in be java extension as `provided`.
2. must load be java extension jars before hadoop jars
2024-01-14 15:53:33 +08:00
62064a86bf [test](ut) added UT cases for show create load stmt (#29564) 2024-01-12 13:58:20 +08:00
1718341051 [pipelineX](fix) Fix correctness problem due to local hash shuffle (#29881) 2024-01-12 13:58:19 +08:00
acda8d2129 [feature](profile )merge of profiles can be disabled by profile level. #29861
The merging of profiles requires ensuring the correctness of the profiles themselves. However, if merging is intended for troubleshooting correctness issues through profiles, errors may occur.

Moreover, the 'try-catch' does not catch exceptions related to profile merging. If merging fails, even the normal profile cannot be obtained.
2024-01-12 13:58:19 +08:00
3ef1229635 [docs](query-accel) refine several statements in docs (#29716) 2024-01-12 13:58:19 +08:00
2a51750abd [fix](dynamic partition) fix dynamic partition storage medium not working (#29490) 2024-01-12 13:58:19 +08:00