-
Notifications
You must be signed in to change notification settings - Fork 193
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
refactor!: proof_of_sql_parser::intermediate_ast::PoSQLTimezone
with sqlparser::ast::TimezoneInfo
in the proof-of-sql crate
#451
base: main
Are you sure you want to change the base?
Conversation
b667064
to
eb75d22
Compare
proof_of_sql_parser::intermediate_ast::PoSQLTimezone
with sqlparser::ast::TimezoneInfo
in the proof-of-sql crate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait sorry what is the point of this PR? Is it that sqlparser
has a requirement for timestamps without timezone information? Also, Im not sure if this branch should merge without being deployed and smoke tested in the ProofsService
crate first as this may end up causing breaking changes, but Im not really sure without trying it.
Lastly, Im not at all against removing the TimeUnit
if it isnt supported by sqlparser
. Removing the TimeUnit
and just defaulting into nanoseconds would vastly simplify the codebase in many places, but maybe the trait introduced here mitigates that issue.
c39c857
to
c6b236d
Compare
@iajoiner @Dustin-Ray Thanks for reviewing! I don't believe removing |
c6b236d
to
cd151d3
Compare
@Dustin-Ray @varshith257 Yeah I think it is probably easier to just default to nanoseconds here. |
b9cd336
to
04a1c60
Compare
@@ -6,22 +6,13 @@ use serde::{Deserialize, Serialize}; | |||
#[allow(clippy::module_name_repetitions)] | |||
#[derive(Debug, Clone, Copy, Hash, Serialize, Deserialize, PartialEq, Eq)] | |||
pub enum PoSQLTimeUnit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not remove this file entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted nanoseconds defaulting change as per discussions
95fde48
to
7621c97
Compare
7621c97
to
18a1d81
Compare
Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.
Please go through the following checklist
!
is used if and only if at least one breaking change has been introduced.source scripts/run_ci_checks.sh
.Rationale for this change
This PR addresses the need to replace the
proof_of_sql_parser::PoSQLTime
with thesqlparser::ast::TimezoneInfo
in theproof-of-sql
crate as part of a larger transition toward integrating thesqlparser
.This change is a subtask of issue #235, with the main goal of streamlining the repository by switching to the
sqlparser
crate and gradually replacing intermediary constructs likeproof_of_sql_parser::intermediate_ast
withsqlparser::ast
.What changes are included in this PR?
proof_of_sql_parser::PoSQLTimeZone
have been replaced withsqlparser::ast::TimezoneInfo
PoSQLTimeZone
has been updated to maintain the original functionality, ensuring no changes to the logic or behavior.TimeZoneInfo
doesn't supportoffset
and a trait has been added for itAre these changes tested?
Yes
Part of #235
Part of #351
Note for Reviewers
PosqlTimeUnit
has been kept intact due tosqlparser::ast
not having related structures or enums to do so.PosqlTimeStamp
will be refactored inLiteral -> ast::Expr
PR asPosqlTimeStamp
has been integrated withLiteral::TimeStampTZ
, which makes refactor redundant in this PR. I have included a util function for the refactor of TimeStamp