Struct datafusion_python::common::data_type::DataTypeMap
source · pub struct DataTypeMap { /* private fields */ }
Expand description
These bindings are tying together several disparate systems. You have SQL types for the SQL strings and RDBMS systems itself. Rust types for the DataFusion code Arrow types which represents the underlying arrow format Python types which represent the type in Python It is important to keep all of those types in a single and managable location. Therefore this structure exists to map those types and provide a simple place for developers to map types from one system to another.
Implementations§
source§impl DataTypeMap
impl DataTypeMap
pub fn map_from_arrow_type(arrow_type: &DataType) -> Result<DataTypeMap, PyErr>
source§impl DataTypeMap
impl DataTypeMap
pub fn py_new( arrow_type: PyDataType, python_type: PythonType, sql_type: SqlType ) -> Self
pub fn py_map_from_arrow_type(arrow_type: &PyDataType) -> PyResult<DataTypeMap>
pub fn py_map_from_sql_type(sql_type: &SqlType) -> PyResult<DataTypeMap>
Trait Implementations§
source§impl Clone for DataTypeMap
impl Clone for DataTypeMap
source§fn clone(&self) -> DataTypeMap
fn clone(&self) -> DataTypeMap
Returns a copy 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 DataTypeMap
impl Debug for DataTypeMap
source§impl PyClassImpl for DataTypeMap
impl PyClassImpl for DataTypeMap
source§const IS_BASETYPE: bool = true
const IS_BASETYPE: bool = true
#[pyclass(subclass)]
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
§type Layout = PyCell<DataTypeMap>
type Layout = PyCell<DataTypeMap>
Layout
§type ThreadChecker = ThreadCheckerStub<DataTypeMap>
type ThreadChecker = ThreadCheckerStub<DataTypeMap>
This handles following two situations: Read more
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a DataTypeMap
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a DataTypeMap
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut DataTypeMap
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut DataTypeMap
source§impl PyMethods<DataTypeMap> for PyClassImplCollector<DataTypeMap>
impl PyMethods<DataTypeMap> for PyClassImplCollector<DataTypeMap>
fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for DataTypeMap
impl PyTypeInfo for DataTypeMap
§type AsRefTarget = PyCell<DataTypeMap>
type AsRefTarget = PyCell<DataTypeMap>
Utility type to make Py::as_ref work.
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type or a subclass of this type.source§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type.