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

Added support of timestamp/date/time using curly brackets #1894

Merged

Conversation

matthewryanwells
Copy link
Contributor

Description

Added support for using timestamp/date/time using curly brackets in the following ways to fix failing date filters in PowerBI:

Definition Type
{ts 'YYYY-MM-DD hh:mm:ss[.SSS]'} Timestamp
{timestamp 'YYYY-MM-DD hh:mm:ss[.SSS]'} Timestamp
{d 'YYYY-MM-DD'} Date
{date 'YYYY-MM-DD'} Date
{t 'hh:mm:ss[.SSS]'} Time
{time 'hh:mm:ss[.SSS]'} Time

Issues Resolved

#364

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #1894 (25a8c01) into main (c8d42a7) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #1894   +/-   ##
=========================================
  Coverage     97.39%   97.39%           
  Complexity     4603     4603           
=========================================
  Files           401      401           
  Lines         11397    11397           
  Branches        835      835           
=========================================
  Hits          11100    11100           
  Misses          290      290           
  Partials          7        7           
Flag Coverage Δ
sql-engine 97.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Yury-Fridlyand
Yury-Fridlyand previously approved these changes Jul 21, 2023
GumpacG
GumpacG previously approved these changes Jul 24, 2023
Copy link
Collaborator

@GumpacG GumpacG left a comment

Choose a reason for hiding this comment

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

Please fix jacoco failures

* added bracketed time/date/timestamp input, tests, and documentation

Signed-off-by: Matthew Wells <[email protected]>
Signed-off-by: Matthew Wells <[email protected]>
@matthewryanwells
Copy link
Contributor Author

Please fix jacoco failures

I have rebased my PR so now everything (Except for BWC) works now

@acarbonetto acarbonetto merged commit 1a7134b into opensearch-project:main Jul 26, 2023
21 of 25 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1894-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1a7134b79044de655445f2c1e24ec56467544f50
# Push it to GitHub
git push --set-upstream origin backport/backport-1894-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1894-to-2.x.

@Yury-Fridlyand Yury-Fridlyand deleted the integ-bracketed-timestamp branch July 26, 2023 16:40
matthewryanwells added a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 27, 2023
…-project#1894)

