Skip to content

Simplify Between expression to Eq - #14994

Merged
jayzhan211 merged 2 commits into
apache:mainfrom
jayzhan211:simplify-expr
Mar 5, 2025
Merged

jayzhan211 merged 2 commits into
apache:mainfrom
jayzhan211:simplify-expr

Conversation

@jayzhan211

@jayzhan211 jayzhan211 commented Mar 4, 2025 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@alamb alamb left a comment

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.

Thanks @jayzhan211

#14943 seems to be about predicates such as s.foo = 'a' and 'a' = s.foo, so While PR seems like a reasonable improvement, I don't think it closes #14943

There might also be a more general way to implement this related to constraint propagation 🤔

# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

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.

I like the idea of using slt for simplification testing

@jayzhan211

Copy link
Copy Markdown
Contributor Author

I don't think it closes #14943

I agree it.

@jayzhan211
jayzhan211 merged commit c61e7e5 into apache:main Mar 5, 2025
@jayzhan211
jayzhan211 deleted the simplify-expr branch March 5, 2025 00:17
danila-b pushed a commit to danila-b/datafusion that referenced this pull request Mar 8, 2025
* simplify between equal case

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

Labels

optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants