-
Notifications
You must be signed in to change notification settings - Fork 280
feat: support scan nested type(struct, map, list) #882
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,9 @@ use crate::spec::{ | |
use crate::{Error, ErrorKind}; | ||
|
||
/// When iceberg map type convert to Arrow map type, the default map field name is "key_value". | ||
pub(crate) const DEFAULT_MAP_FIELD_NAME: &str = "key_value"; | ||
pub const DEFAULT_MAP_FIELD_NAME: &str = "key_value"; | ||
/// UTC time zone for Arrow timestamp type. | ||
pub const UTC_TIME_ZONE: &str = "+00:00"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this also required to be public? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. When users provide the timestamp data, they should set the time zone consistent with the iceberg. I think we can provide something to help user fill the metadata later.🤔 |
||
|
||
/// A post order arrow schema visitor. | ||
/// | ||
|
@@ -598,14 +600,14 @@ impl SchemaVisitor for ToArrowSchemaConverter { | |
)), | ||
crate::spec::PrimitiveType::Timestamptz => Ok(ArrowSchemaOrFieldOrType::Type( | ||
// Timestampz always stored as UTC | ||
DataType::Timestamp(TimeUnit::Microsecond, Some("+00:00".into())), | ||
DataType::Timestamp(TimeUnit::Microsecond, Some(UTC_TIME_ZONE.into())), | ||
)), | ||
crate::spec::PrimitiveType::TimestampNs => Ok(ArrowSchemaOrFieldOrType::Type( | ||
DataType::Timestamp(TimeUnit::Nanosecond, None), | ||
)), | ||
crate::spec::PrimitiveType::TimestamptzNs => Ok(ArrowSchemaOrFieldOrType::Type( | ||
// Store timestamptz_ns as UTC | ||
DataType::Timestamp(TimeUnit::Nanosecond, Some("+00:00".into())), | ||
DataType::Timestamp(TimeUnit::Nanosecond, Some(UTC_TIME_ZONE.into())), | ||
)), | ||
crate::spec::PrimitiveType::String => { | ||
Ok(ArrowSchemaOrFieldOrType::Type(DataType::Utf8)) | ||
|
Uh oh!
There was an error while loading. Please reload this page.