pub enum ProtoFieldType {
Bool,
Int32,
Int64,
Float,
Double,
String,
Bytes,
Timestamp,
}Variants§
Bool
Int32
Int64
Float
Double
String
Bytes
Timestamp
Wall-clock, no timezone - always maps to Delta TIMESTAMP_NTZ.
Implementations§
Source§impl ProtoFieldType
impl ProtoFieldType
pub fn from_json_value(value: &Value) -> Self
pub fn from_avro_schema(schema: &Schema) -> Self
pub fn from_arrow_type(data_type: &ArrowDataType) -> Self
pub fn from_field_type(ftype: &ProstType) -> Self
Sourcepub fn can_widen_to(&self, other: &Self) -> bool
pub fn can_widen_to(&self, other: &Self) -> bool
Widening chain: int32 -> int64 -> double -> string,
float -> double -> string, bool/bytes/timestamp -> string.
pub fn wider_type(&self, other: &Self) -> Self
pub fn to_proto_type(&self) -> ProstType
Sourcepub fn to_delta_type_name(&self) -> &'static str
pub fn to_delta_type_name(&self) -> &'static str
Delta/Spark SQL DDL type name.
Sourcepub fn to_uc_api_type_name(&self) -> &'static str
pub fn to_uc_api_type_name(&self) -> &'static str
Unity Catalog REST API type name (POST /api/2.1/unity-catalog/tables)
- a DIFFERENT enum than SQL DDL:
LONGnotBIGINT, etc.
Trait Implementations§
Source§impl Clone for ProtoFieldType
impl Clone for ProtoFieldType
Source§fn clone(&self) -> ProtoFieldType
fn clone(&self) -> ProtoFieldType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtoFieldType
impl Debug for ProtoFieldType
Source§impl PartialEq for ProtoFieldType
impl PartialEq for ProtoFieldType
impl Copy for ProtoFieldType
impl Eq for ProtoFieldType
impl StructuralPartialEq for ProtoFieldType
Auto Trait Implementations§
impl Freeze for ProtoFieldType
impl RefUnwindSafe for ProtoFieldType
impl Send for ProtoFieldType
impl Sync for ProtoFieldType
impl Unpin for ProtoFieldType
impl UnwindSafe for ProtoFieldType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more