* Added support of timestamp/date/time using curly brackets (#297)

* added bracketed time/date/timestamp input, tests, and documentation

Signed-off-by: Matthew Wells <[email protected]>

* improved failing tests

Signed-off-by: Matthew Wells <[email protected]>

* simplified tests for checking for failure

Signed-off-by: Matthew Wells <[email protected]>

* fixed redundant tests and improved tests that should fail

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
(cherry picked from commit 1a7134b)
MitchellGale added a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 27, 2023
MitchellGale pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 27, 2023
… (opensearch-project#1897)

Signed-off-by: Yury-Fridlyand <[email protected]>

Added support of timestamp/date/time using curly brackets (opensearch-project#1894)

* Added support of timestamp/date/time using curly brackets (#297)

* added bracketed time/date/timestamp input, tests, and documentation

Signed-off-by: Matthew Wells <[email protected]>

* improved failing tests

Signed-off-by: Matthew Wells <[email protected]>

* simplified tests for checking for failure

Signed-off-by: Matthew Wells <[email protected]>

* fixed redundant tests and improved tests that should fail

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>

Bump bwc version (opensearch-project#1876)

Signed-off-by: Vamsi Manohar <[email protected]>

Prometheus Query Exemplars (opensearch-project#1782)

Signed-off-by: Vamsi Manohar <[email protected]>

Adding google code changes for core/src/main/java/org/opensearch/sql/analysis  core/src/main/java/org/opensearch/sql/ast  core/src/main/java/org/opensearch/sql/data
 core/src/main/java/org/opensearch/sql/datasource

Signed-off-by: Mitchell Gale <[email protected]>

Disable checkstyle fore core module and enable spotless check for the files being checked.

Signed-off-by: Mitchell Gale <[email protected]>

Added back core checkstyle test in sql-test-workflow.yml

Signed-off-by: Mitchell Gale <[email protected]>

Revert "Prometheus Query Exemplars (opensearch-project#1782)"

This reverts commit 430d7a9.

Revert "Bump bwc version (opensearch-project#1876)"

This reverts commit 501392e.

Revert "Added support of timestamp/date/time using curly brackets (opensearch-project#1894)"

This reverts commit 1a7134b.

Revert "Statically init `typeActionMap` in `OpenSearchExprValueFactory`. (#310) (opensearch-project#1897)"

This reverts commit c8d42a7.

Revert "Fix create_index/create_index_with_IOException issue caused by OpenSearch PR change (opensearch-project#1899)"

This reverts commit 7b932a7.
matthewryanwells added a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 27, 2023
…-project#1894)

* Added support of timestamp/date/time using curly brackets (#297)

* added bracketed time/date/timestamp input, tests, and documentation

Signed-off-by: Matthew Wells <[email protected]>

* improved failing tests

Signed-off-by: Matthew Wells <[email protected]>

* simplified tests for checking for failure

Signed-off-by: Matthew Wells <[email protected]>

* fixed redundant tests and improved tests that should fail

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
(cherry picked from commit 1a7134b)
MitchellGale pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 28, 2023
… (opensearch-project#1897)

Signed-off-by: Yury-Fridlyand <[email protected]>

Added support of timestamp/date/time using curly brackets (opensearch-project#1894)

* Added support of timestamp/date/time using curly brackets (#297)

* added bracketed time/date/timestamp input, tests, and documentation

Signed-off-by: Matthew Wells <[email protected]>

* improved failing tests

Signed-off-by: Matthew Wells <[email protected]>

* simplified tests for checking for failure

Signed-off-by: Matthew Wells <[email protected]>

* fixed redundant tests and improved tests that should fail

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>

Bump bwc version (opensearch-project#1876)

Signed-off-by: Vamsi Manohar <[email protected]>

Prometheus Query Exemplars (opensearch-project#1782)

Signed-off-by: Vamsi Manohar <[email protected]>

Adding google code changes for core/src/main/java/org/opensearch/sql/analysis  core/src/main/java/org/opensearch/sql/ast  core/src/main/java/org/opensearch/sql/data
 core/src/main/java/org/opensearch/sql/datasource

Signed-off-by: Mitchell Gale <[email protected]>

Disable checkstyle fore core module and enable spotless check for the files being checked.

Signed-off-by: Mitchell Gale <[email protected]>

Added back core checkstyle test in sql-test-workflow.yml

Signed-off-by: Mitchell Gale <[email protected]>

Revert "Prometheus Query Exemplars (opensearch-project#1782)"

This reverts commit 430d7a9.

Revert "Bump bwc version (opensearch-project#1876)"

This reverts commit 501392e.

Revert "Added support of timestamp/date/time using curly brackets (opensearch-project#1894)"

This reverts commit 1a7134b.

Revert "Statically init `typeActionMap` in `OpenSearchExprValueFactory`. (#310) (opensearch-project#1897)"

This reverts commit c8d42a7.

Revert "Fix create_index/create_index_with_IOException issue caused by OpenSearch PR change (opensearch-project#1899)"

This reverts commit 7b932a7.

Signed-off-by: Mitchell Gale <[email protected]>
Yury-Fridlyand pushed a commit that referenced this pull request Jul 28, 2023
…ets (#1908)

* Added support of timestamp/date/time using curly brackets (#1894)

* Added support of timestamp/date/time using curly brackets (#297)

* added bracketed time/date/timestamp input, tests, and documentation

Signed-off-by: Matthew Wells <[email protected]>

* improved failing tests

Signed-off-by: Matthew Wells <[email protected]>

* simplified tests for checking for failure

Signed-off-by: Matthew Wells <[email protected]>

* fixed redundant tests and improved tests that should fail

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
(cherry picked from commit 1a7134b)

* fixed bad cherrypick merge conflict

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
MitchellGale pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 28, 2023
…-project#1894)

* Added support of timestamp/date/time using curly brackets (#297)

* added bracketed time/date/timestamp input, tests, and documentation

Signed-off-by: Matthew Wells <[email protected]>

* improved failing tests

Signed-off-by: Matthew Wells <[email protected]>

* simplified tests for checking for failure

Signed-off-by: Matthew Wells <[email protected]>

* fixed redundant tests and improved tests that should fail

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
Signed-off-by: Mitchell Gale <[email protected]>
MitchellGale pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 28, 2023
…-project#1894)

* Added support of timestamp/date/time using curly brackets (#297)

* added bracketed time/date/timestamp input, tests, and documentation

Signed-off-by: Matthew Wells <[email protected]>

* improved failing tests

Signed-off-by: Matthew Wells <[email protected]>

* simplified tests for checking for failure

Signed-off-by: Matthew Wells <[email protected]>

* fixed redundant tests and improved tests that should fail

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>
Signed-off-by: Mitchell Gale <[email protected]>
MitchellGale pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 31, 2023
… (opensearch-project#1897)

Signed-off-by: Yury-Fridlyand <[email protected]>

Added support of timestamp/date/time using curly brackets (opensearch-project#1894)

* Added support of timestamp/date/time using curly brackets (#297)

* added bracketed time/date/timestamp input, tests, and documentation

Signed-off-by: Matthew Wells <[email protected]>

* improved failing tests

Signed-off-by: Matthew Wells <[email protected]>

* simplified tests for checking for failure

Signed-off-by: Matthew Wells <[email protected]>

* fixed redundant tests and improved tests that should fail

Signed-off-by: Matthew Wells <[email protected]>

---------

Signed-off-by: Matthew Wells <[email protected]>

Bump bwc version (opensearch-project#1876)

Signed-off-by: Vamsi Manohar <[email protected]>

Prometheus Query Exemplars (opensearch-project#1782)

Signed-off-by: Vamsi Manohar <[email protected]>

Adding google code changes for core/src/main/java/org/opensearch/sql/analysis  core/src/main/java/org/opensearch/sql/ast  core/src/main/java/org/opensearch/sql/data
 core/src/main/java/org/opensearch/sql/datasource

Signed-off-by: Mitchell Gale <[email protected]>

Disable checkstyle fore core module and enable spotless check for the files being checked.

Signed-off-by: Mitchell Gale <[email protected]>

Added back core checkstyle test in sql-test-workflow.yml

Signed-off-by: Mitchell Gale <[email protected]>

Revert "Prometheus Query Exemplars (opensearch-project#1782)"

This reverts commit 430d7a9.

Revert "Bump bwc version (opensearch-project#1876)"

This reverts commit 501392e.

Revert "Added support of timestamp/date/time using curly brackets (opensearch-project#1894)"

This reverts commit 1a7134b.

Revert "Statically init `typeActionMap` in `OpenSearchExprValueFactory`. (#310) (opensearch-project#1897)"

This reverts commit c8d42a7.

Revert "Fix create_index/create_index_with_IOException issue caused by OpenSearch PR change (opensearch-project#1899)"

This reverts commit 7b932a7.

Signed-off-by: Mitchell Gale <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] OpenSearch does not support timestamp format {ts 'YYYY-MM-DD hh:mm:ss'}
4 participants