Re: [DISCUSS] Fine grained max size guardails

2025-02-08 Thread Bernardo Botella
Noted for when we get to implement the SERIALIZED_SIZE constraint :-) > El feb 8, 2025, a las 8:55 p. m., Yifan Cai escribió: > > Thanks for the example. > > "SIZE" is in fact "SERIALIZED_SIZE". > > The term size and length are mostly interchangeable. Some modifiers on size > will be requir

Re: [DISCUSS] Fine grained max size guardails

2025-02-08 Thread Yifan Cai
Thanks for the example. "SIZE" is in fact "SERIALIZED_SIZE". The term size and length are mostly interchangeable. Some modifiers on size will be required in order to distinguish. - Yifan On Sat, Feb 8, 2025 at 8:50 PM Bernardo Botella < conta...@bernardobotella.com> wrote: > Yifan: how is the

Re: [DISCUSS] Fine grained max size guardails

2025-02-08 Thread Bernardo Botella
Yifan: how is the SIZE constraint from the LENGTH constraint? -> I think you are asking how are they different? They are similar, but not exactly the same. And it will depend on the actual type of the column they are added. For example, for a blob, both SIZE and LENGTH would be equivalent. But,

Re: [DISCUSS] Fine grained max size guardails

2025-02-08 Thread Yifan Cai
It makes sense to me to have both guardrails (which is for operators) and constraints (which is for app owners) to define size limits. Besides the difference in the target audience groups, the scope where guardrail and constraints are applicable also differs. However, it is unnecessary to reject c

Re: [DISCUSS] Fine grained max size guardails

2025-02-08 Thread Bernardo Botella
Thanks everyone for the inputs. Dinesh: "constraint should not violate the max bound of the guardrail” -> Yes, that statement is true with the proposed patch. With code as is, the write will fail if it either does not comply with the guardrail OR does not comply with the constraint. The CEP tou

Re: [DISCUSS] Fine grained max size guardails

2025-02-08 Thread Dinesh Joshi
Guardrails and constraints serve distinct purposes. Guardrails allow the operator to define reasonable bounds while constraints allow the developer to do the same in the schema. However the constraint should not violate the max bound of the guardrail. For example, if an operator defines the max siz

Re: [DISCUSS] Fine grained max size guardails

2025-02-08 Thread guo Maxwell
Agree with you. Both Constraints and Guardails are valuable. Users can have their own choices, and what we need is to provide valuable choices for them. Brandon Williams 于2025年2月9日 周日上午4:07写道: > On Sat, Feb 8, 2025 at 2:04 PM Bernardo Botella > wrote: > > My two cents: My opinion is that these

Re: [DISCUSS] Fine grained max size guardails

2025-02-08 Thread Brandon Williams
On Sat, Feb 8, 2025 at 2:04 PM Bernardo Botella wrote: > My two cents: My opinion is that these guardails still add value and help > operators a more fine grained control to "protect" the database. This is where I land too. Operators should be able to control this while still giving users the a

[DISCUSS] Fine grained max size guardails

2025-02-08 Thread Bernardo Botella
Hi everyone, After Constraints framework was merged in, I would like to come back to the discussion Jordan brought up in this Jira: https://issues.apache.org/jira/browse/CASSANDRA-19677 For context, that Jira ticket (and PR) is adding a bunch of more fine grained size thresholds for column type