jiacai2050 commented on code in PR #1594:
URL: https://github.com/apache/horaedb/pull/1594#discussion_r1849919649


##########
src/table_engine/src/partition/rule/df_adapter/mod.rs:
##########
@@ -16,21 +16,26 @@
 // under the License.
 
 //! Partition rule datafusion adapter
+use std::collections::{BTreeSet, HashMap};
 
 use common_types::{row::RowGroup, schema::Schema};
 use datafusion::logical_expr::Expr;
 
 use self::extractor::{KeyExtractor, NoopExtractor};
 use crate::partition::{
     rule::{
-        df_adapter::extractor::FilterExtractorRef, 
factory::PartitionRuleFactory, PartitionRulePtr,
-        PartitionedRows,
+        df_adapter::extractor::FilterExtractorRef, 
factory::PartitionRuleFactory,
+        filter::PartitionFilter, PartitionRulePtr, PartitionedRows,
     },
     BuildPartitionRule, PartitionInfo, Result,
 };
 
 mod extractor;
 
+pub type PartitionedFilterKeyIndex = HashMap<usize, HashMap<usize, 
BTreeSet<usize>>>;

Review Comment:
   Add comments explaining the type meaning of those usize.



##########
src/table_engine/src/partition/rule/key.rs:
##########
@@ -139,15 +141,33 @@ impl KeyRule {
         &self,
         group: &[usize],
         filters: &[PartitionFilter],
-    ) -> Result<BTreeSet<usize>> {
+    ) -> Result<PartitionedFilterKeyIndex> {
         let mut partitions = BTreeSet::new();
+        // Retrieve all the key DatumView instances along with their 
corresponding
+        // indices related to their positions in the predicate inlist. Since 
DatumView

Review Comment:
   
https://github.com/apache/horaedb/blob/e065ba7246d808fc82a03abc45aba21b2b5eb936/src/common_types/src/datum.rs#L1313
   
   DatumView already impl Hash



-- 
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]

Reply via email to