Original Message:
Sent: May 17, 2023 08:18 AM
From: Felipe V
Subject: Data partition generating a Cartesian product
You could rewrite the condition, following the KB logic:
(A AND B) OR (A AND NOT B) OR (NOT A AND B)
Sounds like:
((log_agent = @root.id) AND (customer.admin_org.name = 'PMBH.SMSA')) OR
((log_agent != @root.id) AND (customer.admin_org.name = 'PMBH.SMSA')) OR
((log_agent = @root.id) AND (customer.admin_org.name != 'PMBH.SMSA'))
Another way is reduce depth check, minus depth prevents cartesian product
((log_agent = @root.id) AND (customer.admin_org = <SREL_ATTRIBUTE>)) OR
((log_agent != @root.id) AND (customer.admin_org = <SREL_ATTRIBUTE>)) OR
((log_agent = @root.id) AND (customer.admin_org != <SREL_ATTRIBUTE>))
------------------------------
Regards,
Felipe Vandrilho
Linkedin: https://www.linkedin.com/in/vandrilho/
Original Message:
Sent: May 16, 2023 12:29 PM
From: Felipe Nunes
Subject: Data partition generating a Cartesian product
Hi Felipe,
Thanks for you replay.
But I did as you suggested and I've got the same error.
------------------------------
Regards,
Felipe Nunes
------------------
IT Analyst
Prodabel
Original Message:
Sent: May 16, 2023 09:04 AM
From: Felipe V
Subject: Data partition generating a Cartesian product
Hi,
You must re-defining a where clause.
You can try (I can't test):
(NOT(NOT ((customer.admin_org.name ='PMBH.SMSA') OR (log_agent = @root.id) )))
The idea is avoid error situation, the further information on:
How to avoid a cartesian product in a where clause
------------------------------
Regards,
Felipe Vandrilho
Linkedin: https://www.linkedin.com/in/vandrilho/
Original Message:
Sent: May 16, 2023 07:12 AM
From: Felipe Nunes
Subject: Data partition generating a Cartesian product
Hi everyone,
I have to create a data partition in call_req table where the user can see tickets that he opened by itself and tickets from a specific end users administrative organization.
So I created this condition below:
log_agent = @root.id OR customer.admin_org.name ='PMBH.SMSA'
But when I save it, an error message appears stating that it generated a Cartesian product.
Anyone know a alternative for this error?
------------------------------
Regards,
Felipe Nunes
------------------
IT Analyst
Prodabel
------------------------------