Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Commit

Permalink
Add self_type method for ColumnDescriptor (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
liurenjie1024 authored and sunchao committed Oct 11, 2018
1 parent 5cb27e1 commit 2784ab1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/schema/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,11 @@ impl ColumnDescriptor {
&self.path
}

/// Returns self type [`Type`](`::schema::types::Type`) for this leaf column.
pub fn self_type(&self) -> &Type {
self.primitive_type.as_ref()
}

/// Returns root [`Type`](`::schema::types::Type`) (most top-level parent field) for
/// this leaf column.
pub fn root_type(&self) -> &Type {
Expand Down

0 comments on commit 2784ab1

Please sign in to comment.