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

Filter Date order is important #120

Open
hypersurge opened this issue Sep 25, 2020 · 1 comment
Open

Filter Date order is important #120

hypersurge opened this issue Sep 25, 2020 · 1 comment

Comments

@hypersurge
Copy link

A Filter with Date > Field creates "Cannot compare Date and tink.sql.Field<Date,...>", whereas flipping the order to Field < Date completes as expected. Same with ==. The issue did not present on Int and VarChar fields.

The workaround is easy enough so this little note is probably enough to help others avoid the issue.

@kevinresol
Copy link
Member

I wonder why though. Because even for Float there are only Field <op> Float operator overloads but not Float <op> Field, so I expect this will work only one way but the other way round:

@:op(a <= b) static function lteConst<T:Float, S>(a:Field<T, S>, b:T):Condition

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

No branches or pull requests

2 participants