Repository navigation
Commit df06507
authored
[fix](hudi) fix hudi scan problem (apache#51489)
### What problem does this PR solve?
Related PR: apache#51329
Problem Summary:
The `LogicalHudiScan` class should overload the method
`withOperativeSlots` and return the `LogicalHudiScan` type. Otherwise,
the `LogicalFileScanToPhysicalFileScan` rule will be incorrectly applied
when querying the hudi table, resulting in the generation of
`PhysicalFileScan`.
Because `plan` is `LogicalFileScan`, `plan -> !(plan instanceof
LogicalHudiScan)` will incorrectly return true.
```java
public class LogicalFileScanToPhysicalFileScan extends OneImplementationRuleFactory {
@OverRide
public Rule build() {
return logicalFileScan().when(plan -> !(plan instanceof LogicalHudiScan)).then(fileScan ->
new PhysicalFileScan(
fileScan.getRelationId(),
fileScan.getTable(),
fileScan.getQualifier(),
DistributionSpecAny.INSTANCE,
Optional.empty(),
fileScan.getLogicalProperties(),
fileScan.getSelectedPartitions(),
fileScan.getTableSample(),
fileScan.getTableSnapshot(),
fileScan.getOperativeSlots())
).toRule(RuleType.LOGICAL_FILE_SCAN_TO_PHYSICAL_FILE_SCAN_RULE);
}
}
```1 parent 1e3cacd commit df06507
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
170 | 179 | | |
171 | 180 | | |
172 | 181 | | |
| |||
0 commit comments