Skip to content

Conversation

@arnaud-lacurie
Copy link
Collaborator

Summary

Adds complete documentation for SQL operators: BETWEEN, LIKE, IN, and IS DISTINCT FROM.

Operators documented

  • BETWEEN - Range testing with inclusive bounds
  • LIKE - Pattern matching with wildcards (%, _) and ESCAPE clause
  • IN - Value list membership testing
  • IS DISTINCT FROM - NULL-safe equality comparison

Files

  • BETWEEN.rst/diagram with comprehensive examples
  • LIKE.rst/diagram with wildcard patterns and ESCAPE
  • IN.rst/diagram with NULL handling details
  • Updated Comparison.rst with IS DISTINCT FROM
  • Updated Operators.rst index
  • operators-documentation-queries.yamsql test file
  • Updated DocumentationQueriesTests.java

@arnaud-lacurie arnaud-lacurie added the documentation Documentation change label Nov 17, 2025
@arnaud-lacurie arnaud-lacurie marked this pull request as ready for review November 24, 2025 16:55
FROM products
WHERE price BETWEEN 100 AND 150
ORDER BY price
- supported_version: 4.3.5.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably redundant in light of having a file-level supported_version option

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems all the yamsql files here have that. IIRC, few or all of these operators were there from before 4.3.5.0; in that case, we could remove the clause altogether just to not confuse it for the version the feature became available

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, let me address that.

SELECT * FROM products WHERE name = 'Widget'
SELECT * FROM products WHERE stock != 0
IS DISTINCT FROM
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the IS DISTINCT FROM operator is currently placed under Comparison Operators as well as described in its own page. However, the latter is more elaborate. Is this intentional in the sense that there should be a small summary of the operator in the Comparison Operators page?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an earlier attempt at documenting IS DISTINCT FROM that I forgot about when writing a proper page. I think this can go away, or link to the page.
Thanks for catching that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants