-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Fix](auto-partition) fix auto partition expr change unexpected #36345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
TPC-H: Total hot run time: 39786 ms |
TPC-DS: Total hot run time: 173315 ms |
ClickBench: Total hot run time: 31.19 s |
|
run buildall |
TPC-H: Total hot run time: 40733 ms |
TPC-DS: Total hot run time: 171740 ms |
ClickBench: Total hot run time: 30.61 s |
|
run buildall |
TPC-H: Total hot run time: 39443 ms |
TPC-DS: Total hot run time: 173128 ms |
ClickBench: Total hot run time: 30.52 s |
|
run buildall |
TPC-H: Total hot run time: 39495 ms |
TPC-DS: Total hot run time: 172730 ms |
ClickBench: Total hot run time: 30.35 s |
|
run buildall |
TPC-H: Total hot run time: 40502 ms |
TPC-DS: Total hot run time: 173106 ms |
ClickBench: Total hot run time: 30.46 s |
HappenLee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…he#36345) ## Proposed changes Issue Number: close #xxx there's a caller used `getPartitionExprs` and modified the result. the result is a reference to a part of metadata. If when we create the table, the number of editlog didn't reach the limit to generate image file, when it reaches, the image will get the wrong metadata of `partitionExprs` from memory which was modified. currently we don't know why, but this root cause has been confirmed by: ```java private void analyzerPartitionExpr(Analyzer analyzer, PartitionInfo partitionInfo) throws AnalysisException { ArrayList<Expr> exprs = partitionInfo.getPartitionExprs(); for (Expr e : exprs) { LOG.info("beforeB: {}", e.toSql()); e.analyze(analyzer); LOG.info("afterB: {}", e.toSql()); } } ``` ```log 2024-06-18 21:49:07,449 INFO (mysql-nio-pool-154|695) [OlapScanNode.analyzerPartitionExpr():1561] beforeB: date_trunc(Carding_Day, 'MONTH') 2024-06-18 21:49:07,449 INFO (mysql-nio-pool-154|695) [OlapScanNode.analyzerPartitionExpr():1563] afterB: date_trunc(`a`.null, 'MONTH') ```
## Proposed changes
Issue Number: close #xxx
there's a caller used `getPartitionExprs` and modified the result. the
result is a reference to a part of metadata. If when we create the
table, the number of editlog didn't reach the limit to generate image
file, when it reaches, the image will get the wrong metadata of
`partitionExprs` from memory which was modified.
currently we don't know why, but this root cause has been confirmed by:
```java
private void analyzerPartitionExpr(Analyzer analyzer, PartitionInfo partitionInfo) throws AnalysisException {
ArrayList<Expr> exprs = partitionInfo.getPartitionExprs();
for (Expr e : exprs) {
LOG.info("beforeB: {}", e.toSql());
e.analyze(analyzer);
LOG.info("afterB: {}", e.toSql());
}
}
```
```log
2024-06-18 21:49:07,449 INFO (mysql-nio-pool-154|695) [OlapScanNode.analyzerPartitionExpr():1561] beforeB: date_trunc(Carding_Day, 'MONTH')
2024-06-18 21:49:07,449 INFO (mysql-nio-pool-154|695) [OlapScanNode.analyzerPartitionExpr():1563] afterB: date_trunc(`a`.null, 'MONTH')
```
Proposed changes
Issue Number: close #xxx
there's a caller used
getPartitionExprsand modified the result. the result is a reference to a part of metadata. If when we create the table, the number of editlog didn't reach the limit to generate image file, when it reaches, the image will get the wrong metadata ofpartitionExprsfrom memory which was modified.when Nereids timeout, we will get into trouble in legacy planner here: