Commit Graph

3746 Commits

Author SHA1 Message Date
097641b543 [fix](Nereids): fix AssertNumRows StatsCalculator (#30053) 2024-01-19 15:48:15 +08:00
7d3a3fee65 [fix](Nereids) update assignment column name should case insensitive (#30071) 2024-01-19 15:48:15 +08:00
Pxl
2ccb69dbed [Feature](materialized-view) support some case unmached to materialized-view (#30036)
same column appears in key and value like select id,count(id) group by id;
complex expr in sum select sum(if(xxx));
2024-01-18 12:03:07 +08:00
0ccd706a30 [Enhancement](Jdbc Catalog) Map Jdbc Catalog JSON Type to String for Improved Performance and Compatibility (#30035)
This PR proposes mapping external catalog JSON types to String instead of JsonB in Apache Doris. This change is motivated by the realization that JDBC retrieves JSON data as a String JSON string, regardless of its storage format (Json(String) or Json(Binary)). Mapping to String streamlines data retrieval, simplifies write-backs, and ensures compatibility with all JSON(String) and JSON(Binary) functions, despite potentially misleading displays of JSON data as Strings in Doris. This approach avoids the performance overhead and complexity of converting each row of data from JsonB to String, making the process more efficient and elegant.

About Upgrade
To ensure query compatibility with existing Catalogs in the upgraded version,we currently still retain the capability to query external JSON types as JSONB. However, once you upgrade to the new version and either refresh the Catalog or create a new one, all external JSON types will be treated as Strings. To ensure consistent behavior,and possible future removal of support for JSON as JSONB query code, it is highly recommended that you manually refresh your Catalog as soon as possible after upgrading to the new version.
2024-01-18 12:03:07 +08:00
8a0a6bf856 [Fix](typo) Fix group commit regression test typo (#30057) 2024-01-18 12:03:07 +08:00
990d5d8664 [cleanup](insert-into) clean up some insert into log (#30063) 2024-01-18 12:03:07 +08:00
Pxl
30378f9bbc [Chore](config) remove some unused config (#29983)
remove some unused config
2024-01-18 12:03:07 +08:00
44ba9e102c [feature](statistics)support statistics for iceberg/paimon/hudi table (#29868) 2024-01-18 12:03:07 +08:00
ade720470d [Improve](config)delete confused config for nested complex type (#29988) 2024-01-18 12:03:07 +08:00
e894911cda [function](char) change char function behaviour same with mysql (#30034)
select char(0) = '\0';
should return true;
2024-01-18 10:04:21 +08:00
48d7c1b1ed [test](regression-test) fix case, compatible with 3 replicas. (#29905) 2024-01-18 10:04:21 +08:00
Pxl
b0c49024cb [Feature](materialized-view) support match function with alias in materialized-view (#30025)
support match function with alias in materialized-view
2024-01-18 10:04:21 +08:00
3deee14680 [fix](Nereids): find hash condition after infer predicate (#30026) 2024-01-18 10:03:01 +08:00
3f2a794c2e [refactor](insert) remove unused insert code in FE #29924 2024-01-18 09:00:32 +08:00
2dcdf07dd4 [Feature](profile)Support active_queries TVF (#29999) 2024-01-16 21:25:02 +08:00
d658a44cef [improvement](catalog) Change the push-down parameters of the predicate function of the table query SQL into variables (#30028)
In this PR, we will control whether the external data source query is a push-down function parameter in the filter condition, changing the enable_fun_pushdown of fe conf to the enable_ext_func_pred_pushdown of the variable
2024-01-16 21:14:35 +08:00
f98f790a80 [chore](test) update delete complex type case to make Nereids happy (#30022) 2024-01-16 20:23:09 +08:00
d101234be1 [fix](test) fix disableDebugPointForAllBEs do not execute (#30023) 2024-01-16 20:23:09 +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
d3bf23d70d [chore](removelogs) remove debug query timeout logs (#30006)
---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2024-01-16 18:48:18 +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
3c502f6444 [fix](case) add sync after streamload (#30009)
Co-authored-by: stephen <hello-stephen@qq.com>
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
07de535c4c [fix](Nereids) should not fold constant when do ordinal group by (#29976) 2024-01-16 18:46:19 +08:00
fd5d986239 [fix](regression-test) fix err log limit test global impact for setting param (#29993) 2024-01-16 18:44:52 +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
8433169e5e [test](regression-test) fix case bug, add 'order by' to make it stable (#29981) 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
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
8ca807578f [fix](migrate disk) fix migrate disk lost data during publish version (#29887)
Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
2024-01-16 18:37:06 +08:00
615d94bbc7 [log](insertadd log in parse insert into values data (#29903) 2024-01-16 18:35:32 +08:00
620cfc3cd7 [fix](move-memtable) set idle timeout equal to load timeout (#29839) 2024-01-16 18:33:51 +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
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
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
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
e417128fb9 [bug](bitmap) should return error status when execute failed (#29841) 2024-01-16 18:30:23 +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
f79ec8ea7e [test](regression-test) fix case bug suites/export/test_array_export.groovy (#29783) 2024-01-16 18:30:22 +08:00
06a6477275 [test](regression-test) move test_alter_user.groovy to run nonConcurrent, for it has set global operation (#29772) 2024-01-16 18:30:22 +08:00
a314491535 [Fix](inverted index) fix array inverted index builder error (#29869) 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
0d6ab3c68c [chore](regression test) check disk is good (#29740) 2024-01-12 13:58:19 +08:00