JingsongLi commented on code in PR #197:
URL: https://github.com/apache/paimon-rust/pull/197#discussion_r3032907471
##########
crates/paimon/src/arrow/reader.rs:
##########
@@ -189,16 +215,74 @@ impl ArrowReader {
}
}
+/// Build the target Arrow schema from the read type (Paimon DataFields).
+fn build_target_arrow_schema(read_type: &[DataField]) ->
crate::Result<Arc<ArrowSchema>> {
Review Comment:
Good point!
##########
crates/paimon/src/arrow/mod.rs:
##########
@@ -16,5 +16,112 @@
// under the License.
mod reader;
+pub(crate) mod schema_evolution;
pub use crate::arrow::reader::ArrowReaderBuilder;
+
+use crate::spec::DataType as PaimonDataType;
+use arrow_schema::DataType as ArrowDataType;
+use arrow_schema::{Field as ArrowField, TimeUnit};
+use std::sync::Arc;
+
+/// Converts a Paimon [`DataType`](PaimonDataType) to an Arrow
[`DataType`](ArrowDataType).
+pub fn paimon_type_to_arrow(dt: &PaimonDataType) ->
crate::Result<ArrowDataType> {
Review Comment:
Good point!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]