question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query: null semantics should apply to GreaterThanOrEqual, LessThanOrEqual, not only strict equality

See original GitHub issue

This currently manifests in our translation of string.Contains:

SELECT [c].[FirstName]
FROM [FunkyCustomers] AS [c]
WHERE CHARINDEX(NULL, [c].[FirstName]) <= 0

we should be applying null semantics here instead:

SELECT [c].[FirstName]
FROM [FunkyCustomers] AS [c]
WHERE CHARINDEX(NULL, [c].[FirstName]) <= 0 OR CHARINDEX(NULL, [c].[FirstName]) IS NULL

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
smitpatelcommented, Nov 20, 2019

If it is complicated then we can defer. Just wanted to bring this up if we are already fixing this.

0reactions
maumarcommented, Nov 20, 2019

Maybe we can look at it as a strech/investigation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strict equality (===) - JavaScript - MDN Web Docs
The strict equality (===) operator checks whether its two operands are equal, returning a Boolean result. Unlike the equality operator, the strict equality...
Read more >
Equality comparisons and sameness - JavaScript | MDN
Strict equality compares two values for equality. ... values except numbers, it uses the obvious semantics: a value is only equal to itself....
Read more >
Comparisons with null values in queries
The first two queries produce simple comparisons. In the first query, both columns are non-nullable so null checks are not needed. In the...
Read more >
Why doesn't JavaScript have strict greater/less than ...
My guess is, the intended use is for comparing numbers to strings (and maybe booleans). It actually works for those cases, as the...
Read more >
How to Use Comparison Operators with NULLs in SQL
To handle NULLs correctly, SQL provides two special comparison operators: IS NULL and IS NOT NULL. They return only true or false and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found