Skip to content

Commit e5011a3

Browse files
authored
deslop identity key comment
1 parent 6de406d commit e5011a3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/flagsmith_sql_flag_engine/translator.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,9 @@ def translate_condition(cond: SegmentCondition, ctx: TranslateContext) -> str |
435435
identity: dict[str, object] = ctx.evaluation_context.get("identity") or {} # type: ignore[assignment]
436436
kind = classification.kind
437437
if not prop:
438-
# Implicit `$.identity.key`. The key is always present in the store,
439-
# so the split is translatable whether or not the evaluation context
440-
# carries an identity. This intentionally diverges from the engine's
441-
# "no identity → False" verdict.
438+
# In tranditional engine implementations, this branch implies
439+
# an identity-less context, which makes no sense for the SQL engine.
440+
# Assume identity key.
442441
value_expr = ctx.dialect.cast_string(ctx.identity_key_expr)
443442
elif kind == "key":
444443
value_expr = ctx.dialect.cast_string(ctx.jsonpath_expr("$.identity.key"))

0 commit comments

Comments
 (0)