Structs

  • 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.
  • PyO3 requires that objects passed between Rust and Python implement the trait PyClass Since DataType exists in another package we cannot make that happen here so we wrap DataType as PyDataType This exists solely to satisfy those constraints.

Enums

  • Represents the possible Python types that can be mapped to the SQL types
  • Represents the types that are possible for DataFusion to parse from a SQL query. Aka “SqlType” and are valid values for ANSI SQL