Commit Graph

16171 Commits

Author SHA1 Message Date
cd67edef90 [fix](docs) fix chinese description for error code 1051 (#29480)
Co-authored-by: Rohit Satardekar <rohitrs1983@gmail.com>
2024-01-06 17:15:57 +08:00
612e0631ac Do not collect min max for agg table value columns while doing sample analyze. (#29483) 2024-01-06 17:15:40 +08:00
911635fac6 [feature](nereids) judge if the join is at bottom of join cluster (#29383) 2024-01-06 17:15:19 +08:00
cc7b9480cf [fix](polixy)support drop policy for user or role (#29488) 2024-01-06 17:14:47 +08:00
75efdd6e1f [fix](http) throw RejectedExecutionException to prevent http hanging by Future (#29607) 2024-01-06 16:17:07 +08:00
2c888667ed [improvement](function) standardize some ip functions' signatures #29614
The signatures of functions in these PRs should be more standard:
#27342,
#25510,
#20936,
including the following:
ipv4numtostring,
ipv4stringtonum,
ipv4stringtonumordefault,
ipv4stringtonumornull,
ipv6numtostring.

This PR will add necessary underscores between the words of each of them,
like changing ipv4numtostring to ipv4_num_to_string.
2024-01-06 16:16:38 +08:00
5789b7e380 [fix](jin) add datetimev2 precision (#29528) 2024-01-06 13:35:26 +08:00
8908a347bc [fix](nereids)need do type coercion after simplify comparasion predicate (#29546) 2024-01-06 13:34:04 +08:00
cbcb81f381 [FIX](complextype)fix compare_at base function support nested types (#29297) 2024-01-06 12:05:43 +08:00
a0c3ddf902 [fix](memory) Fix LRUCacheType::NUMBER charge (#29588)
if LRUCacheType::NUMBER, charge not add handle_size, because charge at this time is no longer the memory size, but an independent weight.
2024-01-06 10:37:56 +08:00
05d1f4f71d [fix](planner) Fix table sample not take effect (#29594)
Modify computeSampleTabletIds location. table sample not take effect because selectedIndexId=-1 in computeSampleTabletIds, the previous run FE UT had special processing, so FE UT did not discover the BUG in time.
2024-01-06 02:08:40 +08:00
0ae449f732 [ci](perf) integration clickbench test into new performance pipeline (#29429) 2024-01-05 22:29:02 +08:00
88323c73fd [Fix](wal) Fix update wal dir core (#29583) 2024-01-05 21:39:23 +08:00
7a0734dbd6 [feature](Nereids): InferPredicates support In (#29458) 2024-01-05 21:25:30 +08:00
f40cce1406 [Fix](partition) Skip rowset partition id eq 0 smaller than config wh… (#29510) 2024-01-05 19:39:51 +08:00
7402fee1fc [feature](function) support ip function ipv6_string_to_num(_or_default, _or_null), inet6_aton (#28361) 2024-01-05 19:24:45 +08:00
xy
2a6150b057 [optimize](cooldown)If cooldowned_rowsets is empty, there is no need to follow the logic of traversing the files (#27324)
Co-authored-by: xingying01 <xingying01@corp.netease.com>
2024-01-05 18:59:09 +08:00
eea6219920 [improvement](group commit) Add an option of enable relay wal on all regression test (#28757) 2024-01-05 18:27:31 +08:00
67b9d38d83 [fix](delete) fix incorrect tablet schema of delete predicate rowset (#29536) 2024-01-05 18:26:30 +08:00
2b3e75bb27 [fix](Nereids) exists should not return null (#29435) 2024-01-05 18:13:21 +08:00
132ff6c6de [opt](Nereids) add float type signature for sum aggregate function (#29503)
* [opt](Nereids) add float type signature for sum aggregate function
2024-01-05 18:06:16 +08:00
e2e9b9d8a3 [improve](insert-into) record rows info in log for check (#29581) 2024-01-05 17:28:07 +08:00
fa4721125e [Fix](show data) Inverted index size not added to data size after index build (#29568) 2024-01-05 16:21:45 +08:00
77fbbf63ed [test](Nereids): add more test for eliminate inner join by fk (#29390) 2024-01-05 16:21:24 +08:00
bf4e678795 [Docs](Community)Use the standard ASF Code of Conduct template (#29586) 2024-01-05 16:13:05 +08:00
0eee560f94 [enhancement](Nereids): add test for push filter through operator (#27294) 2024-01-05 15:48:23 +08:00
xy
d86277c2c2 [optimize](cooldown)Improved filtering conditions for cooldown tablet (#27338)
Co-authored-by: xingying01 <xingying01@corp.netease.com>
2024-01-05 15:03:54 +08:00
abbe4542e5 fix result not stable for test_show_statistic_proc (#29523) 2024-01-05 15:01:28 +08:00
e8e1a6ff03 [refactor](fold) refactor fold executor could get error status (#29541)
before _get_result return std::string, so ignore the error status.
2024-01-05 14:23:56 +08:00
39887a5cbf [ut](fe) remove useless and unsatbale tests (#29555) 2024-01-05 12:03:30 +08:00
64696829d1 [fix](Nereids) mark join should not eliminate join when child is empty (#29409) 2024-01-05 11:55:37 +08:00
fb13943a10 [Fix](Variant) fix heap use after free when updating tablet schema (#29554)
`_context->tablet_schema` maybe updated so use `_context->original_tablet_schema` instead
2024-01-05 11:42:39 +08:00
f3bbc7b876 [enchancement](delete) fix delete stmt return error with fold on be (#28557) 2024-01-05 11:27:21 +08:00
46ccbebfb0 [improve](function) get result from constant_col when expr is const (#29403) 2024-01-05 11:26:17 +08:00
baec2657dd [fix](Nereids) should cast NOT's child to boolean when analyze (#29433) 2024-01-05 11:20:39 +08:00
8c40f04f2b [Opt](parquet-reader) Opt ColumnSelectVector::set_run_length_null_map() in parquet reader. (#28954) (#29527) 2024-01-05 11:13:40 +08:00
c0f63915f7 [chore](test) make configuartion of parallel scan be fuzzy (#29356) 2024-01-05 11:09:43 +08:00
d56765126b [fix](test)Fix index_compaction unstable cases (#29499) 2024-01-05 11:03:29 +08:00
a04911a93f [fix](pipelinex) coredump caused by null pointer of Dependency::_shared_state (#29559) 2024-01-05 10:40:32 +08:00
08f2b83b81 [fix](profile) Fix row distribution timer in loadv1 (#29495)
Fix row distribution timer in loadv1
2024-01-05 10:02:18 +08:00
c1ddcc5751 [opt](config) create custom conf dir if not exists (#29391) 2024-01-05 00:14:16 +08:00
9aafcb18bd [fix](move-memtable) disable move memtable when light schema change is false (#29362) 2024-01-04 23:03:35 +08:00
99edbaf3cf [improve](move-memtable) add stream sink file writer finalize fault injection (#29552) 2024-01-04 23:02:58 +08:00
bfd23e30f6 [improve](load) handle EAGAIN in load stream (#29437) 2024-01-04 23:02:11 +08:00
6a836a53df [feature](mv) add mv rewrite info to explain (#29153)
In query rewrite by mv process, we may want know the mv rewrite process info
such as which materializedView is used by rewrite, which materializedView is rewritten successfully, and 
chose which materializedView by cost finally.

We can run sql as following to see the mv rewrite process summary info
`explain <your_query_sql>`

MaterializedView rewrite info is under the **MATERIALIZATIONS** tag.
For example as following:
we can see that materializedView with name `mv2_3` is rewritten successfuly and chosen finally.
and materializedView with name `mv2_4` and `mv1_3` is avaliable but rewrite fail

Materialized View

MaterializedViewRewriteFail:

  name: mv2_4
  FailSummary: The graph logic between query and view is not consistent

  name: mv1_3
  FailSummary: Match mode is invalid

MaterializedViewRewriteSuccessButNotChose:
  Names: 

MaterializedViewRewriteSuccessAndChose:
  Names: mv2_3

`MaterializedViewRewriteFail`:
it means that it's failure when try to use this materilaized view to represnt the query,
`NAME` is the name of MTMV.
`FAIL_SUMMARY` is the summary for the fail reason.

`MaterializedViewRewriteSuccessButNotChose`
it means that try to use this  materilaized view to represnt the query successfully, but cbo optimizer doesn't chose it finally.

`MaterializedViewRewriteSuccessAndChose`
it means that try to use this  materilaized view to represnt the query successfully and cbo optimizer  chose it finally.


If want to see detail info, we can also run sql as following to see the mv rewrite process detail info

`explain memo plan <your_query_sql>`

MaterializedView rewrite info is under the **MATERIALIZATIONS** tag, 
For example as following:

we can see the materializedView with name `mv2_3` is rewritten successfuly and chosen finally.
and materializedViews with name of `mv2_4` and `mv1_3` is failed with falil reason.

========== MATERIALIZATIONS ==========
materializationContexts:

MaterializationContext[mv1_3] ( rewriteSuccess=false, failReason=[
ObjectId : ObjectId#257.
Summary : Match mode is invalid.
Reason : matchMode is VIEW_PARTIAL.

ObjectId : ObjectId#260.
Summary : Match mode is invalid.
Reason : matchMode is VIEW_PARTIAL.

ObjectId : ObjectId#251.
Summary : Match mode is invalid.
Reason : matchMode is VIEW_PARTIAL.

ObjectId : ObjectId#254.
Summary : Match mode is invalid.
Reason : matchMode is VIEW_PARTIAL.

] )

MaterializationContext[mv2_4] ( rewriteSuccess=false, failReason=[
ObjectId : ObjectId#771.
Summary : The graph logic between query and view is not consistent.
Reason : graph logical is not equal
 query join edges is
 [<{0} --LEFT_OUTER_JOIN-- {1}>],
 view join edges is
 [<{0} --LEFT_OUTER_JOIN-- {1}>],
query filter edges
 is [<{0} --FILTER-- {}>, <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]],
view filter edges
 is [<{0} --FILTER-- {}>, <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]]
inferred edge with conditions
 {}
with error edge <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]=[(o_orderdate#20 = 2023-12-01)].

ObjectId : ObjectId#762.
Summary : The graph logic between query and view is not consistent.
Reason : graph logical is not equal
 query join edges is
 [<{0} --LEFT_OUTER_JOIN-- {1}>],
 view join edges is
 [<{0} --LEFT_OUTER_JOIN-- {1}>],
query filter edges
 is [<{0} --FILTER-- {}>, <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]],
view filter edges
 is [<{0} --FILTER-- {}>, <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]]
inferred edge with conditions
 {}
with error edge <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]=[(o_orderdate#20 = 2023-12-01)].
] )

 MaterializationContext[mv2_3] ( rewriteSuccess=true, failReason=[
] )

`ObjectId` is the id of group expression.
`Summary`is is the summary for the fail reason.
`Reason` is the detail fail reason

such as the info as above

MaterializationContext[mv2_4] ( rewriteSuccess=false, failReason=[
ObjectId : ObjectId#762.
Summary : The graph logic between query and view is not consistent.
Reason : graph logical is not equal
 query join edges is
 [<{0} --LEFT_OUTER_JOIN-- {1}>],
 view join edges is
 [<{0} --LEFT_OUTER_JOIN-- {1}>],
query filter edges
 is [<{0} --FILTER-- {}>, <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]],
view filter edges
 is [<{0} --FILTER-- {}>, <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]]
inferred edge with conditions
 {}
with error edge <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]=[(o_orderdate#20 = 2023-12-01)].
]

`0` represent table lineitem
`1` represent table orders
`[<{0} --LEFT_OUTER_JOIN-- {1}>]` means the edge which is lineitem left outer join orders
`[<{0} --FILTER-- {}>, <{1} --FILTER-- {}>[[] , [<{0} --LEFT_OUTER_JOIN-- {1}>]]]` means there is filter above orders which can not pull up because the edge `[<{0} --LEFT_OUTER_JOIN-- {1}>]`.
this can not rewrite because `[(o_orderdate#20 = 2023-12-01)]` in query is not found in **mv2_4**



**mv1_3**  def as following:
CREATE MATERIALIZED VIEW mv1_3
BUILD IMMEDIATE REFRESH auto ON SCHEDULE EVERY 1 hour
DISTRIBUTED BY RANDOM BUCKETS 12
PROPERTIES ('replication_num' = '1') as 
select 
  o_orderstatus, 
  o_clerk 
from 
  orders 
where 
  O_ORDERDATE = '2023-12-01'
group by 
  o_orderstatus, 
 o_clerk;

**mv2_3**  def as following:
CREATE MATERIALIZED VIEW mv2_3
BUILD IMMEDIATE REFRESH auto ON SCHEDULE EVERY 1 hour
DISTRIBUTED BY RANDOM BUCKETS 12
PROPERTIES ('replication_num' = '1') as 
select 
  l_linestatus, 
 o_clerk, 
from 
 (
   select 
     * 
   from 
     lineitem 
   where 
     l_shipdate = '2023-12-01'
 ) t1 
 left join (
   select 
     * 
   from 
     orders 
   where 
     o_orderdate = '2023-12-01'
 ) t2 on l_orderkey = o_orderkey 
group by 
 l_linestatus, 
 o_clerk;

**mv2_4**  def as following:
CREATE MATERIALIZED VIEW mv2_4
BUILD IMMEDIATE REFRESH auto ON SCHEDULE EVERY 1 hour
DISTRIBUTED BY RANDOM BUCKETS 12
PROPERTIES ('replication_num' = '1') as 
select 
 l_linestatus, 
 o_clerk, 
from 
 (
   select 
     * 
   from 
     lineitem 
   where 
     l_shipdate >= '2023-12-01' and l_shipdate <= '2023-12-05'
 ) t1 
 left join (
   select 
     * 
   from 
     orders 
   where 
     o_orderdate >= '2023-12-01' and o_orderdate <= '2023-12-05'
 ) t2 on l_orderkey = o_orderkey 
group by 
 l_linestatus, 
 o_clerk;
2024-01-04 23:01:55 +08:00
35150bbc22 [improve](move-memtable) log rpc failures in stream file writer (#29267) 2024-01-04 23:00:46 +08:00
96acef908a [fix](move-memtable) check eos when close stream (#29547) 2024-01-04 22:56:52 +08:00
7a4ef90110 [Improve](regresstests)add test cases for array functions (#28492) 2024-01-04 20:39:35 +08:00
d8ad6ebff2 [enhancement](disk) log disk path when creating tablet (#29464) 2024-01-04 20:36:37 +08:00
43b19fd99e [docs](timezone) refactor docs of timezone 2024-01-04 20:20:40 +08:00