morningman commented on code in PR #46911:
URL: https://github.com/apache/doris/pull/46911#discussion_r1971145170
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/FileScanNode.java:
##########
@@ -61,6 +61,7 @@ public abstract class FileScanNode extends ExternalScanNode {
// For explain
protected long totalFileSize = 0;
protected long totalPartitionNum = 0;
+ protected long tableLevelRowCount = -1;
Review Comment:
Looks like this field is only used for showing in `explain` result?
If yes, add some comment to it
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java:
##########
@@ -198,10 +197,54 @@ private void setPaimonParams(TFileRangeDesc rangeDesc,
PaimonSplit paimonSplit)
tDeletionFile.setLength(deletionFile.length());
fileDesc.setDeletionFile(tDeletionFile);
}
+ if (paimonSplit.getRowCount().isPresent()) {
+ fileDesc.setRowCount(paimonSplit.getRowCount().get());
+ }
+ if (paimonSplit.getRowCount().isPresent()) {
Review Comment:
Why u use 2 `if`? looks like these 2 `if` are same?
And `row_count` in `TPaimonFileDesc` is deprecated? If yes, add comment in
code
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java:
##########
@@ -198,10 +197,54 @@ private void setPaimonParams(TFileRangeDesc rangeDesc,
PaimonSplit paimonSplit)
tDeletionFile.setLength(deletionFile.length());
fileDesc.setDeletionFile(tDeletionFile);
}
+ if (paimonSplit.getRowCount().isPresent()) {
+ fileDesc.setRowCount(paimonSplit.getRowCount().get());
+ }
+ if (paimonSplit.getRowCount().isPresent()) {
+
tableFormatFileDesc.setTableLevelRowCount(paimonSplit.getRowCount().get());
+ }
tableFormatFileDesc.setPaimonParams(fileDesc);
rangeDesc.setTableFormatParams(tableFormatFileDesc);
}
+ @VisibleForTesting
+ public static Optional<Long>
calcuteTableLevelCount(List<org.apache.paimon.table.source.Split> paimonSplits)
{
+ // check if all splits dont't have deletion vector or cardinality of
every
Review Comment:
```suggestion
// check if all splits don't have deletion vector or cardinality of
every
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]