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

Fix week and month Time grain in MySQL #297

Merged
merged 1 commit into from
Apr 9, 2016

Conversation

prihoda
Copy link
Contributor

@prihoda prihoda commented Apr 8, 2016

With mysql datetime and timestamp columns, currently the Time grain "week" and "month" options don't remove the time part. This results in groupings like this:

timestamp count
2015-04-05 07:00:00 1
2015-04-05 10:00:00 1
2015-04-05 11:00:00 2
2015-04-05 11:50:00 1
2015-04-05 12:00:00 5
2015-04-05 14:20:00 1
2015-04-05 14:30:00 1

and so on.

This is solved by wrapping the DATE_SUB with DATE().

With mysql datetime and timestamp columns, currently the Time grain "week" and "month" options don't remove the time part. This results in groupings like this:

timestamp count
2015-04-05 07:00:00 1
2015-04-05 10:00:00 1
2015-04-05 11:00:00 2
2015-04-05 11:50:00 1
2015-04-05 12:00:00 5
2015-04-05 14:20:00 1
2015-04-05 14:30:00 1

and so on.

This is solved by wrapping the DATE_SUB with DATE().
@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 145abee on prihoda:patch-1 into eff0beb on airbnb:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.041% when pulling 145abee on prihoda:patch-1 into eff0beb on airbnb:master.

@mistercrunch
Copy link
Member

Good catch
img

@mistercrunch mistercrunch merged commit ef992b6 into apache:master Apr 9, 2016
@prihoda prihoda deleted the patch-1 branch April 9, 2016 09:53
graceguo-supercat pushed a commit to graceguo-supercat/superset that referenced this pull request Oct 4, 2021
Bumps [@vx/responsive](https://github.com/hshoff/vx) from 0.0.194 to 0.0.195.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.194...v0.0.195)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 17, 2021
Bumps [@vx/responsive](https://github.com/hshoff/vx) from 0.0.194 to 0.0.195.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.194...v0.0.195)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 24, 2021
Bumps [@vx/responsive](https://github.com/hshoff/vx) from 0.0.194 to 0.0.195.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.194...v0.0.195)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 25, 2021
Bumps [@vx/responsive](https://github.com/hshoff/vx) from 0.0.194 to 0.0.195.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.194...v0.0.195)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 26, 2021
Bumps [@vx/responsive](https://github.com/hshoff/vx) from 0.0.194 to 0.0.195.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.194...v0.0.195)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.8.7 labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.8.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants