Conversation
|
|
||
| message PredicatesGroup { | ||
| enum GroupingType { | ||
| AND = 0; |
There was a problem hiding this comment.
we can start with only AND as we're treating this as remove row by PK/full row contents
There was a problem hiding this comment.
So what is the path forward to support OR grouping?
| OR = 1; | ||
| } | ||
| GroupingType grouping_type = 1; | ||
| repeated Predicate predicates = 2; |
There was a problem hiding this comment.
I feel like this is an overkill.
Instead, we need to supply column list + record to compare against.
This way, if the column list is empty, we just need to compare whole record, but if it isn'n then we just compare the values to the ones from the supplied single record.
(now you supply record per column, I suggest supplying single record (=row) & just indicate what columns are required for comparison)
There was a problem hiding this comment.
This structure allows for AND and OR grouping of predicates.
There was a problem hiding this comment.
IMO we should just use expression syntax, like:
Expression : UnaryExpression | BinaryExpression
UnaryExpression: Not Expression | Value | ColumnName
BinaryExpression: UnaryExpression BinaryOp UnaryExpression
BinaryOp: Comparison | AND | OR
Comparison: > | >= | < | <= | ==
There was a problem hiding this comment.
Looks good to me. linking the RFC here - https://www.notion.so/cloudquery/DRAFT-Support-Delete-Records-In-Destinations-57ecf0b0399d4222967ab22907cab33f
More context regarding @candiduslynx option - https://cloudqueryio.slack.com/archives/C021N25N0TC/p1697121166712099
#### Summary Blocked by cloudquery/plugin-pb#18 (linting and tests fail because of protobuf isn't updated)
Implements structure laid out in RFC