Commit Graph

4821 Commits

Author SHA1 Message Date
fe942eaf44 [Fix](Nereids) Fix minidump using put all of hashmap (#20268)
Minidump file wants to get information as much as possible, but when close the switch, these methods should not be called after refactor pr: #20049. Other place of doing more jobs after add Minidump feature also be checked.
2023-06-05 13:05:15 +08:00
0dc6d3a568 [fix](nereids) avg size of column stats always be 0 (#20341)
it takes lot of effort to compute the avgSizeByte for col stats.
we use schema information to avoid compute actual average size
2023-06-05 13:01:58 +08:00
cd0379df4e [fix](nereids) select with specified partition name is not work as expected (#20269)
This PR is to fix the select specific partition issue, certain codes related to this feature were accidentally deleted.
2023-06-05 12:48:54 +08:00
3c28a71378 [fix](dynamic partition) partition create failed after alter distributed column (#20239)
This pr fix following two problems:

Problem1: Alter column comment make add dynamic partition failed inside issue #10811

create table with dynamic partition policy;
restart FE;
alter distribution column comment;
alter dynamic_partition.end to trigger add new partition by dynamic partition scheduler;
Then we got the error log, and the new partition create failed.
dynamic add partition failed: errCode = 2, detailMessage =      Cannot assign hash distribution with different distribution cols. default is: [id int(11) NULL COMMENT 'new_comment_of_id'], db: default_cluster:example_db, table: test_2
Problem2: rename distributed column, make old partition insert failed. inside #20405

The key point of the reproduce steps is restart FE.

It seems all versions will be affected, include master and lts-1.1 and so on.
2023-06-05 12:20:50 +08:00
a6d8115cbc [Improvement](planner) expand sql-block-rule to make it can be used on all kinds of sql stmt (#19540)
Currently, sql-block-rule can only be used for query statements, while it's useful for other stmts like insert / delete / alter / drop etc. Now remove the limitation and expand its using scenario.
2023-06-05 11:01:43 +08:00
660ab34147 [fix](multicatalog) support read from hive table with HIVE_UNION_SUBDIR in path location (#20329) 2023-06-05 11:01:24 +08:00
12f89b879f [fix](stats) Analysis info lost after checkpoint (#20412)
1. Implement write/read for AnalysisManager 
2. If database or table has any column with complex type, the analyze stmt would fail directly. Enable to ignore complex type columns and analyze rest of them in this PR
2023-06-05 10:51:02 +08:00
c6387847aa [fix](nereids) change defaultConcreteType function's return value for decimal (#20380)
1. add default decimalv2 and decimalv3 for NullType
2. change defaultConcreteType of decimalv3 to this
2023-06-05 10:50:07 +08:00
59a0f80233 [Improve](array-function)Improve array function intersect (#20085)
now we just support array function with 2 arrays , but intersect operator can support more than 2 arrays
2023-06-05 10:38:48 +08:00
Pxl
8e39f0cf6b [Enchancement](Agg State) storage function name and result is nullable in agg state type (#20298)
storage function name and result is nullable in agg state type
2023-06-04 22:44:48 +08:00
ad5e34ab9c [Doc](statistics) supplement stats doc (regression test and automatic collection) (#20071) 2023-06-03 17:25:33 +08:00
77855fcd43 [fix](inverted index) fix transaction id changed when light index change (#20302) 2023-06-03 16:05:02 +08:00
ffadaa4935 [improvement](inverted index) skip write index on load and generate index on compaction (#20325) 2023-06-03 16:03:21 +08:00
6958a8f92f [fix](dynamic_partition) fix dead lock when modify dynamic partition property for olap table (#20390)
Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-06-03 08:25:20 +08:00
299c3dc396 [fix](Nereids) should not inherit child's limit and offset when generate exchange node (#20373)
in legacy planner, when we new exchange, it inherit its child's limit and offset.
but in Nereids, we should not do this. because if we need set limit or offset, we will set it manually.
In this PR, we use a new ctor of ExchangeNode to ensure not set limit or offset unexpected.
2023-06-02 19:55:33 +08:00
a8e0841ef1 [fix](workload-group) fix incorrect memoryLimitPercent value (#20377) 2023-06-02 18:57:57 +08:00
a20a6d2bea [refactor](jdbc catalog) Refactor the JdbcClient code (#20109)
This PR does the following:

1. This PR is a substantial refactor of the JDBC client architecture. The previous monolithic JDBC client has been refactored into an abstract base class `JdbcClient`, and a set of database-specific subclasses (e.g., `JdbcMySQLClient`, `JdbcOracleClient`, etc.), and the JdbcClient required config, abstract into an object. This allows for improved modularity, easier addition of support for new databases, and cleaner, more maintainable code. This change is backward-compatible and does not affect existing functionality.
2. As a result of client refactoring, OceanBaseClient can automatically recognize the mode of operation as MySQL or Oracle, so we cancel the oceanbase_mode property in the Jdbc Catalog, but due to the cancellation of the property, When creating a single OceanBase Jdbc Table, the table type needs to be filled in as oceanbase(mysql mode) or oceanbase_oracle(oracle_mode). The above work is a change in the usage behavior, please note.
3. For the PostgreSQL Jdbc Catalog, I did two things:

      1.   The adaptation to MATERIALIZED VIEW and FOREIGN TABLE is added
      2.   Fixed reading jsonb, which had been incorrectly changed to json in a previous PR

4. fix some jdbc catalog test case
5. modify oceanbase jdbc doc

And,Thanks @wolfboys for the guidance
2023-06-02 17:58:10 +08:00
4395fb70c4 [Enhancement](tvf) Backends tvf supports authentication (#20333)
Add authentication for backends tvf.
2023-06-02 17:53:44 +08:00
386a4a0b43 [fix](nereids) add fragment id on all PhysicalRelation (#20371)
fix "cannot find fragment id for scan" exception
2023-06-02 17:13:09 +08:00
422fcd6377 [fix](Nereids) forbid unexpected expression on filter and fix two more bugs (#20331)
fix below bugs:
1. not check filter's expression, aggregate function, grouping scalar function and window expression should not appear in filter
2. show not change nullable of aggregate function when it is window function in window expression
3. bitmap and other metric types should not appear in order by or partition by of window expression
2023-06-02 16:19:50 +08:00
b1e6c6ffe5 [enhancement](txn) print commit backends when commit fails (#20367)
Print commit backends when a commit fails.
2023-06-02 15:10:38 +08:00
d68f3f3b3d [Feature](array-functions)improve array functions for array_last_index (#20294)
Now we just support array_first_index for lambda input , but no array_last_index
2023-06-02 13:54:03 +08:00
e32eba8fdf [refactor](stats) Persist status of analyze task to FE meta data (#20264)
1. In the past, we use a BE table named `analysis_jobs` to persist the status of analyze jobs/tasks, however there are many flaws such as, if BE crashed analyze job/task would failed however the status of analyze job/task couldn't get updated.
2. Support `DROP ANALYZE JOB [job_id]` to delete analyze job
3. Support `SHOW ANALYZE TASK STATUS [job_id] ` to  get the task status of specific job
4. Restrict the execute condition of auto analyze, only when  the  last execution of auto analyze job finished a while ago could be executed again
5. Support analyze whole DB
2023-06-02 12:33:31 +08:00
9d8043e4c1 [Fix](Nereids) should not gather data when sink (#20330) 2023-06-02 10:33:11 +08:00
5a3b97bbf2 [enhancement](struct-type)support comment for struct field (#20200)
support comment for struct field
2023-06-02 10:29:56 +08:00
937f04033f [Bug](runtime filter) fix NPE if runtime filter has no target (#20338) 2023-06-02 09:54:37 +08:00
a8a4da9b9e [fix](nereids)dphyper join reorder may cache wrong project list for project node (#20209)
* [fix](nereids)dphyper join reorder may cache wrong project list for project node
2023-06-02 09:35:28 +08:00
ecdc5124be [feature-wip](duplicate-no-keys) schame change support for duplicate no keys (#19326) 2023-06-02 09:22:41 +08:00
0df073699d [fix](planner)Fix missing kw for workload #20319
1 add usage docment for Workload Group query queue;
2 Fix missing KW for workload, this may cause create workload group failed.
2023-06-02 09:04:22 +08:00
363e78f08f [enhancement](publish) print detailed info for failed publish (#20309) 2023-06-01 22:24:16 +08:00
34c1cda14a [bug](udaf) fix java-udaf test case failed with decimal (#20315)
java-udaf have some test case with decimal will be failed in P0, because the decimal of scale is not set correctly
2023-06-01 20:14:54 +08:00
f0513a861d [Improve](Scan) add a session variable to make scan run serial (#20220)
Parallel scanning can result in some read amplification, for example, select * from xx where limit 1 actually requires only one row of data. However, due to parallel scanning of multiple tablets, read amplification occurs, leading to performance bottlenecks in high-concurrency scenarios. This PR Adding a SessionVariable to enforce serial scanning can help mitigate this issue.
2023-06-01 15:06:35 +08:00
0ff3073fc4 [improvement](Nereids): limit Memo groupExpression size. (#20272) 2023-06-01 13:30:19 +08:00
519f01133a [feature](decimal)support cast rounding half up and div precision increment in decimalv3. (#19811) 2023-06-01 13:09:58 +08:00
1b968c4ade [fix](multi catalog)Fix nereids planner text format include extra column index bug (#20260)
Nereids planner include all columns index in TFileScanRangeParams, this may cause the column projection incorrect for
 text format table. Because csv reader use the column index position to split a line. Extra column index will cause get 
wrong split result. This PR is to reset the column index after Projection, remove the useless column index.
2023-06-01 12:17:47 +08:00
cc41cb0e7e [Fix](Nereids) fix some insert into select bugs (#20052)
fix 3 bugs:

1. failed to insert into a table with mv.
```sql
create table t (
    id int,
   c1 int,
   c2 int,
   c3 int
) duplicate key(id)
distributed by hash(id) buckets 4

create materialized view k12s3m as select id, sum(c1), max(c3) from t group by id;

insert into t select -4, -4, -4, 'd';
```
insert will rise exception because mv column is not handled. now we will add a target column and value as defineExpr.

2. failed to insert into a table with not all the columns.
```sql
insert into t(c1, c2) select c1, c2 from t
```
and t(id ukey, c1, c2, c3), will insert too many data, we fix it by change the output partitions.

3. failed to insert into a table with complex select.
the select statement has join or agg, fix the bug by the way similar to the one at 2nd bug.
2023-06-01 12:15:19 +08:00
6befa53caa fix fe meta upgrade error (#20291)
Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-06-01 12:09:08 +08:00
4387f47fb5 [pipeline](load) support pipeline load (#20217) 2023-06-01 11:42:43 +08:00
e748b43d3d [bug](parse) fix can't create aggregate column with agg_state (#20235)
fix can't create aggregate column with agg_state
2023-06-01 11:18:40 +08:00
68e593fbf1 [fix](nereids)(planner) case when should return NullLiteral when all case result is NullLiteral (#20280) 2023-06-01 11:11:41 +08:00
90cd791789 [fix](tvf) s3 tvf specify region and s3.region params failed (#19921) 2023-06-01 10:00:49 +08:00
65a75abecb [Fix](Nereids) bitmap type should not be used in comparison predicate (#19807)
When using nereids, if we use compare operator of bitmap type, an analyze exception need to be throwed.

like: 
select id from (select BITMAP_EMPTY() as c0 from expr_test) as ref0 where c0 = 1 order by id

Which c0 in subq0 is a bitmap type, this scenario is not supported right now.
2023-05-31 23:09:36 +08:00
5f591a6d12 [opt](nereids) generate in-bloom filter if target is local for pipeline mode (#20112)
update in-filter usage in pipeline mode:
1. if the target is local, we use in-bloom filter. Let BE choose in or bloom according to actual distinctive number
2. set default runtime_filter_max_in_num to 1024
2023-05-31 17:24:38 +08:00
b53c42636e [Fix](Nereids) fold constant result is wrong on functions relative to timezone (#19863) 2023-05-31 15:52:40 +08:00
a1e3f49fb5 [enhancement](ldap) Support refresh ldap cache (#20183)
Support refreshing ldap cache:
refresh ldap all;
refresh ldap;
refresh ldap for user1;
Support for caching non-existent ldap users.
When logging in with a doris user that does not exist in the Ldap service after ldap is enabled, avoid accessing the ldap service every time in scenarios such as show databases; that require a lot of authentication.
2023-05-31 15:38:12 +08:00
f9dfcb923d [Enhancement] Change Create Resource Group Grammar (#20249) 2023-05-31 15:23:24 +08:00
c39943f699 [Fix](Planner)fix incorrect pattern when format pattern contains %x%v (#19994) 2023-05-31 14:55:33 +08:00
d93ff5d1ab [fix](pipeline) Enable pipeline explicitly in the plan shape check cases. (#20221)
enable pipeline explicitly in tpcds plan shape check
2023-05-31 14:40:24 +08:00
6d75d56e7b [Fix](dynamic-partition) Try to avoid setting a zero-bucket-size partition. (#20177)
A fallback to avoid BE crash problem when partition's bucket size is 0, but not resolved.
2023-05-31 13:09:03 +08:00
1f22aa6961 [fix](nereids) like function's nullable property should be PropagateNullable (#20237) 2023-05-31 12:13:38 +08:00