Skip to content

fix(salesforce): support SQL IN and NOT IN predicates - #544

Merged
jbonofre merged 1 commit into
apache:mainfrom
saurabhdeshp:feature/mds-platforms/salesforce-in-predicates
Oct 9, 2026
Merged

jbonofre merged 1 commit into
apache:mainfrom
saurabhdeshp:feature/mds-platforms/salesforce-in-predicates

Conversation

@saurabhdeshp

Copy link
Copy Markdown
Contributor

Summary

Conditional metrics using IN or NOT IN currently fail Salesforce export. This adds direct-field membership against scalar literal lists through the existing typed expression pipeline, preserving SQL NULL behavior.

When combining membership with AND or OR, wrap each membership predicate in parentheses. This avoids a JSqlParser 5.3 precedence issue; ambiguous forms are rejected. Subqueries, tuples and computed operands remain unsupported.

Validation

  • JDK 21 mvn -DrequireSalesforceSchema=true clean verify: 329 tests passed, zero skipped; license check passed.
  • 864 SQLite-oracle/Tua-evaluator comparisons across all three SQL dialects.
  • Packaged-JAR exports across all three dialects; unsupported input fails without partial output.
  • Documented the supported subset and grouping requirement; no new dependencies.

Native Tableau execution was not run.

Related Issues

Follow-up to #404. Refs apache/ossie-converters#36.

@jbonofre jbonofre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks @saurabhdeshp.

The divide-and-conquer tree balancing avoids depth limits, SQL three-valued logic is preserved cleanly, and the handling/documentation around JSqlParser precedence edge cases is well thought out. Great test coverage as well!

@jbonofre
jbonofre merged commit 0f04d8c into apache:main Oct 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants