Commit Graph

9128 Commits

Author SHA1 Message Date
caacee253d [fix](olap)Crashing caused by IS NULL expression (#17463)
Issue Number: close #17462
2023-03-07 15:32:52 +08:00
05c5ab5490 [fix](planner) only table name should convert to lowercase when create table (#17373)
we met error: Unknown column '{}DORIS_DELETE_SIGN{}' in 'default_cluster:db.table.
that because when we use alias as the tableName to construct a Table, all parts of the name will be lowercase if lowerCaseTableNames = 1.
To avoid it, we should extract tableName from alias and only lower tableName
2023-03-07 14:41:35 +08:00
b9bb28f22c [Enhancement](Planner)fix unclear exception msg when create table. #17473 2023-03-07 13:38:20 +08:00
357d8c1746 [enhance](Nereids): remove rule flag in LogicalJoin (#17452) 2023-03-07 13:18:50 +08:00
b8c9875adb [refactor](Nereids): refactor PushdownLimit (#17355) 2023-03-07 12:04:20 +08:00
b0e3156f51 [enhance](Nereids): refactor code in Project (#17450) 2023-03-07 11:15:33 +08:00
f79b066790 [fix](resource)Add s3 checker for alter resource (#17467)
* add s3 validity checker for alter resource.

* add s3 validity checker for alter resource.

* add s3 validity checker for alter resource.
2023-03-07 11:07:15 +08:00
e94170d81f [feature](cooldown)add ut for cooldown on be (#17246)
* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be

* add ut for cooldown on be
2023-03-07 10:42:53 +08:00
7e96b06e6c [Enhance](auth)Users support multiple roles (#17236)
Describe your changes.
1.support GRANT role [, role] TO user_identity
2.support REVOKE role [, role] FROM user_identity
3.’Show grants‘ Add a column to display the roles owned by users
4.‘alter user’ prohibit deleting user's role
5.Repair Logic of roleName cannot start with RoleManager.DEFAULT_ ROLE
2023-03-07 10:28:56 +08:00
bada731390 [fix](restore) fix bug when replay restore and reserve dynamic partition (#17326)
when replay restore a table with reserve_dynamic_partition_enable=true,
must registerOrRemoveDynamicPartitionTable with isReplay=true, or maybe cause
OBSERVER can not replay restore auditlog success.
2023-03-07 10:13:08 +08:00
f85f89f240 [fix](planner) Fix incosistency between groupby expression and output of aggregation node (#17438) 2023-03-07 09:38:20 +08:00
Pxl
d8f0ca7108 [Chore](schema change) remove some unused code in schema change (#17459)
remove some unused code in schema change.
remove some row-based config and code.
2023-03-07 09:18:34 +08:00
50bf02024a [Improvement](meta) support return total statistics of all databases for command show proc '/jobs (#17342)
currently, show proc jobs command can only used on a specific database,
if a user want to see overall data of the whole cluster, he has to look into every database and sum them up,
it's troublesome.
now he can achieve it simply by giving a -1 as dbId.

mysql> show proc '/jobs/-1';
+---------------+---------+---------+----------+-----------+-------+
| JobType | Pending | Running | Finished | Cancelled | Total |
+---------------+---------+---------+----------+-----------+-------+
| load | 0 | 0 | 0 | 2 | 2 |
| delete | 0 | 0 | 0 | 0 | 0 |
| rollup | 0 | 0 | 1 | 0 | 1 |
| schema_change | 0 | 0 | 2 | 0 | 2 |
| export | 0 | 0 | 0 | 3 | 3 |
+---------------+---------+---------+----------+-----------+-------+

mysql> show proc '/jobs/-1/rollup';
+----------+------------------+---------------------+---------------------+------------------+-----------------+----------+---------------+----------+------+----------+---------+
| JobId | TableName | CreateTime | FinishTime | BaseIndexName | RollupIndexName | RollupId | TransactionId | State | Msg | Progress | Timeout |
+----------+------------------+---------------------+---------------------+------------------+-----------------+----------+---------------+----------+------+----------+---------+
| 17826065 | order_detail | 2023-02-23 04:21:01 | 2023-02-23 04:21:22 | order_detail | rp1 | 17826066 | 6009 | FINISHED | | NULL | 2592000 |
+----------+------------------+---------------------+---------------------+------------------+-----------------+----------+---------------+----------+------+----------+---------+
1 row in set (0.01 sec)
2023-03-07 08:57:55 +08:00
440cf526c8 [fix](type compatibility) fix unsigned int type compatibility problem (#17427)
Fix unsigned int type compatibility value scope problem.

When defining columns, map UNSIGNED INT to BIGINT for compatibility.
The problems are as follows:
It is not consistent with this doc
image

We support the unsigned int type to be compatible with mysql types, but the unsigned int type is created as the int at the time of definition. This will cause numerical overflow.
2023-03-07 08:55:38 +08:00
6f3801d9da [chore](config) Increase the default maximum depth limit for expressions (#17418) 2023-03-07 08:53:00 +08:00
57233dc53a [deps](libhdfs) fix hadoop libs build error (#17470) 2023-03-07 08:52:40 +08:00
b68001aee5 [fix](priv) fix duplicated priv check when check column priv (#17446)
when executing select stmt, columns privilege check will be invoked multiple times(column number in select stmt)

Issue Number: close #xxx
2023-03-07 08:51:55 +08:00
48c2d806d7 [enhencement](jdbc catalog) Use Druid instead of HikariCP in JdbcClient (#17395)
This pr does three things:
1. Use Druid instead of HikariCP in JdbcClient
2. when download udf jar, add the name of the jar package after the local file name.
3. refactor some jdbcResource code
2023-03-07 08:51:10 +08:00
aedbc5fcb1 [fix](planner) Slots in the cojuncts of table function node didn't got materialized #17460 2023-03-07 08:50:33 +08:00
bc48cbff83 [doc](auth)auth doc (#17358)
* auth doc

* auth en doc

* add note
2023-03-07 08:05:09 +08:00
78a1d630e4 [docs](typo) fix faq docs, already support rename column. (#17428)
* Update data-faq.md

Already support rename column.

* fix

---------

Co-authored-by: zhangyu209 <zhangyu209@meituan.com>
2023-03-07 08:03:51 +08:00
1d858db617 [feature](filecache) add a const parameter to control the cache version (#17441)
* [feature](filecache) add a const parameter to control the cache version

* fix
2023-03-07 08:03:18 +08:00
b0d67c0358 [fix](merge-on-write) fix cu compaction correctness check (#17347)
During concurrent import, the same row location may be marked delete multiple times by different versions of rowset.
Duplicate row location need to be removed.
2023-03-06 21:31:48 +08:00
4b13d81151 [fix](publish) fix when TabletPublishTxnTask::handle() error, transaction publish success, and query table error (#17409)
be use EnginePublishVersionTask to publish all replica of all tablets of table of one transaction,
and EnginePublishVersionTask use TabletPublishTxnTask to truly publish tablet and make rowset visible.
but if TabletPublishTxnTask error, tablet id will add _error_tablet_ids but no return some errors,
and EnginePublishVersionTask will not report any error to fe, and fe make this transaction visible,
and partition's version add 1.

but if you query this table, will return error like "MySQL [test]> select * from test12;ERROR 1105 (HY000): errCode = 2, detailMessage = [INTERNAL_ERROR]failed to initialize storage reader. tablet=14023.730105214.d742d664692db946-386daa993d84d89d, res=[INTERNAL_ERROR][9.134.167.25]fail to find path in version_graph. spec_version: 0-3, backend=9.134.167.25".

after this pr, _error_tablet_ids will report to fe, this transaction will not be visible and add ErrMsg like "publish on tablet 14038 failed.".

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-03-06 19:57:04 +08:00
Pxl
28c55f15c9 [Enchancement](Materialized-View) add more error infomation for select materialized view fail (#17262)
add more error infomation for select materialized view fail
2023-03-06 18:59:46 +08:00
dca16796ad [fix](ParquetReader) definition level of repeated parent is wrong (#17337)
Fix three bugs:
1.  `repeated_parent_def_level ` should be the definition of its repeated parent.
2. Failed to parse schema like `decimal(p, s)`
3. Fill wrong offsets for array type
2023-03-06 18:15:57 +08:00
843b4b5746 [fix](regression) Adjust the test_add_drop_index case to avoid that FE failed to start when replaying the log (#17425)
This pr is a temporary circumvention fix.

In regression case `inverted_index_p0/test_add_drop_index.groovy`, both bitmap index and inverted index are created 
on the same table, when create or drop bitmap index will change table's state to `SCHEMA_CHANGE`, create or drop
 inverted index not change the table's state.
Before do create or drop inverted index check the table's state whether is `NORMAL` or not, Because of replay log for 
'bitmap index' has change table state, and it didn't finish soon lead to table's state not change back to `NORMAL`, then
 replay log for 'inverted index' failed, FE start failed.
2023-03-06 17:39:12 +08:00
9477c48ef8 [refactor](functioncontext) remove duplicate type definition in function context (#17421)
remove duplicate type definition in function context
remove unused method in function context
not need stale state in vexpr context because vexpr is stateless and function context saves state and they are cloned.
remove useless slot_size in all tuple or slot descriptor.
remove doris_udf namespace, it is useless.
remove some unused macro definitions.
init v_conjuncts in vscanner, not need write the same code in every scanner.
using unique ptr to manage function context since it could only belong to a single expr context.
Issue Number: close #xxx
---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-06 16:07:09 +08:00
e7cba11680 [fix](array)(parquet) fix be core dump due to load from parquet file containing array types (#17298) 2023-03-06 15:18:42 +08:00
02015cf153 [docs](typo) Correct the wrong default value of DECIMAL type displayed in the Help CREATE TABLE #17422
Correct the wrong default value of DECIMAL type displayed in the Help CREATE TABLE
2023-03-06 12:50:30 +08:00
bc5f16dc80 [deps](libhdfs) add official hadoop libhdfs for x86 (#17435)
This is the first step to introduce official hadoop libhdfs to Doris.
Because the current hdfs client libhdfs3 lacks some important feature and is hard to maintain.

Download the hadoop 3.3.4 binary from hadoop website: https://hadoop.apache.org/releases.html
Extract libs and headers which are used for libhdfs, and pack them into hadoop_lib_3.3.4-x86.tar.gz
Upload it to https://github.com/apache/doris-thirdparty/releases/tag/hadoop-libs-3.3.4

TODO:
The hadoop libs for arm is missing, we need to find a way to build it
2023-03-06 12:47:53 +08:00
8e6c34dd11 [Opt](Vec) Use const_col to opt current functions. (#17324) 2023-03-06 11:55:41 +08:00
0ad638f9fe [enhancement](transaction) Reduce hold writeLock time for DatabaseTransactionMgr to clear transaction (#17414)
* [enhancement](transaction) Reduce hold writeLock time for DatabaseTransactionMgr to clear transaction

* fix ut

* remove unnessary field for remove txn bdbje log

---------

Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-03-06 11:32:21 +08:00
9617f46fa5 [improvement](memory) Modify mem_limit default value (#17322)
Modify the default value of mem_limit to auto. auto means process mem limit is equal to max(physical mem * 0.9, 6.4G).
6.4G is the maximum memory reserved for the system.
2023-03-06 10:53:27 +08:00
400b4bf7a7 [enhance](report) add local and remote size in tablet meta header action (#17406) 2023-03-06 10:43:57 +08:00
ee1be6edd7 [chore](fe) enhance_mysql_data_type (#17429) 2023-03-06 10:42:01 +08:00
155cbffe62 [fix](regression) Parameterize the S3 info for segcompaction regression (#16731) (#17391)
Use regression conf instead hard-coded S3 info.

Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
2023-03-06 10:33:22 +08:00
56a3ead2d7 [Improvement](restore) make timeout of restore job's dispatching task progress configuable (#17434)
when a restore job which has a plenty of replicas, it may fail due to timeout. The error message is:
[RestoreJob.checkAndPrepareMeta():782] begin to send create replica tasks to BE for restore. total 381344 tasks. timeout: 600000

Currently, the max value of timeout is fixed, it's not suitable for such cases.
2023-03-06 10:05:31 +08:00
a8f20eb4ac [Enhencement](schema_scanner) Optimize the performance of reading information schema tables (#17371)
batch fill block
batch call rpc from FE to get table desc
For 34w colunms

SELECT COUNT( * ) FROM information_schema.columns;
time: 10.3s --> 0.4s
2023-03-06 09:53:01 +08:00
3d0beec01d [fix](orc) fix heap-use-after-free and potential memory leak of orc reader (#17431)
fix heap-use-after-free
The OrcReader has a internal FileInputStream, If the file is empty, the memory of FileInputStream will leak.
Besides, there is a Statistics instance in FileInputStream. FileInputStream maybe delete if the orc reader
is inited failed, but Statistics maybe used when orc reader is closed, causing heap-use-after-free error.

Potential memory leak
When init file scanner in file scan node, the file scanner prepare failed, the memory of file scanner will leak.
2023-03-06 08:42:35 +08:00
0801883604 [fix](merge-on-write) fix that delete bitmap is not calculated correctly when clone tablet (#17334) 2023-03-05 22:04:28 +08:00
5190a496ac [fix](rebalance) fix that the clone operation is not performed due to incorrect condition judgment (#17381) 2023-03-05 21:58:33 +08:00
d8a231f340 [Improvement](auth)(step-2) add ranger authorizer for hms catalog (#17424) 2023-03-05 21:50:44 +08:00
d08b231073 [fix](segcompaction) core when doing segcompaction for cancelling load(#16731) (#17432)
segcompaction is async and in parallel with load job. If the load job is
canncelling, memory structures will be destroyed and cause segcompaction
crash. This commit will wait segcompaction finished before destruction.
2023-03-05 21:24:32 +08:00
779d94f932 [fix](metrics)Delete the extra underline for metrics (#17397) 2023-03-05 16:38:43 +08:00
afb5def385 [enhancement](timeout) replace query timeout with exec timeout (#17360) 2023-03-05 11:03:59 +08:00
59bf305c5d [Improve](point query) put tablet fetch interface which is high concurrent point query operation to light_work_pool (#17400)
Since the point query lookup is very light weight
2023-03-05 10:36:50 +08:00
627b5ee302 [enhancement](k8s) Support fqdn mode for fe in k8s enviroment (#17329) 2023-03-05 10:18:56 +08:00
7b4fc412c5 [typo](docs) Optimize documents so that users can better understand. (#17295) 2023-03-04 21:02:45 +08:00
b9b028099d [enhancement](stream load pipe) using queryid or load id to identify stream load pipe instead of fragment instance id (#17362)
* [enhancement](stream load pipe) using queryid or load id to identify stream load pipe instead of fragment instance id

NewLoadStreamMgr already has pipe and other info. Do not need save the pipe into fragment state. and FragmentState should be more clear.

But this pr will change the behaviour of BE.
I will pick the pr to doris 1.2.3 and add the load id to FE support. The user could upgrade from 1.2.3 to 2.x
Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-04 16:19:36 +08:00