-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index column has a null value #7651
Labels
Comments
abey79
added
🪳 bug
Something isn't working
feat-dataframe-api
Everything related to the dataframe API
labels
Oct 9, 2024
teh-cmc
changed the title
Index column as a duplicate value
Index column has a duplicate value
Oct 9, 2024
Can't repro:
|
This repros: #![allow(clippy::unwrap_used, clippy::match_same_arms)]
use itertools::Itertools;
use re_chunk::TimeInt;
use re_chunk_store::{
ChunkStore, ChunkStoreConfig, ComponentColumnSelector, QueryExpression, SparseFillStrategy,
TimeColumnSelector, Timeline, VersionPolicy,
};
use re_dataframe::{QueryCache, QueryEngine};
use re_log_types::{ResolvedTimeRange, StoreKind};
fn main() -> anyhow::Result<()> {
let args = std::env::args().collect_vec();
let get_arg = |i| {
let Some(value) = args.get(i) else {
eprintln!(
"Usage: {} <path_to_rrd> [timeline] [from] [to] [entity_path_filter]",
args.first().map_or("$BIN", |s| s.as_str())
);
std::process::exit(1);
};
value
};
let path_to_rrd = get_arg(1);
let timeline_name = "frame_nr";
let time_from = TimeInt::MIN;
let time_to = TimeInt::try_from(4)?;
// TODO(cmc): We need to take a selector, not a Timeline.
let timeline = match timeline_name {
"log_time" => Timeline::new_temporal(timeline_name),
"log_tick" => Timeline::new_sequence(timeline_name),
"frame" => Timeline::new_sequence(timeline_name),
"frame_nr" => Timeline::new_sequence(timeline_name),
_ => Timeline::new_temporal(timeline_name),
};
let stores = ChunkStore::from_rrd_filepath(
&ChunkStoreConfig::DEFAULT,
path_to_rrd,
VersionPolicy::Warn,
)?;
for (store_id, store) in &stores {
if store_id.kind != StoreKind::Recording {
continue;
}
let query_cache = QueryCache::new(store);
let query_engine = QueryEngine {
store,
cache: &query_cache,
};
let mut query = QueryExpression::new(timeline);
query.view_contents = None;
query.filtered_index_range = Some(ResolvedTimeRange::new(time_from, time_to));
query.sparse_fill_strategy = SparseFillStrategy::LatestAtGlobal;
query.selection = Some(vec![
TimeColumnSelector {
timeline: *timeline.name(),
}
.into(),
ComponentColumnSelector::new_for_component_name(
"/video/landmarker/faces/0/landmarks".into(),
"rerun.components.Scalar".into(),
)
.into(),
]);
eprintln!("{query:#?}:");
let query_handle = query_engine.query(query.clone());
// eprintln!("{:#?}", query_handle.selected_contents());
for batch in query_handle.into_batch_iter() {
eprintln!("{batch}");
}
}
Ok(())
} Result:
|
abey79
changed the title
Index column has a duplicate value
Index column has a null value
Oct 9, 2024
abey79
changed the title
Index column has a null value
Index column has a null value in some rrd
Oct 9, 2024
abey79
changed the title
Index column has a null value in some rrd
Index column has a null value
Oct 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Notice the first two rows with duplicate
frame_nr
number, even thoughframe_nr
is the index column.edit: the first row as a
null
frame_nr value actually (it just happens to be displayed as 0 here for some reason). See my comment below.(Temporary) link to rrd: https://www.swisstransfer.com/d/6de8cb41-311e-41ee-a66d-9eb8827b478e
The text was updated successfully, but these errors were encountered: