Commit Graph

18429 Commits

Author SHA1 Message Date
Pxl
5e4ab7cd25 [Bug](materialized-view) add limit for drop column on mv (#24493)
add limit for drop column on mv
2023-09-19 14:32:14 +08:00
ee56783629 [fix](Java UDF) Do not use enum as the data type for JavaUdfDataType. (#24460) 2023-09-19 14:06:02 +08:00
eea84ac36c [fix](Nereids): use == instead of id to identity PhysicalHashJoin (#24535) 2023-09-19 12:06:30 +08:00
b092bdaabf [feature](load) collect loaded rows on table level after txn published (#24346)
As title.

Stream load 20 lines

```
2023-09-14 11:40:04,186 DEBUG (PUBLISH_VERSION|23) [DatabaseTransactionMgr.updateCatalogAfterVisible():1769] table id to loaded rows:{51016=20}
```

```
mysql> select count(*) from dup_tbl_basic;
+----------+
| count(*) |
+----------+
|       20 |
+----------+
1 row in set (0.05 sec)
```
2023-09-19 12:00:08 +08:00
80bcb43143 [Feature]Support external table sample stats collection (#24376)
Support hive table sample stats collection. Gramma is like

`analyze table with sample percent 10`
2023-09-19 11:20:27 +08:00
6a33e4639a [schedule](pipeline) Remove wait schedule time in pipeline query engine and change current queue to std::mutex (#24525)
This reverts commit 591aeaa98d1178e2e277278c7afeafef9bdb88d6.
2023-09-18 23:57:56 +08:00
1ac7c8f14d [improvement](scan_queue_mem_limit) scan queue mem limit is so small for (#24553)
a wide table

Users rarely set scan_queue_mem_limit, so it almost often works as 2G/20. However,
somecases we need set it to a larger value, especially for insrt into
select from a wide table.
2023-09-18 20:22:03 +08:00
c54fc82031 [improve](nereids) expand runtime filter target by hashJoin's equal condition (#23274)
generate more runtime filters
example:

lineitem join partsupp on l_partkey= ps_partkey join filter(part) on ps_partkey=p_partkey 
we need two RFs:
RF1: p_partkey->ps_partkey
RF2: p_partkey->l_partkey

This pr will generate RF2, but current version will not.

merge runtime filters
current version, if one src could affect 2 targets, we will generate 2 runtime filters.
after this pr, the two rf will be merged.
refer to regression test: ds_rf2/ds_rf5/ds_rf54
2023-09-18 18:27:01 +08:00
3f0d9d182f [doc](optimizer) Rewrite docs of statistics according to the current master (#24438)
Remove verbsoe sample, stale grammar, deleted function
And add some use advices
2023-09-18 18:25:43 +08:00
67e8951b72 [fix](stats) Fix analyze failed when there are thousands of partitions. (#24521)
It's caused by we used same query id for multiple queries of same olap analyze task, but many structures related to query execution depends on query id.
2023-09-18 17:27:10 +08:00
dcabc06510 [fix](pipeline) update check-pr-if-need-run-build.sh (#24515)
update check-pr-if-need-run-build.sh
2023-09-18 17:18:23 +08:00
9a47e8fa73 [catalog lock](log) enable catalog lock log (#24530) 2023-09-18 16:56:01 +08:00
96f197114c [Improve](explode) improve explode func with array nested other type (#24455)
improve explode func with array nested other type
2023-09-18 16:05:30 +08:00
ef4ab106d8 [fix](security): non-static inner class should not implement serialized interface, or when it is serialized it will contain outer class info, which is not safe #24454
fix: non-static inner class should not implement serialized interface, or when it is serialized it will contain outer class info, which is not safe

And in this scenario, the class does not use info of outer class, which should use static class instead
2023-09-18 15:55:43 +08:00
b9f1ac153a [improvement](profile) do not remove value 0 counter (#24487)
do not remove value 0 counter
2023-09-18 15:31:19 +08:00
Pxl
1d1eeaec4a [Chore](checks) fix Project root configuration file: NONE (#24533)
fix Project root configuration file: NONE
2023-09-18 15:30:20 +08:00
b4432ce577 [Feature](statistics)Support external table analyze partition (#24154)
Enable collect partition level stats for hive external table.
2023-09-18 14:59:26 +08:00
1153907897 [opt](nereids)add explanation why we always update col stats in StatsCalculator. 2023-09-18 13:47:37 +08:00
f3e350e8ec [Improvement](statistics)Improve statistics user experience (#24414)
Two improvements:
1. Move the `Job_id` column for the return info of `Analyze table` command to the first column. To keep consistent with `show analyze`.
```
mysql> analyze table hive.tpch100.region;
+--------+--------------+-------------------------+------------+--------------------------------+
| Job_Id | Catalog_Name | DB_Name                 | Table_Name | Columns                        |
+--------+--------------+-------------------------+------------+--------------------------------+
| 14403  | hive         | default_cluster:tpch100 | region     | [r_regionkey,r_comment,r_name] |
+--------+--------------+-------------------------+------------+--------------------------------+
1 row in set (0.03 sec)
```
2. Add `analyze_timeout` session variable, to control `analyze table/database with sync` timeout.
2023-09-18 13:36:41 +08:00
79fbc2e819 [regression-test](planner)add test for insert default values (#23559)
Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
2023-09-18 12:24:54 +08:00
c56d3237e8 [opt](Nereids) remove canEliminate flag on LogicalProject (#24362)
since we have three infrastructure to ensure changing input column order
not lead to wrong result, we could remove this flag on LogicalProject to
eliminate project as mush as possible and let code clear.

1. output list in ResultSink node
2. regular children output in SetOperation node
3. producer to consumer slot id map in CteConsumer
2023-09-18 12:22:33 +08:00
ae0b58fcde [typo](doc)modify error word (#24456) 2023-09-18 11:27:52 +08:00
7a8e3a6587 [fix](nereids) fix cte filter pushdown if the filters can be aggregated (#24489)
Current cte common filter extraction doesn't work if the filters can be aggregated, which will lead the common filter can't be pushed down inside cte. Consider the following case:
with main as (select c1 from t1) select * from (select m1.* from main m1, main m2 where m1.c1 = m2.c1) abc where c1 = 1;
The common c1=1 filter can't be pushed down.

This pr fixed the original extraction logic from set to list to make the logic works, and this will also resolve the tpcds query4/11's pattern works well also.
2023-09-18 11:26:55 +08:00
932b639086 [refactor](point query) decouple PointQueryExec from the Coordinator (#24509)
In order to decouple PointQueryExec from the Coordinator, both PointQueryExec and Coordinator inherit from CoordInterface, and are collectively scheduled through StmtExecutor.
2023-09-18 11:25:40 +08:00
23a75d0277 [FIX](decimalv3) Fix decimalv3 with abnormal value same with mysql result (#24499)
Fix decimalv3 with abnormal value same with mysql result
2023-09-18 11:12:26 +08:00
Pxl
7f7ec496cd [Chore](checks) fix sonarcloud properties have wrong path (#24517)
fix sonarcloud properties have wrong path
2023-09-18 11:11:53 +08:00
c746a89c72 [improvement](transaction) print txn edit log cost time #24501 2023-09-18 11:06:30 +08:00
f04bc05a7e [fix](agg) The offset value was added twice in 'pack_fixed' (#24506) 2023-09-18 10:24:32 +08:00
591aeaa98d Revert "[schedule](pipeline) Remove wait schedule time in pipeline query engine (#23994)" (#24472)
This reverts commit 32a7eef96a09799c8336c1964bfe7d676b7e4c98.
2023-09-18 09:57:38 +08:00
a07f59de8c [Fix](multi-catalog) Fix hadoop viewfs issues. (#24507)
Error Msg:
Caused by: org.apache.doris.datasource.CacheException: failed to get input splits for FileCacheKey{location='viewfs://my-cluster/ns1/usr/hive/warehouse/viewfs.db/parquet_table', inputFormat='org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'} in catalog test_viewfs_hive
        at org.apache.doris.datasource.hive.HiveMetaStoreCache.loadFiles(HiveMetaStoreCache.java:466) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache.access$400(HiveMetaStoreCache.java:112) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache$3.load(HiveMetaStoreCache.java:210) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache$3.load(HiveMetaStoreCache.java:202) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.common.util.CacheBulkLoader.lambda$null$0(CacheBulkLoader.java:42) ~[doris-fe.jar:1.2-SNAPSHOT]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_131]
        ... 3 more
Caused by: org.apache.doris.common.UserException: errCode = 2, detailMessage = Failed to list located status for path: viewfs://my-cluster/ns1/usr/hive/warehouse/viewfs.db/parquet_table
        at org.apache.doris.fs.remote.RemoteFileSystem.listLocatedFiles(RemoteFileSystem.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache.getFileCache(HiveMetaStoreCache.java:381) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache.loadFiles(HiveMetaStoreCache.java:432) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache.access$400(HiveMetaStoreCache.java:112) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache$3.load(HiveMetaStoreCache.java:210) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache$3.load(HiveMetaStoreCache.java:202) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.common.util.CacheBulkLoader.lambda$null$0(CacheBulkLoader.java:42) ~[doris-fe.jar:1.2-SNAPSHOT]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_131]
        ... 3 more
Caused by: java.nio.file.AccessDeniedException: viewfs://my-cluster/ns1/usr/hive/warehouse/viewfs.db/parquet_table: org.apache.hadoop.fs.s3a.auth.NoAuthWithAWSException: No AWS Credentials provided by TemporaryAWSCredentialsProvider SimpleAWSCredentialsProvider EnvironmentVariableCredentialsProvider IAMInstanceCredentialsProvider : com.amazonaws.SdkClientException: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY))
        at org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:215) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.Invoker.onceInTheFuture(Invoker.java:190) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.Listing$ObjectListingIterator.next(Listing.java:651) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.Listing$FileStatusListingIterator.requestNextBatch(Listing.java:430) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.Listing$FileStatusListingIterator.<init>(Listing.java:372) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.Listing.createFileStatusListingIterator(Listing.java:143) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.Listing.getListFilesAssumingDir(Listing.java:211) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.S3AFileSystem.innerListFiles(S3AFileSystem.java:4898) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.S3AFileSystem.lambda$listFiles$38(S3AFileSystem.java:4840) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.statistics.impl.IOStatisticsBinding.invokeTrackingDuration(IOStatisticsBinding.java:547) ~[hadoop-common-3.3.6.jar:?]
        at org.apache.hadoop.fs.statistics.impl.IOStatisticsBinding.lambda$trackDurationOfOperation$5(IOStatisticsBinding.java:528) ~[hadoop-common-3.3.6.jar:?]
        at org.apache.hadoop.fs.statistics.impl.IOStatisticsBinding.trackDuration(IOStatisticsBinding.java:449) ~[hadoop-common-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.S3AFileSystem.trackDurationAndSpan(S3AFileSystem.java:2480) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.S3AFileSystem.trackDurationAndSpan(S3AFileSystem.java:2499) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.hadoop.fs.s3a.S3AFileSystem.listFiles(S3AFileSystem.java:4839) ~[hadoop-aws-3.3.6.jar:?]
        at org.apache.doris.fs.remote.RemoteFileSystem.listLocatedFiles(RemoteFileSystem.java:50) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache.getFileCache(HiveMetaStoreCache.java:381) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache.loadFiles(HiveMetaStoreCache.java:432) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache.access$400(HiveMetaStoreCache.java:112) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache$3.load(HiveMetaStoreCache.java:210) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.hive.HiveMetaStoreCache$3.load(HiveMetaStoreCache.java:202) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.common.util.CacheBulkLoader.lambda$null$0(CacheBulkLoader.java:42) ~[doris-fe.jar:1.2-SNAPSHOT]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_131]
        ... 3 more
2023-09-18 09:51:33 +08:00
f1e049d4d6 [fix](java-udaf)Fix need to restart BE after replacing the jar package in java-udaf (#24469) 2023-09-17 21:17:05 +08:00
92e521bba5 [regression-test](fix) fix query_p0/having/having.groovy case bug (#24478) 2023-09-17 20:26:21 +08:00
ebe582758f [opt](Nereids): use LocalDate to replace Calendar (#24361) 2023-09-17 11:16:03 +08:00
7dcc68736d [enhancement](disk) refine io error and report bad when disk is abnormal (#24390) 2023-09-17 11:07:05 +08:00
5c9785045f [Fix](Full compaction) Fix local variable using in test case (#24440) 2023-09-17 00:08:32 +08:00
4594fd25d8 [Fix](kerberos) Fix kerberos relogin bugs when using hdfs-load. (#24490) 2023-09-17 00:05:07 +08:00
4b5cea1ef8 [enhancement](fix)change ordinary type null value is \N,complex type null value is null (#24207) 2023-09-16 21:46:42 +08:00
88adab3114 [fix](Nereids): fix be core when array_map is not nullable (#24488)
fix be core when array_map is not nullable
2023-09-16 20:39:15 +08:00
a2efa650ec [catalog lock](log) enable info log level on catalog lock (#24471) 2023-09-16 20:29:49 +08:00
Pxl
dd2c455057 [Chore](checks) set sonar-project.properties (#24473)
set sonar-project.properties
2023-09-16 18:46:11 +08:00
b7a7a05eaa [UT](binlog) Add BinlogManager unit test #24486
add BinlogManager unit test
add DBBinlog unit test
add TableBinlog unit test
2023-09-16 18:39:52 +08:00
de50fb5a46 [enhancement](Tablet) rename pathHashToDishInfoRef to pathHashToDiskInfoRef (#24311) 2023-09-16 18:39:11 +08:00
990d6c02ec [Feature](new function) Add a uuid-numeric function, returns uuid in largerint type, 20x faster than uuid (#24395) 2023-09-16 18:26:13 +08:00
0ccb032d79 [parameter](query timeout) change default query timeout to 15min (#24480)
Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-09-16 18:17:58 +08:00
ed8db3727c [feature](partial update) support MOW partial update for insert statement (#21597) 2023-09-16 17:11:59 +08:00
643d09de06 [fix](index compaction)skip index compaction when no output segment (#24468) 2023-09-16 16:42:39 +08:00
76ac77b1d0 [fix](compaction) compaction should catch exception when read next block (#24484) 2023-09-16 16:25:55 +08:00
8012ac7661 [fix](bdbje) Remove improper check for journalId (#24464)
* Introduced by  https://github.com/apache/doris/pull/24259
2023-09-16 14:52:27 +08:00
8ce109bda7 [pipelineX](profile) phase 2: refine profile (#24467) 2023-09-16 14:28:20 +08:00
81b6ab9b68 [Fix](topn opt) only allow duplicate key or MOW model to use 2 phase read opt in nereids planner (#24485)
The fetch phase is not support aggregation at present
2023-09-16 10:01:36 +08:00