[multistage]partition assignment refactor#12079
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #12079 +/- ##
============================================
- Coverage 61.68% 61.48% -0.20%
- Complexity 1151 1153 +2
============================================
Files 2391 2406 +15
Lines 130211 130851 +640
Branches 20141 20218 +77
============================================
+ Hits 80317 80457 +140
- Misses 44046 44513 +467
- Partials 5848 5881 +33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ad29058 to
78f9d7a
Compare
walterddr
left a comment
There was a problem hiding this comment.
CC @Jackie-Jiang to take a look
There was a problem hiding this comment.
not sure if this is the best way to go. i am also ok with having to ask this pass in as mandatory
There was a problem hiding this comment.
technically the class should be named "PartitionTableInfo". this doesn't indicate "co-locate" at all
There was a problem hiding this comment.
Either change it or add a TODO
There was a problem hiding this comment.
TODO: fix this test, it should always check the nested reason b/c that's always wrapped in parser throw or planner throw. doesn't make sense to check just the top level msg
There was a problem hiding this comment.
previously we decided to allow this but i guess we should not. putting an ignore here first but i think we should not allow this and should throw exception
There was a problem hiding this comment.
note: allowed here but it will revert back to generic assignment
this field is to indicate whether the exchange (or mailbox) requires to reshuffle the data isPartition semantically means if the data is already partitioned, which can be true, just not the same partition as the mailbox/exchange expects
fix several rebase error
a63a686 to
325c1b2
Compare
1. we don't support rehash by pre-hash method (exchange doesn't support the same with table) so check all pre-partition instead of check single child 2. set default for exchange and default for table separately 3. fix tests
...-planner/src/main/java/org/apache/pinot/query/planner/physical/DispatchablePlanMetadata.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Either change it or add a TODO
| Preconditions.checkState(numPartitions > 0, "'%s' must be positive, got: %s", | ||
| PinotHintOptions.TableHintOptions.PARTITION_SIZE, numPartitions); | ||
|
|
||
| String partitionFunction = tableOptions.getOrDefault(PinotHintOptions.TableHintOptions.PARTITION_FUNCTION, |
There was a problem hiding this comment.
Don't add default. In most cases this is murmur but we should not assume it
There was a problem hiding this comment.
this would be backward-incompatible, all existing queries with table hints without hash function will fail
There was a problem hiding this comment.
Understood. Currently we assume all table options using the same partition function. Putting Murmur as the default might be safer
| // leaf-to-intermediate condition | ||
| return numSenders * sender.getPartitionParallelism() == numReceivers | ||
| && sender.getPartitionFunction() != null | ||
| && sender.getPartitionFunction().equals(receiver.getPartitionFunction()); |
There was a problem hiding this comment.
We should compare ignore cases
step 2 in #12015
this PR:
tableOptions- e.g. assigned as table partitionWork List
TODO: