MDEV-28992 Spider: Push down TIMESTAMPDIFF function
- [x] *The Jira issue number for this PR is: MDEV-28992
Description
This changes so that TIMESTAMP_DIFF function in a query is pushed down and works natively in Spider.
Instead of directly accessing item's member, now we can rely on a public accessor method to make it work.
How can this PR be tested?
Unit tests are added under spider.pushdown_timestamp_diff.
Basing the PR against the correct MariaDB version
- [x] This is a new feature and the PR is based against the latest MariaDB development branch
Copyright
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
@rdtr Could you modify the first line of the commit message to be the same as the title of the JIRA issue? Also, can you break the body of the commit message every 70 characters?
MDEV-28992 Spider: Push down TIMESTAMPDIFF function
This changes so that TIMESTAMP_DIFF function in a query is pushed down
and works natively in Spider. Instead of directly accessing item's
member, now we can rely on a public accessor method to make it work.
Unit tests are added under spider.pushdown_timestamp_diff.
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.
@rdtr I forgot one thing. Could you rebase the pull request to 10.11 because this should be a 10.11 feature?
@rdtr Are you still interested in wrapping this up?
Latest patch at https://jira.mariadb.org/browse/MDEV-28992?focusedCommentId=282010&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-282010