my-ship-it commented on code in PR #1333:
URL: https://github.com/apache/cloudberry/pull/1333#discussion_r2306276322


##########
contrib/pax_storage/src/cpp/storage/filter/pax_row_filter.cc:
##########
@@ -45,19 +46,54 @@ static inline void FindAttrsInQual(Node *qual, bool *proj, 
int ncol,
 }
 
 static bool BuildExecutionFilterForColumns(Relation rel, PlanState *ps,
-                                    pax::ExecutionFilterContext *ctx) {
+                                           pax::ExecutionFilterContext *ctx,
+                                           ScanKey key, int nkeys) {
   List *qual = ps->plan->qual;
   List **qual_list;
   ListCell *lc;
   bool *proj;
   int *qual_atts;
   int natts = RelationGetNumberOfAttributes(rel);
 
-  if (!qual || !IsA(qual, List)) return false;
+  int ret = false;
+
+  if (key && nkeys > 0) {
+    if (nodeTag(ps) != T_SeqScanState) {

Review Comment:
   Should we support DynamicSeqScanState?



##########
contrib/pax_storage/src/cpp/storage/filter/pax_sparse_pg_path.cc:
##########
@@ -57,6 +57,23 @@ void PaxSparseFilter::Initialize(List *quals) {
     fl_nodes.emplace_back(std::move(fl_node));
   }
 
+  // walk scan key and only support min/max filter now
+  for (int i = 0; i < nkeys; i++) {
+    // TODO: support bloom filter in PaxFilter
+    // but now just skip it, SeqNext() will check bloom filter in 
PassByBloomFilter()
+    if (key[i].sk_flags & SK_BLOOM_FILTER) {
+      continue;
+    }
+
+    if (key[i].sk_strategy != BTGreaterEqualStrategyNumber &&
+        key[i].sk_strategy != BTLessEqualStrategyNumber) {

Review Comment:
   Should we handle BTLessStrategyNumber | BTGreaterStrategyNumber | 
BTLessEqualStrategyNumber here?



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