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

"is distinct from" filter option doesn't work for Redshift #446

Closed
troex opened this Issue Oct 24, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@troex

troex commented Oct 24, 2017

To be honest I liked the previous option more <> "is not exactly" (or how it was named), but the point that now it's impossible to build "not equal" statement with filters on Redshift without using "custom" statement.

Could not load table rows.
Query failed
PostgreSQL said: Not implemented
Detail: 
  -----------------------------------------------
  error:  Not implemented
  code:      1001
  context:   'false' - Unknown pg type - 312
  query:     9870156
  location:  cg_expr.cpp:4532
  process:   padbmaster [pid=29249]
  -----------------------------------------------
> SELECT VERSION();
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.1497
@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Oct 25, 2017

Owner

Thank you for posting this issue. It’s pretty embarassing that I haven’t discovered this issue since August.

I have switched from <> to is distinct from since it is more likely to be what users expect — even though I know how <> works, I was surprised by its behaviour on occasions.

I don’t want to offer both options, because that would be very confusing.

I will change the filter to use (x <> 'val' or x is null) on Redshift.

If you don’t want NULLs, you could explicitely exclude them with a second filter.

Would this work for you?

Owner

jakob commented Oct 25, 2017

Thank you for posting this issue. It’s pretty embarassing that I haven’t discovered this issue since August.

I have switched from <> to is distinct from since it is more likely to be what users expect — even though I know how <> works, I was surprised by its behaviour on occasions.

I don’t want to offer both options, because that would be very confusing.

I will change the filter to use (x <> 'val' or x is null) on Redshift.

If you don’t want NULLs, you could explicitely exclude them with a second filter.

Would this work for you?

@troex

This comment has been minimized.

Show comment
Hide comment
@troex

troex Oct 25, 2017

I usually use x <> 'val' when I mean "is exactly not", but it might be better to use "is equal" instead of "is exactly", then "is not equal" is more clearly just <>.

If you don't want to change exact/equal and logic behind them, then your solution is definitely better for Redshift.

PS. I'm not native English speaker but "is exactly" always sounded strange to me in terms of SQL or any programming in general.

troex commented Oct 25, 2017

I usually use x <> 'val' when I mean "is exactly not", but it might be better to use "is equal" instead of "is exactly", then "is not equal" is more clearly just <>.

If you don't want to change exact/equal and logic behind them, then your solution is definitely better for Redshift.

PS. I'm not native English speaker but "is exactly" always sounded strange to me in terms of SQL or any programming in general.

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Oct 25, 2017

Owner

Yes, that's a good point. "is exactly" sounds a bit odd (I am also not a native English speaker). Maybe I should just use an = sign, since that is what is going on...

Owner

jakob commented Oct 25, 2017

Yes, that's a good point. "is exactly" sounds a bit odd (I am also not a native English speaker). Maybe I should just use an = sign, since that is what is going on...

@postico-bot

This comment has been minimized.

Show comment
Hide comment
@postico-bot

postico-bot Nov 23, 2017

We have been working on this issue!

  • fixed IS DISTINCT FROM on Amazon Redshift #446
  • changed DOES NOT CONTAIN to also show NULL values
  • changed error handling in filters (show errors instead of raising exceptions)
  • added nullability annotations to a number of classes (jakob)

Please download Build 2037, or check out the list of recent builds.

We would love to hear your thoughts!

postico-bot commented Nov 23, 2017

We have been working on this issue!

  • fixed IS DISTINCT FROM on Amazon Redshift #446
  • changed DOES NOT CONTAIN to also show NULL values
  • changed error handling in filters (show errors instead of raising exceptions)
  • added nullability annotations to a number of classes (jakob)

Please download Build 2037, or check out the list of recent builds.

We would love to hear your thoughts!

@jakob jakob closed this Dec 20, 2017

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