-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
6 changed files
with
96 additions
and
39 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,9 @@ | ||
use dioxus::prelude::*; | ||
use vortex::dict::DictArray; | ||
|
||
use crate::SharedPtr; | ||
|
||
#[component] | ||
pub fn DictInfo(array: SharedPtr<DictArray>) -> Element { | ||
rsx! {} | ||
} |
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,9 @@ | ||
use dioxus::prelude::*; | ||
use vortex::fsst::FSSTArray; | ||
|
||
use crate::SharedPtr; | ||
|
||
#[component] | ||
pub fn FSSTInfo(array: SharedPtr<FSSTArray>) -> Element { | ||
rsx! {} | ||
} |
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 |
---|---|---|
@@ -1 +1,42 @@ | ||
pub mod chunked; | ||
use std::sync::Arc; | ||
|
||
use dict::DictInfo; | ||
use dioxus::prelude::*; | ||
use fsst::FSSTInfo; | ||
use vortex::{ | ||
dict::{DictArray, DictEncoding}, | ||
encoding::Encoding, | ||
fsst::{FSSTArray, FSSTEncoding}, | ||
ArrayData, | ||
}; | ||
|
||
use crate::SharedPtr; | ||
|
||
pub mod dict; | ||
pub mod fsst; | ||
|
||
/// Show encoding-specific information about an array. | ||
/// | ||
/// This is a parent component that will dynamically delegate to the encoding-specific child component. | ||
#[component] | ||
pub fn EncodingInfo(array: SharedPtr<ArrayData>) -> Element { | ||
let array = (*array).clone(); | ||
let encoding = array.encoding().id(); | ||
|
||
if encoding == FSSTEncoding::ID { | ||
// Show FSST symbol table info. | ||
let array = SharedPtr(Arc::new(FSSTArray::try_from(array)?)); | ||
rsx! { | ||
FSSTInfo { array } | ||
} | ||
} else if encoding == DictEncoding::ID { | ||
// Show dictionary size, value sample, histogram | ||
let array = SharedPtr(Arc::new(DictArray::try_from(array)?)); | ||
rsx! { | ||
DictInfo { array } | ||
} | ||
} else { | ||
// Empty component | ||
rsx! {} | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.