feat: report support for read_group in capabilities request (#586)

pull/24376/head
Andrew Lamb 2020-12-22 10:06:48 -05:00 committed by GitHub
parent 263af1eeac
commit 163f34c27b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 12 deletions

View File

@ -332,8 +332,6 @@ where
InternalHintsFieldNotSupported { hints }.fail()?
}
warn!("read_group implementation not yet complete: https://github.com/influxdata/influxdb_iox/issues/448");
let aggregate_string = format!(
"aggregate: {:?}, group: {:?}, group_keys: {:?}",
aggregate, group, group_keys
@ -569,7 +567,8 @@ where
//
// For now, hard code our list of support
let caps = [(
let caps = [
(
"WindowAggregate",
vec![
"Count", "Sum", // "First"
@ -577,7 +576,9 @@ where
"Min", "Max", "Mean",
// "Offset"
],
)];
),
("Group", vec!["First", "Last", "Min", "Max"]),
];
// Turn it into the HashMap -> Capabiltity
let caps = caps
@ -1241,6 +1242,8 @@ mod tests {
to_str_vec(&["Count", "Sum", "Min", "Max", "Mean"]),
);
expected_capabilities.insert("Group".into(), to_str_vec(&["First", "Last", "Min", "Max"]));
assert_eq!(
expected_capabilities,
fixture.storage_client.capabilities().await?

View File

@ -203,7 +203,7 @@ async fn read_and_write_data() -> Result<()> {
let capabilities_response = capabilities_response.into_inner();
assert_eq!(
capabilities_response.caps.len(),
1,
2,
"Response: {:?}",
capabilities_response
);