Skip to content

GSOC'25 - MDEV-12513 Implementation of Native INTERVAL Data Type #4108

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HazemRawi
Copy link

  • The Jira issue number for this PR is: MDEV-______

Description

TODO: fill description here

Release Notes

TODO: What should the release notes say about this change?
Include any changed system variables, status variables or behaviour. Optionally list any https://mariadb.com/kb/ pages that need changing.

How can this PR be tested?

TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended.
Consult the documentation on "Writing good test cases".

If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

Copy link
Member

@DaveGosselin-MariaDB DaveGosselin-MariaDB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @HazemRawi , thanks for the PR. Here are my first impressions, please update the PR with changes. Thanks!

CREATE TABLE t13 (a INTERVAL HOUR(3) TO SECOND(2) );
CREATE TABLE t14 (a INTERVAL MINUTE TO SECOND(4) );

DROP TABLE t2;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidate these to one statement, like this (but with all your new tables):

DROP TABLE t2, t3, t4;

sql/sql_yacc.yy Outdated
| INTERVAL_SYM interval_qualifier
{
$$.set(&type_handler_interval_DDhhmmssff);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unneeded blank line.

@HazemRawi HazemRawi force-pushed the MDEV-12513 branch 2 times, most recently from 3d32563 to ef533ea Compare June 12, 2025 14:31
@HazemRawi
Copy link
Author

Thanks you! updated with the requested changes ;

@@ -15708,6 +15747,13 @@ temporal_literal:
YYCSCL, true))))
MYSQL_YYABORT;
}
| INTERVAL_SYM %prec EMPTY_FROM_CLAUSE TEXT_STRING interval_qualifier
{
if (unlikely(!($$= type_handler_datetime.create_literal_item(thd,
Copy link
Author

@HazemRawi HazemRawi Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delegating interval handling to the type_handler_datetime.create_literal_item is the reason why some some tests fail -- This will be resolved in the next commit by implementing type_handler_interval.create_literal_item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants