Commit Graph

7899 Commits

Author SHA1 Message Date
2ae28ea9dd [typo](docs)fix-doc #15438 2022-12-29 14:19:24 +08:00
4179ea31bd [typo](docs) fix typo in SHOW-ALTER.md and SHOW-LOAD-WARNINGS.md (#15431) 2022-12-29 14:19:05 +08:00
4157d8c0a6 [Fix](Regression_test)add order by to increase test stability #15439 2022-12-29 14:18:51 +08:00
298c0a2391 [typo](docs)fix be dynamic configuration doc #15443 2022-12-29 14:18:14 +08:00
f5b4faf682 fix compile doc (#15454) 2022-12-29 14:17:53 +08:00
c5277bb4d6 [doc](label)update the label (#15455) 2022-12-29 14:17:40 +08:00
7ab6ea684b [Improvement](meta) hide password of show catalog xxx stmt and for es catalog (#15410)
* [Improvement](meta) hide password of show catalog xxx

* hide es password in show create ctlg and show ctlg xx stmt
2022-12-29 14:16:32 +08:00
5b09d27d54 [feature-wip](nereids) Made decimal in nereids more complete (#15087)
1. Add IntegralDivide operator to support `DIV` semantics
2. Add more operator rewriter to keep expression type consistent between operators
3. Support the convertion between float type and decimal type.

After this PR, below cases could be executed normaly like the legacy optimizer:
  use test_query_db;
  select k1, k5,100000*k5 from test order by k1, k2, k3, k4;
  select avg(k9) as a from test group by k1 having a < 100.0 order by a;
2022-12-29 13:01:47 +08:00
29492f0d6c [refactor](file-cache) refactor the file cache interface (#15398)
Refactor the usage of file cache

### Motivation

There may be many kinds of file cache for different scenarios.
So the logic of the file cache should be hidden inside the file reader,
so that for the upper-layer caller, the change of the file cache does not need to
modify the upper-layer calling logic.

### Details

1. Add `FileReaderOptions` param for `fs->open_file()`, and in `FileReaderOptions`
    1. `CachePathPolicy`
        Determine the cache file path for a given file path.
        We can implement different `CachePathPolicy` for different file cache.

    2. `FileCacheType`
        Specified file cache type: SUB_FILE_CACHE, WHOLE_FILE_CACHE, FILE_BLOCK_SIZE, etc.

2. Hide the cache logic inside the file reader.

    The `RemoteFileSystem` will handle the `CacheOptions` and determine whether to
    return a `CachedFileReader` or a `RemoteFileReader`.

    And the file cache is managed by `CachedFileReader`
2022-12-29 12:15:46 +08:00
93a7981427 [fix](brokerload) fix broker load parquet format file finished but no data actually (#15424)
broker openReader interface cannot get the file size, resulting in the file size being incorrectly set to 0
2022-12-29 12:04:19 +08:00
987970e8e3 [fix](multi catalog)Set column defualt value for query. (#15415)
Current column default value is used only for load task. But in the case of Iceberg schema change,
query task is also possible to read the default value for columns not exist in old schema.
This pr is to support default value for query task.

Manually tested the broker load and external emr regression cases.
2022-12-29 12:03:17 +08:00
304781d837 [Improvement](meta) update show create function result (#15414)
currently, show create function is designed for native function, it has some non suitable points.

this pr bring several improvements, and make result of show create function can be used to create function.

1. add type property.
2. add ALWAYS_NULLABLE perperty for java_udf
3. use file property rather than object_file for java_udf, follow usage of create java_udf
4. remove md5 property, coz file may vary when create function again.
5. remove INIT_FN,UPDATE_FN,MERGE_FN,SERIALIZE_FN etc properties for java_udf, cos java_udf does not need these properties.
2022-12-29 11:40:14 +08:00
ffef81a6ab [feature](BE)pad missed version with empty rowset (#15030)
If all replicas of one tablet are broken, user can use this http api to pad the missed version with empty rowset.
2022-12-29 11:20:44 +08:00
3146fc8189 [bug](jdbc) fix jdbc external table with char type length error (#15386)
Now have test pg and oracle with char(100), if data='abc'
but read string data length is 100, so need trim extral spaces
2022-12-29 11:19:03 +08:00
1f98dd2c74 [fix](Nereids) Generate is missing on alias query (#15416)
support table generating function on query alias, syntax as:
```sql
SELECT * FROM (SELECT * FROM tbl) tmp LATERAL VIEW explode(c1) gtmp AS ce;
```
2022-12-29 11:11:25 +08:00
0e154feeb9 [feature](multi catalog nereids)Add file scan node to nereids. (#15201)
Add file scan node to nereids, so that the new planner could support external hms table.
2022-12-29 10:31:11 +08:00
ad3b5cbf94 [fix](memtracker) Fix VDataStreamRecvr runtime state null pointer (#15451) 2022-12-29 09:36:03 +08:00
0f3c0b78e3 [Improvement](JSONB) improve performance JSONB initial json parsing using simdjson (#15219)
test data: https://data.gharchive.org/2020-11-13-18.json.gz, 2GB, 197696 lines
before: String 13s vs. JSONB 28s
after: String 13s vs. JSONB 16s

**NOTICE: simdjson need to be patched since BOOL is conflicted with a macro BOOL defined in odbc sqltypes.h**
2022-12-29 09:29:09 +08:00
1b1083eb52 [fix](metric) fix prometheus metric format error for doris_fe_query_latency_ms (#15447)
Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2022-12-29 08:51:15 +08:00
6f200e0ef6 [fix](primary_index) not compare result in regression case: primary_index/test_pk_uk_case (#15436) 2022-12-28 22:14:20 +08:00
a22ee89431 [Enhancement](jemalloc):support heap dump by http request at runtime (#15429) 2022-12-28 20:10:50 +08:00
305dd15fea [improvement](index) Support bitmap index can be applied with compound predicate when enable vectorized engine query (#13035)
Current bitmap index only can apply pushed down predicates which in AND conditions. When predicates in OR conditions and other complex compound conditions, it will not be pushed down to the storage layer, this leads to read more data.

Based on that situation, this pr will do:

1. this pr in order to support bitmap index apply compound predicates, query sql like:
select * from tb where a > 'hello' or b < 100;
select * from tb where a > 'hello' or b < 100 or c > 'ok';
select * from tb where (a > 'hello' or b <100) and (a < 'world' or b > 200);
select * from tb where (not a> 'hello') or b < 100;
...
above sql,column a and b and c has created bitmap_index.

2. this optimization can reduce reading data by index
3. set config enable_index_apply_compound_predicates to use this optimization
2022-12-28 20:08:57 +08:00
4336aaa01a [bug](datetimev2) fix wrong info when show create table (#15422)
* [bug](datetimev2) fix wrong info when show create table

* update
2022-12-28 19:55:43 +08:00
95e6553d90 [feature-wip](nereids) Implement using join (#15311) 2022-12-28 19:22:20 +08:00
75aa00d3d0 [Feature](NGram BloomFilter Index) add new ngram bloom filter index to speed up like query (#11579)
This PR implement  the new bloom filter index: NGram bloom filter index, which was proposed in  #10733.
The new index can improve the like query performance greatly, from our some test case , can  get order of magnitude  improve.
For how to use it you can check the docs in this PR, and the index based on the ```enable_function_pushdown```,
you need set it to ```true```, to make the index work for like query.
2022-12-28 18:01:50 +08:00
0f8b15b902 [feature](nereids) support string alias in select list (#15369)
support such syntax: select '' as 'b', col1 from select_with_const
2022-12-28 17:26:48 +08:00
3aae27634a [doc](flink-connector) update flink connector faq (#15405) 2022-12-28 16:15:49 +08:00
69d95c857a [feature](remote)Add alter storage policy (#15381)
* add alter storage policy

* add alter storage policy

* add alter storage policy
2022-12-28 16:09:06 +08:00
8342691b62 [feature](remote)Add drop storage policy (#15364)
* add drop storage policy

* add drop storage policy

* add drop storage policy

* add drop storage policy
2022-12-28 16:04:30 +08:00
f7988fad03 [improvement](string) set bigger limit for ColumnString chars length (#15426) 2022-12-28 15:41:01 +08:00
8ce62600dc [Bug] #14876 && #15225 have some bugs in rewrite or to in, revert them (#15420) 2022-12-28 13:30:09 +08:00
fe02b08e04 [Improvement](thirdparty)upgrade simdjson from 1.0.2 to 3.0.1 (#15412)
Upgrade simdjson from 1.0.2 to latest version 3.0.1 to avoid -mlzcnt compiler flag causing BE UT(macOS) failure.
simdjson is now only used by VJsonScanner and disabled by default. So the impact of upgrade is limited.
2022-12-28 12:24:16 +08:00
Pxl
121f00b6e2 [Bug](function) forbid hll_union input not hll type param (#15397)
forbid hll_union input not hll type param
2022-12-28 12:23:34 +08:00
d05f430ca2 [feature](nereids) support syntax: count(all *) (#15376) 2022-12-28 11:09:56 +08:00
f8bb8c7829 [fix](broker) fix be core dump caused by broker load (#15390)
* [fix](broker) fix be core dump caused by broker load
2022-12-28 10:57:41 +08:00
2af831de33 [Fix](Nereids)fix group by binding error, resulting in incorrect results (#15328)
Original: group by is bound to the outputExpression of the current node.

Problem: When the name of the new reference of outputExpression is the same as the child's output column, the child's output column should be used for group by, but at this time, the new reference of the node's outputExpression will be used for group by, resulting in an error

Now: Give priority to the child's output for group by binding. If the child does not have a corresponding column, use the outputExpression of this node for binding
2022-12-28 10:42:21 +08:00
9f9651b2f2 [Enhancement](Jemalloc): correct the varialbe name of malloc_conf & enable prof (#15382)
enable profile and correct the conf name in Jemalloc.
2022-12-28 09:50:59 +08:00
816e12db6a [Bench](mem) some benchmark over the query limit (#15408) 2022-12-28 09:29:53 +08:00
28bb13a026 [feature](light-schema-change) enable light schema change by default (#15344) 2022-12-28 09:29:26 +08:00
22b31e516c [Bug](decimalv3) select view of decimalv3 error (#15404) 2022-12-28 08:38:33 +08:00
5ac7b09765 [feature](Nereids) Support SchemaScan (#15411)
such as: select * from information_schema.backends;
2022-12-28 00:33:48 +08:00
aad53d37c7 [typo](docs)fix doris docs 404 link (#15400) 2022-12-27 22:57:40 +08:00
03aef7a8ac [fix](nereids) sender in union's child fragment has no destination (#15402)
1. always create an exchange node for set operation node's children
2. fix cast expr's nullability bug.
2022-12-27 22:36:54 +08:00
700f963571 [refactor](remove-non-vec) remove some non vec code in segment iterator and remove reuse schema opt since it is introduced in non-vec code (#15407)
Co-authored-by: yiguolei <yiguolei@gmail.com>
2022-12-27 22:30:02 +08:00
51b14c06d3 [enhancement](nereids) support approx_count_distinct function (#15406) 2022-12-27 22:25:21 +08:00
c63dda99db [test](Nereids) Disable some regression test for materialized index. (#15387)
When light schema change is enabled by default (#15344), regression tests that run SQL by selecting data from the materialized index will fail.
This PR disabled those failed queries in the regression test. Those tests would be added back when nereids planner could give the correct plan when light schema change is enabled.
2022-12-27 19:24:03 +08:00
0550dfaeb2 [enhancement](rewrite) add OrToIn rule and fix ExtractCommonFactorsRule apply problems (#12872)
Co-authored-by: wuhangze <wuhangze@jd.com>
2022-12-27 18:39:53 +08:00
849adca225 [fix](Nereids) expressions is not be extracted when binding function (#15361) 2022-12-27 17:12:07 +08:00
a07ca41f8e [Fix](Nereids) fix repeat node nullable error bugs (#15251) 2022-12-27 17:01:33 +08:00
524208ab3a [Feature](bitmap/hll)Support return bitmap/hll data in select statement in vectorization (#15224)
Support return bitmap data in select statement in vectorization mode

In the scenario of using Bitmap to circle people, users need to return the Bitmap results to the upper layer, which is parsing the contents of the Bitmap to deal with high QPS query scenarios
2022-12-27 14:49:24 +08:00