-
Notifications
You must be signed in to change notification settings - Fork 421
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
feat(python, rust): timestampNtz support #2236
Conversation
d86c52a
to
244bb8f
Compare
Also delta-scala doesn't universally cast things to UTC, it respects the |
8f27e85
to
b671d51
Compare
"appendOnly" | "delta.appendOnly" => WriterFeatures::AppendOnly, | ||
"invariants" | "delta.invariants" => WriterFeatures::Invariants, | ||
"checkConstraints" | "delta.checkConstraints" => WriterFeatures::CheckConstraints, | ||
"changeDataFeed" | "delta.enableChangeDataFeed" => WriterFeatures::ChangeDataFeed, |
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.
@ion-elgreco why are these changes required? Are we not picking up table properties correctly right now? If so, is there a bug this is related to?
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.
@rtyler I am doing that so I can go from tableConfigKeys into tableFeatures. This is what spark-delta also does if your table protocol versions are 3,7 and you do set tblproperties "delta.enableChangeDataFeed" = true, it will additionally set the feature ChangeDataFeed into the protocol commit.
Maybe there is another way of doing this but I thought it was clever to put it on the from_str :P
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.
hmm, just passing by, but this seems strange. these are the values written in the feature vector list, so this seems like a strange place to do this conversion as well, isnce it describes completely differnet fields, now? one is values in the feature vecotor field, andother one is keys in the table properties, which should be handled in the table config?
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.
I added the table config keys here as well for quick parsing to table features, see my comment above.
In spark when your protocol is at 3,7 it will auto convert the configs into table features so that's basically what I am doing here as well.
.as_any() | ||
.downcast_ref::<TimestampMicrosecondArray>() | ||
.map(|v| Self::Timestamp(v.value(index))), | ||
Timestamp(TimeUnit::Microsecond, tz) => match tz { |
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.
nit: the CL addresses the TODO
no?
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.
Right, forgot to remove that : )
@@ -468,7 +468,7 @@ fn default_true() -> bool { | |||
} | |||
|
|||
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone, Eq, Hash)] | |||
#[serde(rename_all = "camelCase")] | |||
#[serde(rename_all = "snake_case")] |
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.
are we sure this is right?
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.
Without this it would fail for the timestampNtz, since spark wrote it as timestamp_ntz in the log. I couldnt find his anywhere in the docs, but it only impacted timestampNtz since the rest of them are one word long
Description
Related Issue(s)