Skip to content

Enhance numeric IN operator to support proper numeric comparison #187

@kamiazya

Description

@kamiazya

Problem

The current IN operator implementation for numeric values performs string-based comparison, which may lead to inconsistencies. For example, comparing "1" vs "1.0" would fail to match even though they represent the same numeric value.

Suggested Solution

For numeric IN operations, consider parsing each comma-separated candidate value to Double to ensure proper numeric equality comparison rather than string equality.

Example

// Current behavior (string-based)
value IN "1,2,3" // "1.0" would not match "1"

// Desired behavior (numeric-based) 
value IN "1,2,3" // "1.0" should match "1"

Related Code

  • evaluateNumericComparison method in AspectQueryEvaluator
  • evaluateInComparison helper function

Priority

Low - This is an enhancement for better user experience, not a functional bug.

Source: AI Code Review feedback on PR #185

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions