发布

  • [OPIK-5154] [BE] Add STRING_EXACT field type for case-sensitive ID filtering (#5761)

    frostbyte_neo 发布于 2026-03-20 15:37:14 +00:00

    • [OPIK-5154] [BE] Remove lower() from string equality/inequality filters

    Remove case-insensitive lower() wrapping on STRING and STRING_STATE_DB
    field types for EQUAL and NOT_EQUAL operators in FilterQueryBuilder.
    This fixes incorrect behavior when filtering on ID fields where
    case-sensitive matching is required.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • [OPIK-5154] [BE] Add STRING_EXACT field type for case-sensitive ID filtering

    Introduce a new STRING_EXACT FieldType that performs case-sensitive
    equality/inequality matching, and apply it to SpanField.TRACE_ID.
    This preserves case-insensitive behavior for general string filters
    while fixing ID fields that require exact matching.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • [OPIK-5154] [BE] Add STRING_EXACT support to all filter operators and validation

    Add STRING_EXACT entries to FIELD_TYPE_VALIDATION_MAP in FiltersFactory
    and to all operator maps (CONTAINS, NOT_CONTAINS, STARTS_WITH, ENDS_WITH,
    GREATER_THAN, LESS_THAN) in FilterQueryBuilder. Without these entries,
    filtering on TRACE_ID caused a NullPointerException.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • [OPIK-5154] [BE] Apply STRING_EXACT to all ID fields across filter types

    Change all ID-like fields (ID, TRACE_ID, SPAN_ID, THREAD_ID,
    EXPERIMENT_ID, PROJECT_ID, DATASET_ID) to use STRING_EXACT for
    case-sensitive matching across SpanField, TraceField, TraceThreadField,
    DatasetItemField, ExperimentsComparisonValidKnownField,
    AnnotationQueueField, ExperimentField, and OptimizationField.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • [OPIK-5154] [BE] Skip URL-decoding for STRING_EXACT fields in FiltersFactory

    Add STRING_EXACT to the condition that skips URLDecoder.decode in
    toValidAndDecoded, matching the existing STRING behavior. ID values
    are already decoded during JSON deserialization, so double-decoding
    could corrupt values containing + or % characters.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • [OPIK-5154] [DOCS] Add skill for adding new filter field types

    Document the checklist for adding new FieldTypes to the filter system,
    including when to use STRING_EXACT vs STRING for performance and
    correctness on ID fields.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • [OPIK-5154] [BE] Add STRING_EXACT to exhaustive switch expressions in tests

    Add STRING_EXACT case to getValidValue, getKey, and getInvalidValue
    switch expressions in FindSpansResourceTest, FindTraceThreadsResourceTest,
    and GetTracesByProjectResourceTest to fix compilation errors.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com


    Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com

    下载附件