2025-04-17 - ProcessLogical handle comparisons
Overview
Unable to perform comparisons in ProcessLogical due to data being in databases that are inefficient for querying (Graph or non-sort key DynamoDB fields).
Solution
When generated ProcessLogical code receives request select the most efficient method to perform comparison. If is a comparison of a field that is stored in DynamoDB as a sortKey (and partition key in logicalElement) we can perform the comparison directly on that table.
If the comparison is on other field, we need to create a SortResult request on all data, requiredData and sortFields is the comparison field, once the sortResult is complete we prepare comparisonData, then perform the comparison.
Using this flow we can also work in high/low/highLow comparisons.
When performing the comparison we copy the resulting identifiers to calling service's LogicalResults table, then completeProcessLogical.