Skip to content

Fix exists operator to return true for empty strings and zero times#53

Merged
junichif merged 2 commits intomasterfrom
fix/exists-empty-string
Mar 20, 2026
Merged

Fix exists operator to return true for empty strings and zero times#53
junichif merged 2 commits intomasterfrom
fix/exists-empty-string

Conversation

@junichif
Copy link
Copy Markdown
Contributor

The exists operator and function incorrectly returned false for empty strings and zero-valued times because they called Nil() which treats these as nil. exists should only return false for actual nil/NilValue, not for valid values like "" or time.Time{}.

Fixes lytics/lio#38265

junichif and others added 2 commits March 19, 2026 11:22
The exists operator and function incorrectly returned false for empty
strings and zero-valued times because they called Nil() which treats
these as nil. exists should only return false for actual nil/NilValue,
not for valid values like "" or time.Time{}.

Fixes lytics/lio#38265

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@junichif junichif force-pushed the fix/exists-empty-string branch from abea4ed to 1bc01bc Compare March 19, 2026 18:55
@junichif junichif merged commit 2a6ed59 into master Mar 20, 2026
1 check passed
@junichif junichif deleted the fix/exists-empty-string branch March 20, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants