-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-18632][SQL] AggregateFunction should not implement ImplicitCastInputTypes #16066
Conversation
cc @rxin |
defaultCheck | ||
} else if (!ignoreNullsExpr.foldable) { | ||
TypeCheckFailure( | ||
s"The second argument of Last must be a boolean literal, but got: $ignoreNullsExpr") |
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.
ignoreNullsExpr.toSQL?
LGTM other than that tiny comment. |
LGTM |
Test build #69349 has finished for PR 16066 at commit
|
Test build #69358 has finished for PR 16066 at commit
|
Test build #69356 has finished for PR 16066 at commit
|
Test build #69367 has finished for PR 16066 at commit
|
Merging in master. |
…tInputTypes ## What changes were proposed in this pull request? `AggregateFunction` currently implements `ImplicitCastInputTypes` (which enables implicit input type casting). There are actually quite a few situations in which we don't need this, or require more control over our input. A recent example is the aggregate for `CountMinSketch` which should only take string, binary or integral types inputs. This PR removes `ImplicitCastInputTypes` from the `AggregateFunction` and makes a case-by-case decision on what kind of input validation we should use. ## How was this patch tested? Refactoring only. Existing tests. Author: Herman van Hovell <[email protected]> Closes apache#16066 from hvanhovell/SPARK-18632.
…tInputTypes ## What changes were proposed in this pull request? `AggregateFunction` currently implements `ImplicitCastInputTypes` (which enables implicit input type casting). There are actually quite a few situations in which we don't need this, or require more control over our input. A recent example is the aggregate for `CountMinSketch` which should only take string, binary or integral types inputs. This PR removes `ImplicitCastInputTypes` from the `AggregateFunction` and makes a case-by-case decision on what kind of input validation we should use. ## How was this patch tested? Refactoring only. Existing tests. Author: Herman van Hovell <[email protected]> Closes apache#16066 from hvanhovell/SPARK-18632.
What changes were proposed in this pull request?
AggregateFunction
currently implementsImplicitCastInputTypes
(which enables implicit input type casting). There are actually quite a few situations in which we don't need this, or require more control over our input. A recent example is the aggregate forCountMinSketch
which should only take string, binary or integral types inputs.This PR removes
ImplicitCastInputTypes
from theAggregateFunction
and makes a case-by-case decision on what kind of input validation we should use.How was this patch tested?
Refactoring only. Existing tests.