Commit Graph

6229 Commits

Author SHA1 Message Date
b1db8aef58 [regression](array-type) add some case for array insert (#12474)
Co-authored-by: hucheng01 <hucheng01@baidu.com>
2022-09-09 11:18:06 +08:00
73351917ab [Enhancement](array-type) Add readable information in subquery for array type #12463 2022-09-09 11:17:50 +08:00
a04f9814fe [fix](Nereids) column prune generate empty project list on join's child (#12486)
* [fix](Nereids) column prune generate empty project list on join's child
2022-09-09 10:43:57 +08:00
f98ec06783 [feature-wip](new-scan) Add memtracker and span for new olap scan node (#12281)
Add memtracker and span for new olap scan node
2022-09-09 09:39:08 +08:00
a468085efe [improvement](error info)improve the s3 path err msg #12438 2022-09-09 09:14:24 +08:00
b4663062da [feature-wip](parquet-reader) bug fix, parquet footer buffer is small when containing many columns (#12477)
Failed when reading parquet file with many columns(>1600).

mysql> select int_col from types_sf100_r100w limit 5;
ERROR 1105 (HY000): errCode = 2, detailMessage = Couldn't deserialize thrift msg:
TProtocolException: Invalid data
parse_thrift_footer uses fixed length buffer(=64k) to read parquet footer, but the meta data of a parquet file with 1600 columns can exceed 5MB.

Therefore, the buffer size needs to be applied according to the actual length.
2022-09-09 09:12:34 +08:00
b45a8379eb [bugfix](odbc) escape identifiers for sqlserver and postgresql (#12487)
Delimited identifier format for sqlserver and postgresql is different from MySQL.
Sqlserver use brackets ([ ]) and postgresql use double quotes("").
2022-09-09 09:11:03 +08:00
3c4c4b1a87 [feature-wip](parquet-reader) add gzip compression codec (#12488)
Query failed when reading parquet data compressed by GZIP:

mysql> select * from customer limit 1;
ERROR 1105 (HY000): errCode = 2, detailMessage = unknown compression type(GZIP)
2022-09-09 09:10:25 +08:00
3cc06820c4 [doc](performance) performance doc and script update (#12493) 2022-09-09 09:09:49 +08:00
2aad293d8a delete_doc_upd (#12473)
delete_doc_update
2022-09-09 09:08:12 +08:00
22dec46f48 [fix](vectorized load) fix incomplete errmsg when find partition failed (#12485)
Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
2022-09-09 09:03:06 +08:00
e84272ed43 [improvment](planner) unset common fields to reduce plan thrift size (#12495)
1. For query with 1656 union, the plan thrift size will be reduced from 400MB+ to 2MB.
This optimization is introduced from #4904, but lost after #9720

2. Disable ExprSubstitutionMap.verify when debug is disable.
So that the plan time of query with 1656 union will be reduced from 20s to 2s
2022-09-09 09:02:45 +08:00
d2a23a4cf9 [enhancement](Nereids) change aggregate and join stats calc algorithm (#12447)
The original statistic derive calculate algorithm rely on NDV and other column statistics. But we cannot get these stats in product environment. 
This PR change these operator's stats calc algorithm to use a DEFAULT RATIO variable instead of column statistics.
We should change these algorithm when we could get column stats in product environment
2022-09-09 01:00:07 +08:00
b4f0f39e77 [feature](Nereids) implement uncheckedCast method in VarcharLiteral (#12468)
Implement uncheckedCast on VarcharLiteral for a temp way to let TimestampArithmetic work.
We should remove these code and do implicit cast in TypeCoercion rule in future.
2022-09-09 00:33:37 +08:00
8478efad44 [improve](Nereids): check same logicalProperty when insert a Group. (#12469) 2022-09-09 00:00:11 +08:00
2ccbbb5392 [fix](stream load) Fix wrong conversion of null value when vstream load json format (#12460) 2022-09-08 16:48:35 +08:00
85bd297777 [feature](function)Support function "current_date" in FE (#11702)
Issue Number: close #11699
2022-09-08 16:00:57 +08:00
d1ab6b1db2 [enhancement](nereids) add syntax support for fractional literal (#12444)
Just as legacy planner, Nereids parse all fractional literal to decimal.
In the future, we will add more syntax for user to control the fractional literal type.
2022-09-08 15:54:20 +08:00
7c7ac86fe8 [feature](Nereids): Left deep tree join order. (#12439)
* [feature](Nereids): Left deep tree join order.
2022-09-08 15:09:22 +08:00
14221adbbd [fix](agg) crash caused by failure of prepare (#12437) 2022-09-08 15:03:45 +08:00
0ea7c4b37b [docs](quick-compaction) update quick-compaction docs (#12417) 2022-09-08 15:00:59 +08:00
491dd34ba7 [fix](planner) fix orthogonal_bitmap_union_count plan : wrong PREAGGREGATION (#12095)
Execution plan display when using orthogonal_bitmap_union_count function:

PREAGGREGATION: OFF

Reason: Invalid Aggregate Operator: orthogonal_bitmap_union_count

The correct plan is: PREAGGREGATION: ON
Co-authored-by: lihuigang <lihuigang@meituan.com>
2022-09-08 15:00:43 +08:00
461a4cc94e [Enhancement](Error Msg) show details of COLUMN and TABLE name regex #11999
Co-authored-by: wuhangze <wuhangze@jd.com>
2022-09-08 14:59:39 +08:00
824a192f8f [enhancement](http) executeSQL rest api support streaming response (#12239) 2022-09-08 14:57:15 +08:00
9225dd16ca [fix](grouping sets) grouping sets cause be core or return wrong results (#12313) 2022-09-08 14:55:50 +08:00
c3af60eff8 [fix](threadpool) threadpool schedules does not work right on concurr… (#12370)
* [fix](threadpool) threadpool schedules does not work right on concurrent token

Assuming there is a concurrent thread token whose concurrency is 2, and the 1st
submit on the token is submitted to threadpool while the 2nd is not submitted due
to busy. The token's active_threads is 1, then thread pool does not schedule the
token.

The patch fixes the problem.
2022-09-08 14:54:46 +08:00
26cf2d3742 [enhancement](array-type) avoid abuse of Offset and Offset64 #12378
We already separate Array Offset64 and String Offset(32bit) in PR: #12341

Now we limit: Offset inside IColumn, Offset64 only inside ColumnArray, to avoid abuse of them.
If we use the wrong one, it will compile failed.
2022-09-08 14:53:07 +08:00
53b619c487 [brpc]using pooled connection and enlarge brpc connection timeout and retry… (#10443)
* using pooled connection and enlarge brpc connection timeout and retry times

When a connection failure happen, doris fails queries using the connection.
We should lower the impact of a connection failure by using pooled connection
and enlaring connection timeout and retry times.

* clang format
2022-09-08 14:50:15 +08:00
af0f4584d5 fix cache cleaner (#12432) 2022-09-08 13:31:19 +08:00
6cd06f7586 [typo](docs) INSERT documentation fix (#12455)
INSERT documentation fix
2022-09-08 13:09:08 +08:00
74ffdbeebc [feature](Nereids) Support OneRowRelation and EmptyRelation (#12416)
Support OneRowRelation and EmptyRelation.

OneRowRelation: `select 100, 'abc', substring('abc', 1, 2)`
EmptyRelation: `select * from tbl limit 0`

Note:
PhysicalOneRowRelation will translate to UnionNode(constExpr) for BE execution
2022-09-08 12:21:13 +08:00
2a64571bef [enhancement](generic_iterator) fix num check and add some notes (#12434)
Co-authored-by: yixiutt <yixiu@selectdb.com>
2022-09-08 12:09:02 +08:00
a6880ca573 [fix](Nereids) throw IndexOutOfBoundsException in DistributionSpecHash#equalsSatisfy (#12446)
In earlier PR #11976 , we changed DistributionSpecHash#equalsSatisfy, and forgot to check whether the length of both side are same. When required's shuffle slot size longer than current one, exception will be thrown.
2022-09-08 11:41:48 +08:00
dd2f834c79 [feature-wip](parquet-reader) bug fix, create compress codec before parsing dictionary (#12422)
## Fix five bugs:
1. Parquet dictionary data may be compressed, but `ColumnChunkReader` try to parse dictionary data before creating compression codec, causing unexpected data errors.
2. `FE` doesn't resolve array type
3. `ParquetFileHdfsScanner`  doesn't fill partition values when the table is partitioned
4. `ParquetFileHdfsScanner` set `_scanner_eof = true` when a scan range is empty, causing the end of the scanner, and resulting in data loss
5. typographical error in `PageReader`
2022-09-08 09:54:25 +08:00
d40a9d0555 [fix](memtracker) Fix memtracker did not subtract the memory released by load channel cancel (#12405)
When the load channel is canceled, the memtracker does not subtract the memory released by the load channel. This will cause the memory usage counted by the memtracker of the load channel mgr to be larger than the actual memory usage.
2022-09-08 09:22:11 +08:00
41bc6b857d [refactor](shuffle) remove unused code (#12442) 2022-09-08 09:15:25 +08:00
018b4b7e1e [bugfix](report) fix continuous version miss check (#12415)
Co-authored-by: yixiutt <yixiu@selectdb.com>
2022-09-08 08:39:22 +08:00
e7aa131506 [enhancement](tcmalloc) add aggressive_memory_decommit conf and make it disable (#12436)
Co-authored-by: yixiutt <yixiu@selectdb.com>
2022-09-08 08:37:16 +08:00
a536030979 [FOLLOWUP](load) fix nullable and add regression (#12375)
* [FOLLOWUP](load) fix nullable and add regression
2022-09-08 00:05:04 +08:00
86e347f3bb [Bug](doe) fix closing scanner twice (#12408) 2022-09-07 22:45:30 +08:00
569ab30556 [bug](NodeChannel) fix OOM caused by pending queue in sink send (#12359) (#12362)
Each NodeChannel has its own queue, with size up to 1/20 exec_mem_limit.
User will crash into OOM if set exec_mem_limit high. This commit uses
fixed number to control the total max memory used by NodeChannels.

Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
2022-09-07 20:49:08 +08:00
bdbce77227 [fix](nereids) cast left child of TimestampArithmetic to wrong type in BindFunction (#12423) 2022-09-07 20:32:47 +08:00
c2808de867 [Doc](balance)add replica balance speed param (#12406)
* update balance param
2022-09-07 19:41:45 +08:00
184be8d13c [fix](array-type) ARRAY is not supported in bloomfilter index (#12353)
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-09-07 18:00:01 +08:00
941bda5a20 [enhancement](spark-load)support dynamic set env (#12276)
* [enhancement](spark-load)support dynamic set env and display spark appid

* [enhancement](spark-load)support dynamic set env
2022-09-07 16:24:29 +08:00
40f481049a [fix](Nereids)lowest cost plan map do not be merged when do group merge (#12396)
* [fix](Nereids)lowest cost plan map do not be merged when do group merge
2022-09-07 16:13:11 +08:00
09b45f2b71 [Function](ELT)Add elt function (#12321) 2022-09-07 15:21:08 +08:00
f2923f9180 [Refactor](Nereids) Simplify get input and output slots for plan/expression. (#12356)
Simplify the code of getting input/output slots from `Expression` or `Plan`.

**new interfaces add**

`Expression`:
`getInputSlots`: Get all the input slots of the expression.

`Plan`:
- `getOutputSet`: Get the output slot set of the plan.
- `getInputSlots`: Get the input slot set of the plan.

**changed interface**

`TreeNode`:
- `collect`: return `set` as result instead of `list`.
2022-09-07 14:05:37 +08:00
0bb06a1fa7 [feature](Nereids) let nullable of Year, WeekOfYear and Divide be the same as implementation in BE (#12374)
These function/expression should always be nullable, so just return true in the overwrite method.
- Year
- WeekOfYear
- Divide
2022-09-07 13:09:08 +08:00
46776af2a3 [fix](Nereids)plan translator lost other conjuncts on hash join node (#12391)
In the earlier PR #11812 , we split join condition into two parts: hash join conjuncts and other condition. But we forgot to translate other condition into other conjuncts in HashJoinNode of legacy planner. So we get wrong result if query has other condition on join node. Such as:

SELECT * FROM lineorder INNER JOIN part ON lo_partkey = p_partkey WHERE lo_orderkey > p_size;
2022-09-07 11:32:05 +08:00