-
Notifications
You must be signed in to change notification settings - Fork 694
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
feat!: EXPOSED-577 Allow Entity and EntityID parameters to not be Comparable #2277
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,7 +167,7 @@ class Locate<T : String?>(val expr: Expression<T>, val substring: String) : Func | |
/** | ||
* Represents an SQL function that returns the minimum value of [expr] across all non-null input values, or `null` if there are no non-null values. | ||
*/ | ||
class Min<T : Comparable<T>, in S : T?>( | ||
class Min<T : Any, in S : T?>( | ||
/** Returns the expression from which the minimum value is obtained. */ | ||
val expr: Expression<in S>, | ||
columnType: IColumnType<T> | ||
|
@@ -182,7 +182,7 @@ class Min<T : Comparable<T>, in S : T?>( | |
/** | ||
* Represents an SQL function that returns the maximum value of [expr] across all non-null input values, or `null` if there are no non-null values. | ||
*/ | ||
class Max<T : Comparable<T>, in S : T?>( | ||
class Max<T : Any, in S : T?>( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes were only made because our tests had use cases like @e5l @obabichevjb This now leads to the question, what about other restricted functions, like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That’s a good question. At first glance, it seems like it shouldn't be Since we get from SQL just single value and don't compare it on client side, it could be non-comparable. |
||
/** Returns the expression from which the maximum value is obtained. */ | ||
val expr: Expression<in S>, | ||
columnType: IColumnType<T> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm, is
Any
here to indicate thatS
not nullable?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was the assumption I made about most cases. Do you think it's not an ok assumption that may lead to breaking changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was non-nullable
Comparable
, so I expect that it should be fine to replace it with non-nullableAny
. To make it weaker in the future should be easier then vice versa anyway.