Skip to content

LabKey SQL hints and nits#7835

Open
labkey-matthewb wants to merge 5 commits into
release26.7-SNAPSHOTfrom
26.7_fb_sql_hints
Open

LabKey SQL hints and nits#7835
labkey-matthewb wants to merge 5 commits into
release26.7-SNAPSHOTfrom
26.7_fb_sql_hints

Conversation

@labkey-matthewb

@labkey-matthewb labkey-matthewb commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Rationale

Targeted changes to help AI Assistant avoid and self-correct SQL generation mistakes.
Added support for CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP

Related Pull Requests

Changes

@labkey-matthewb
labkey-matthewb requested a review from XingY July 15, 2026 19:06
@labkey-matthewb labkey-matthewb changed the title Add hints to many parse error messages. LabKey SQL hints and nits Jul 24, 2026
@labkey-matthewb
labkey-matthewb marked this pull request as ready for review July 24, 2026 17:46
}

// "is distinct from" and "is not distinct from" operators in method form
labkeyMethod.put("is_distinct_from", new Method(JdbcType.BOOLEAN, 2, 2)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this applied from a patch? They should be added around line 546 instead.

String notDistinctValue = token == IS ? dialect.getBooleanFALSE() : dialect.getBooleanTRUE();
String distinctValue = token == IS ? dialect.getBooleanTRUE() : dialect.getBooleanFALSE();

ret.append("(CASE WHEN (").append(a).append(") = (").append(b).append(")");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This (CASE WHEN) expression works as SELECT, but would it work in WHERE?

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.

2 participants