Commit Graph

5618 Commits

Author SHA1 Message Date
2ad46c5826 [fix](show) show load warning support load v2 (#22759) 2023-08-22 20:08:19 +08:00
a4e041ea55 [improve](alter-job) Add a config for forbiding doing alter job (#23294) 2023-08-22 16:28:36 +08:00
820d328ad7 [feature](Nereids) support handle query in fe (#23263)
1. fix select variable with alias parsed as two level alias expression.
2. support handle query in fe
2023-08-22 15:28:29 +08:00
a7675243d9 [fix](jdbc catalog) fix adaptation to Oracle special character / table names (#23080)
The changes of this PR for JdbcOracleClient are as follows:

#### bug fixes:
  1. Fix the problem that if there is an approximate table name for Schema synchronization with a table name with `/` characters, the synchronization Column will be confused
  2. Fix the NPE problem of metadata synchronization after enabling lower_case_table_names configuration

#### improvement:
  1. Modify the method of synchronizing Oracle User to Doris Database mapping, use `metadata.getSchemas` instead of `SELECT DISTINCT OWNER FROM all_tables`
  2. When synchronizing metadata, change `null` at the catalog level to `conn.getcatalog`
2023-08-22 15:25:42 +08:00
6c8af92175 [fix])(nereids)Support select catalog.db.table.column from xxx for nereids planner. #23221
Nereids doesn't support select table.* from table, this pr is to fix this bug.
Support three layer qualifier. (catalog.database.table)
2023-08-22 13:58:25 +08:00
51db11ed0b [improve](jdbc catalog) Add a variable to accommodate the final keyword in ClickHouse Jdbc Catalog queries (#23282) 2023-08-22 12:13:36 +08:00
5d9678700c [feature](Nereids) support select tablets with nereids optimizer (#23164) 2023-08-22 10:14:27 +08:00
8f48acaab1 [refactor](nereids) convert session var name "beNumForTest" #23255
this var is used for test only. So keep "for_test" as suffix.
2023-08-22 10:12:07 +08:00
b670dd0db7 [feature](Nereids) support array type (#22851)
FEATURE:
1. enable array type in Nereids
2. support generice on function signature
3. support array and map type in type coercion and type check
4. add element_at and element_slice syntax in Nereids parser

REFACTOR:
1. remove AbstractDataType

BUG FIX:
1. remove FROM from nonReserved keyword list

TODO:
1. support lambda expression
2. use Nereids' way do function type coercion
3. use castIfnotSame when do implict cast on BoundFunction
4. let AnyDataType type coercion do same thing as function type coercion
5. add below array function
- array_apply
- array_concat
- array_filter
- array_sortby
- array_exists
- array_first_index
- array_last_index
- array_count
- array_shuffle shuffle
- array_pushfront
- array_pushback
- array_repeat
- array_zip
- reverse
- concat_ws
- split_by_string
- explode
- bitmap_from_array
- bitmap_to_array
- multi_search_all_positions
- multi_match_any
- tokenize
2023-08-22 09:47:55 +08:00
4e63aa052c [fix](session-var) fix forward parallel fragment instance num, and forward some session by the way (#23234) 2023-08-22 09:00:29 +08:00
ae48de70d6 [improve](jdbc catalog) Improve the speed of writing to postgresql databases (#23279)
reWriteBatchedInserts (boolean) Default false
This will change batch inserts from insert into foo (col1, col2, col3) values (1, 2, 3) into insert into foo (col1, col2, col3) values (1, 2, 3), (4, 5, 6) this provides 2-3x performance improvement

from https://jdbc.postgresql.org/documentation/use/#reWriteBatchedInserts

delete useless parameters useCursorFetch
2023-08-21 23:46:27 +08:00
ea5fd53f22 [enhancement](Nereids): optimize deepEquals (#22944) 2023-08-21 23:03:06 +08:00
4c8f269f19 [fix](Nereids): fix LogicalProject equals() (#23241)
* [fix](Nereids): fix LogicalProject equals()

* [refactor](Nereids): SubqueryExpr is LeafExpression

* remove toArray()
2023-08-21 23:01:22 +08:00
0090b8f1f6 correct a note error (#23243) 2023-08-21 21:33:45 +08:00
ae9f04f969 [fix](array) fix typeExtactMatch for array() type (#23264)
if we write sql with : `select cast(array() as array<varchar(10)>)`
castexpr in fe will call analyze() with `Type.matchExactType(childType, type, true);`
here array type only check contains_null , but should check inner type to make array matchExactType right
2023-08-21 19:41:09 +08:00
c1fb137d17 [improve](jdbc catalog) Add more detailed exception logging to the jdbc catalog (#22930) 2023-08-21 17:18:24 +08:00
dcd6c3c022 [pipelineX](refactor) propose a new pipeline execution model (#22562) 2023-08-21 15:38:45 +08:00
8411705e36 [fix](nereids)scalar subquery shouldn't be used in mark join (#22907)
* [fix](nereids)scalar subquery shouldn't be used in mark join
2023-08-21 15:38:22 +08:00
aaf9a51440 [fix](nereids) fix insert timeout loses effect with nereids (#23217) 2023-08-21 14:59:27 +08:00
169367495f [Fix](executor)Fix enable workload group error message #23230 2023-08-21 14:28:25 +08:00
db5a622166 [Fix](planner) fix incorrect nullable in ctas. (#22770)
ctas with outer join like
```sql
create table a (
        id int not null,
        name varchar(20) not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

create table b (
        id int not null,
        age int not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

insert into a values(1, 'ww'), (2, 'zs');
insert into b values(1, 22);

create table c properties("replication_num"="1") as select a.id, a.name, b.age from a left join b on a.id = b.id;
```
the column 'age' in c is not null, but nullable is expected, we fix it by use the nullable mode of the outputs of root plan fragment.
2023-08-21 11:46:27 +08:00
b9127fa847 [Fix](View)Use the element_at function to replace %element_extract% to prevent parsing errors (#23093) 2023-08-21 11:19:10 +08:00
0967d7ec04 [improvement](agg) Do not serialize bitmap to string (#23172) 2023-08-21 10:10:15 +08:00
Pxl
a11e0e3bc4 [Bug](agg) fix QUANTILE_UNION many problems (#23181)
fix QUANTILE_UNION many problems
2023-08-21 10:04:27 +08:00
3d980ae248 [Fix](multi-catalog) Fix NPE when file cache is enabled. (#23165) 2023-08-20 23:35:28 +08:00
6ffc26858a [Improvement](meta) add default_value column & is changed column for result of show_variables stmt (#23017)
* [Improvement](meta) add default_value column for result of show_variables stmt

* add Changed column to show whether value is modified

* fix code style issue
2023-08-20 20:48:45 +08:00
97fa840324 [feature](multi-catalog)support iceberg hadoop catalog external table query (#22949)
support iceberg hadoop catalog external table query
2023-08-20 19:29:25 +08:00
5ba505ebf4 [fix](multi-catalog)fix avro and jdbc scanner dependency (#23015)
add preload-extensions module, put all conflict dependencies to pom.xml in preload-extensions
2023-08-20 19:28:17 +08:00
6bf65253d0 [fix](Nereids): unstable test when run single UT. (#23189) 2023-08-18 23:14:56 +08:00
10abbd2b62 [Feauture](Export) support parallel export job using Job Schedule (#22854) 2023-08-18 22:24:42 +08:00
6847592137 [Fix](RoutineLoad)Fix when Unique (MoW) RoutineLoad imports unspecified Sequence column (#23167)
[Fix](RoutineLoad)Fix when Unique (MoW) routineload imports unspecified Sequence column
2023-08-18 21:49:09 +08:00
b6dd56fee0 [fix](multi-catalog)fix compability issue for s3 endpoint (#23175) 2023-08-18 18:37:21 +08:00
345eaab00b [refactor](Nereids): remove useless equals()/hashcode() about Id (#23162) 2023-08-18 18:31:31 +08:00
7c4870c371 [fix](catalog) fix hive partition prune bug on nereids (#23026) 2023-08-18 18:31:01 +08:00
9cee0ecccc [fix](show-table-status) fix priv error on show table status stmt (#22918) 2023-08-18 18:30:09 +08:00
f71b78c415 [enhancement](Nereids): remove override child(int index) (#23124)
method `child(int index)` use code `super.child(index)` will cause Pointer jump twice.
2023-08-18 17:34:49 +08:00
609d20de8c [refactor](nereids)remove ColumnStatistics.selectivity (#23039) 2023-08-18 16:45:54 +08:00
1c3cc77a54 [fix](function) to_bitmap parameter parsing failure returns null instead of bitmap_empty (#21236)
* [fix](function) to_bitmap parameter parsing failure returns null instead of bitmap_empty

* add ut

* fix nereids

* fix regression-test
2023-08-18 14:37:49 +08:00
a7771ea507 [fix](planner) fix current_timestamp param type mismatch when doing stream load (#23092)
FileLoadScanNode did not analyze the default value expr, result in target param type int32 become int8 as the original IntLiteral type.
2023-08-18 14:28:45 +08:00
635349a015 [fix](log4j) fix audit_log_roll_num not work for fe audit log file (#23157)
Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-08-18 14:13:45 +08:00
441032c3d8 [fix](Nereids): LogicalSink equals() shouldn't invoke super.equals() (#23145) 2023-08-18 14:05:48 +08:00
2d96d19030 [FIX](array-func) fix array() with decimal type (#23117)
if we write sql with : select array(1.0,2.0,null, null,2.0)
here will pass arg type with uint8 to be which does not match array() func sign with deicmal, and make be core. so here should cast from be and make null tag to cast decimal type
2023-08-18 12:12:50 +08:00
Pxl
59c6139aa5 [Chore](parser) fix create view failed when view contained cast as varchar (#23043)
fix create view failed when view contained cast as varchar
2023-08-18 11:50:18 +08:00
df8e7f7f09 [enhancement](msg) add disk root path in message (#23000) 2023-08-18 11:21:59 +08:00
d018ac8fb7 fix show grants throw NullPointerException (#22943) 2023-08-18 10:48:56 +08:00
a5ca6cadd6 [Improvement] Optimize count operation for iceberg (#22923)
Iceberg has its own metadata information, which includes count statistics for table data. If the table does not contain equli'ty delete, we can get the count data of the current table directly from the count statistics.
2023-08-18 09:57:51 +08:00
03d59ba81e [Fix](Nereids) fix sql-cache for nereids. (#22808)
1. should not use ((LogicalPlanAdapter)parsedStmt).getStatementContext().getOriginStatement().originStmt.toLowerCase() as the cache key (do not invoke toLowerCase()), for example: select * from tbl1 where k1 = 'a' is different with select * from tbl1 where k1 = 'A', so the cache should be missed.
2. according to issue 6735 , the cache key should contains all views' s ddl sql (including nested views)
2023-08-18 09:36:07 +08:00
hzq
38c182100a [refactor](mysql compatibility) An abstract class for all databases created for mysql compatibility (#23087)
Better code structure for mysql compatibility databases.
2023-08-18 09:16:23 +08:00
1f19d0db3e [improvement](tablet clone) improve tablet balance, scaling speed etc (#22317) 2023-08-17 22:30:49 +08:00
b91bb9f503 [fix](alter table property) fix alter property if rpc failed (#22845)
* fix alter property

* add regression case

* do not repeat
2023-08-17 18:02:34 +08:00