This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7decd19
commit d607c33
Showing
4 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use std::fmt::{Debug, Formatter, Result, Write}; | ||
|
||
use super::super::fmt::{get_display, write_vec}; | ||
use super::MapArray; | ||
|
||
pub fn write_value<W: Write>( | ||
array: &MapArray, | ||
index: usize, | ||
null: &'static str, | ||
f: &mut W, | ||
) -> Result { | ||
let values = array.value(index); | ||
let writer = |f: &mut W, index| get_display(values.as_ref(), null)(f, index); | ||
write_vec(f, writer, None, values.len(), null, false) | ||
} | ||
|
||
impl Debug for MapArray { | ||
fn fmt(&self, f: &mut Formatter<'_>) -> Result { | ||
let writer = |f: &mut Formatter, index| write_value(self, index, "None", f); | ||
|
||
write!(f, "MapArray")?; | ||
write_vec(f, writer, self.validity.as_ref(), self.len(), "None", false) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters