Minor clean up of datetime and other classes (#198) by Yury-Fridlyand · Pull Request #1310 · opensearch-project/sql · GitHub
Skip to content

Minor clean up of datetime and other classes (#198)#1310

Merged
MaxKsyunz merged 4 commits into
opensearch-project:mainfrom
Bit-Quill:integ-cleanupcode
Apr 20, 2023
Merged

Minor clean up of datetime and other classes (#198)#1310
MaxKsyunz merged 4 commits into
opensearch-project:mainfrom
Bit-Quill:integ-cleanupcode

Conversation

@Yury-Fridlyand

@Yury-Fridlyand Yury-Fridlyand commented Jan 30, 2023

Copy link
Copy Markdown
Collaborator

Signed-off-by: MitchellGale-BitQuill mitchellg@bitquilltech.com
Signed-off-by: Yury-Fridlyand yury.fridlyand@improving.com
Co-authored-by: Yury-Fridlyand yury.fridlyand@improving.com

Description

Clean up lexer to make future changes easier. Make changes to documentation and code to make cleaner.

  • Groom ANTLR grammar files to make future changes easier.
  • Fix EqualsAndHashCode compilation warnings
Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
  • Move ExprTimestampValue.ZONE constant to DateTimeUtils
  • Move ExprDatetimeValue formatter to DateTimeFormatters
  • Sort alphabetically functions in DateTimeFunction and MathematicalFunction
  • Replace FunctionDSL import by static imports to simplify code
  • Remove tests for NULL and MISSING values
  • Add validation for non-zero divider
  • Remove Environment mock from some unit tests, because it is not needed anymore
  • Groom docs to eliminate rst validator warnings
  • Add doctests for some functions
  • Make IT for now-like functions truly parametrized
  • Rename some PPL grammar entities to be consistent with SQL ones
  • Change doctest cluster type to archive which has built-in modules - this requires for some added doctests

See team review and discussion in Bit-Quill#198

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-commenter

codecov-commenter commented Jan 30, 2023

Copy link
Copy Markdown

@dai-chen dai-chen added the maintenance Improves code quality, but not the product label Jan 31, 2023
@Yury-Fridlyand Yury-Fridlyand marked this pull request as draft February 2, 2023 17:49
@Yury-Fridlyand Yury-Fridlyand marked this pull request as ready for review February 4, 2023 02:25
MaxKsyunz
MaxKsyunz previously approved these changes Feb 7, 2023
acarbonetto
acarbonetto previously approved these changes Feb 7, 2023
Comment thread doctest/build.gradle
*/
plugin ':opensearch-sql-plugin'
testDistribution = 'integ_test'
testDistribution = 'archive'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

need this for painless

@Yury-Fridlyand

Copy link
Copy Markdown
Collaborator Author

Rebased

@Yury-Fridlyand

Copy link
Copy Markdown
Collaborator Author

Rebased again

dai-chen
dai-chen previously approved these changes Feb 15, 2023

@dai-chen dai-chen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the refactoring!

penghuo
penghuo previously approved these changes Feb 15, 2023
@Yury-Fridlyand Yury-Fridlyand dismissed stale reviews from penghuo and dai-chen via c4c16cd February 15, 2023 19:51
@Yury-Fridlyand

Copy link
Copy Markdown
Collaborator Author

Rebased again, please re-review

dai-chen
dai-chen previously approved these changes Feb 16, 2023
acarbonetto
acarbonetto previously approved these changes Mar 21, 2023
Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@MaxKsyunz MaxKsyunz merged commit bc29a8a into opensearch-project:main Apr 20, 2023
@opensearch-trigger-bot

Copy link
Copy Markdown
Contributor

@Yury-Fridlyand Yury-Fridlyand deleted the integ-cleanupcode branch April 20, 2023 19:04
opensearch-trigger-bot Bot pushed a commit that referenced this pull request Apr 20, 2023
* Minor clean up of datetime and other classes (#198)

---------

Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
(cherry picked from commit bc29a8a)
penghuo pushed a commit that referenced this pull request Apr 24, 2023
* Minor clean up of datetime and other classes (#198)

---------

Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
(cherry picked from commit bc29a8a)

Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
acarbonetto pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Apr 28, 2023
…ct#1310)

* Minor clean up of datetime and other classes (#198)

---------

Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x maintenance Improves code quality, but not the product v2.8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants