Skip to content

Fix #369 - Add Support in Date/Time keywords #383

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

Closed
wants to merge 6 commits into from

Conversation

yuval-illumex
Copy link
Contributor

@yuval-illumex yuval-illumex commented Dec 15, 2021

Fix #369

Add Support for:
CURRENT_TIMESTAMP
CURRENT_DATE
CURRENT_TIME

Which are function without args.

@yuval-illumex yuval-illumex changed the title Trino - Add Support in Date/Time keywords #369 Fix #369 - Add Support in Date/Time keywords Dec 16, 2021
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

I double checked that both mysql and postgres indeed do treat these specially:
👍
Thanks @yuval-illumex

mysql> select current_timestamp;
+---------------------+
| current_timestamp   |
+---------------------+
| 2021-12-17 12:30:40 |
+---------------------+
1 row in set (0.00 sec)

mysql> select current_time;
+--------------+
| current_time |
+--------------+
| 12:30:45     |
+--------------+
1 row in set (0.00 sec)

mysql> select current_date;
+--------------+
| current_date |
+--------------+
| 2021-12-17   |
+--------------+
1 row in set (0.00 sec)

mysql> ^DBye
(arrow_dev) alamb@MacBook-Pro-2:~/Software/arrow-datafusion$ psql
psql (14.1)
Type "help" for help.

alamb=# select current_timestamp;
       current_timestamp       
-------------------------------
 2021-12-17 12:30:59.547784-05
(1 row)

alamb=# select current_time;
    current_time    
--------------------
 12:31:02.464701-05
(1 row)

alamb=# select current_date;
 current_date 
--------------
 2021-12-17
(1 row)

@coveralls
Copy link

coveralls commented Dec 17, 2021

Pull Request Test Coverage Report for Build 1616040264

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 37 of 39 (94.87%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 90.252%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser.rs 9 11 81.82%
Totals Coverage Status
Change from base Build 1615803810: 0.03%
Covered Lines: 6703
Relevant Lines: 7427

💛 - Coveralls

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks good -- thanks @yuval-illumex

@alamb
Copy link
Contributor

alamb commented Feb 5, 2022

These appear to have been included in #391 so closing this one down

@alamb alamb closed this Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trino - Add Support in Date/Time keywords
4 participants