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

add flint date type support #1699

Merged
merged 4 commits into from
Jun 8, 2023

Conversation

penghuo
Copy link
Collaborator

@penghuo penghuo commented Jun 2, 2023

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

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.

Signed-off-by: Peng Huo <penghuo@gmail.com>
@penghuo penghuo self-assigned this Jun 2, 2023
@penghuo penghuo added the Flint label Jun 2, 2023
@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Merging #1699 (6e4bac3) into feature/flint (e80cf9b) will not change coverage.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             feature/flint    #1699   +/-   ##
================================================
  Coverage            97.19%   97.19%           
  Complexity            4107     4107           
================================================
  Files                  371      371           
  Lines                10464    10464           
  Branches               706      706           
================================================
  Hits                 10170    10170           
  Misses                 287      287           
  Partials                 7        7           
Flag Coverage Δ
sql-engine 97.19% <ø> (ø)

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

Signed-off-by: Peng Huo <penghuo@gmail.com>
@penghuo penghuo marked this pull request as ready for review June 5, 2023 16:54
Signed-off-by: Peng Huo <penghuo@gmail.com>
@@ -86,16 +83,22 @@ object FlintSparkConf {
val OPTIMIZER_RULE_ENABLED = FlintConfig("spark.flint.optimizer.enabled")
.doc("Enable Flint optimizer rule for query rewrite with Flint index")
.createWithDefault("true")

val TIME_ZONE = FlintConfig("timeZone")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a new Flint config or it's same as spark.sql.session.timeZone?

Copy link
Collaborator Author

@penghuo penghuo Jun 8, 2023

Choose a reason for hiding this comment

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

good point. Yes it is same. remove the timezone and fetch from SQLConf.


/**
* Constructs a parser for a given schema that translates a json string to an [[InternalRow]].
* copy from spark {@link JacksonParser}.
Copy link
Collaborator

Choose a reason for hiding this comment

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

just wonder do we copy this class to tweak something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add comments in code about why copy it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In Flint Storage, timestamp epoch value is in milliseconds. change parser.getLongValue * 1000000L to parser* .getLongValue * 1000L

Signed-off-by: Peng Huo <penghuo@gmail.com>
@penghuo penghuo merged commit 9badf77 into opensearch-project:feature/flint Jun 8, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants