-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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-31735][SQL] Include date/timestamp in the summary report #28554
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,7 +264,10 @@ object StatFunctions extends Logging { | |
} | ||
|
||
val selectedCols = ds.logicalPlan.output | ||
.filter(a => a.dataType.isInstanceOf[NumericType] || a.dataType.isInstanceOf[StringType]) | ||
.filter(a => a.dataType.isInstanceOf[NumericType] | ||
|| a.dataType.isInstanceOf[StringType] | ||
|| a.dataType.isInstanceOf[DateType] | ||
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. Yes, let's write a UT. Does it work BTW? Looks at least 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. I'm working on getting the test suite running on my machine, so I need some time. I don't think that the |
||
|| a.dataType.isInstanceOf[TimestampType]) | ||
|
||
val aggExprs = statisticFns.flatMap { func => | ||
selectedCols.map(c => Column(Cast(func(c), StringType)).as(c.name)) | ||
|
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.
Can we keep this whitelist style instead of allowing all, @Fokko ? You can add the missing type here.
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.
Sure, I've just updated the list.
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.
Thank you, @Fokko . Could you update the PR title and description accordingly?
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.
I've updated both the PR and commit, please let me know if this works for you
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.
Shall we remove
Even something less common such as arrays are sortable:
and its example in the PR description?