Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: normalization should convert mistyped constants in comparisons #21143

Open
RaduBerinde opened this issue Jan 1, 2018 · 3 comments

Comments

@RaduBerinde
Copy link
Member

@RaduBerinde RaduBerinde commented Jan 1, 2018

For example, say a is an integer column and we have the filter a > 1.5. Currently, such a filter cannot generate index constraints (we can't encode 1.5 as an integer). Ideally, expression normalization should convert this condition to a >= 2:::int.

@knz

This comment has been minimized.

Copy link
Member

@knz knz commented Jan 2, 2018

I'm a bit confused about the issue though, isn't a > 1.5 going to plain out fail type checking if a has type int?

@petermattis

This comment has been minimized.

Copy link
Contributor

@petermattis petermattis commented Jan 2, 2018

We allow int > float comparisons.

@knz

This comment has been minimized.

Copy link
Member

@knz knz commented Jan 2, 2018

all right, thanks

@andy-kimball andy-kimball added this to Lower Priority Backlog in SQL Planning Aug 25, 2018
@RaduBerinde RaduBerinde moved this from Lower Priority Backlog to Potential starter projects in SQL Planning Apr 29, 2019
@RaduBerinde RaduBerinde moved this from Potential starter projects to Lower Priority Backlog in SQL Planning Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
SQL Planning
  
Lower Priority Backlog
3 participants
You can’t perform that action at this time.