Tonight
This commit is contained in:
parent
28323f145e
commit
94f9c0d594
76 changed files with 3238 additions and 1230 deletions
|
|
@ -26,6 +26,7 @@ pub struct POIData {
|
|||
id_lengths: Vec<u16>,
|
||||
pub group: InternedColumn,
|
||||
pub category: InternedColumn,
|
||||
pub icon_category: InternedColumn,
|
||||
pub name: Vec<String>,
|
||||
pub lat: Vec<f32>,
|
||||
pub lng: Vec<f32>,
|
||||
|
|
@ -93,6 +94,15 @@ impl POIData {
|
|||
let lat = extract_f32_col(&df, "lat", 0.0)?;
|
||||
let lng = extract_f32_col(&df, "lng", 0.0)?;
|
||||
let emoji_raw = extract_str_col(&df, "emoji")?;
|
||||
let icon_category_raw = if df
|
||||
.get_column_names()
|
||||
.iter()
|
||||
.any(|name| name.as_str() == "icon_category")
|
||||
{
|
||||
extract_str_col(&df, "icon_category")?
|
||||
} else {
|
||||
category_raw.clone()
|
||||
};
|
||||
|
||||
// Pack POI IDs into a contiguous buffer
|
||||
let total_id_bytes: usize = id_raw.iter().map(|s| s.len()).sum();
|
||||
|
|
@ -108,11 +118,13 @@ impl POIData {
|
|||
}
|
||||
|
||||
let category = InternedColumn::build(&category_raw);
|
||||
let icon_category = InternedColumn::build(&icon_category_raw);
|
||||
let group = InternedColumn::build(&group_raw);
|
||||
let emoji = InternedColumn::build(&emoji_raw);
|
||||
|
||||
info!(
|
||||
category_unique = category.values.len(),
|
||||
icon_category_unique = icon_category.values.len(),
|
||||
group_unique = group.values.len(),
|
||||
emoji_unique = emoji.values.len(),
|
||||
"POI string columns interned"
|
||||
|
|
@ -131,6 +143,7 @@ impl POIData {
|
|||
id_lengths,
|
||||
name,
|
||||
category,
|
||||
icon_category,
|
||||
group,
|
||||
lat,
|
||||
lng,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue