refactor: move delete predicate proto to own package (#2731) (#3065)

* refactor: move delete predicate proto to own package (#2731)

* chore: fmt

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
pull/24376/head
Raphael Taylor-Davies 2021-11-08 13:42:26 +00:00 committed by GitHub
parent 7277149bd1
commit 6320ce6f55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 18 deletions

View File

@ -33,6 +33,7 @@ fn generate_grpc_types(root: &Path) -> Result<()> {
let deployment_path = root.join("influxdata/iox/deployment/v1");
let idpe_path = root.join("com/github/influxdata/idpe/storage/read");
let management_path = root.join("influxdata/iox/management/v1");
let predicate_path = root.join("influxdata/iox/predicate/v1");
let preserved_catalog_path = root.join("influxdata/iox/preserved_catalog/v1");
let remote_path = root.join("influxdata/iox/remote/v1");
let router_path = root.join("influxdata/iox/router/v1");
@ -51,9 +52,9 @@ fn generate_grpc_types(root: &Path) -> Result<()> {
management_path.join("server_config.proto"),
management_path.join("service.proto"),
management_path.join("shard.proto"),
predicate_path.join("predicate.proto"),
preserved_catalog_path.join("catalog.proto"),
preserved_catalog_path.join("parquet_metadata.proto"),
preserved_catalog_path.join("predicate.proto"),
root.join("google/longrunning/operations.proto"),
root.join("google/rpc/error_details.proto"),
root.join("google/rpc/status.proto"),

View File

@ -1,5 +1,5 @@
syntax = "proto3";
package influxdata.iox.preserved_catalog.v1;
package influxdata.iox.predicate.v1;
// Represents a parsed predicate for evaluation by the InfluxDB IOx query engine.
message Predicate {
@ -21,18 +21,6 @@ message Predicate {
repeated Expr exprs = 5;
}
// A optional string set.
//
// This is used instead of a `repeated string` to differenctiate between "empty set" and "none".
message OptionalStringSet {
repeated string values = 1;
}
// An optional string.
message OptionalString {
string value = 1;
}
// Specifies a continuous range of nanosecond timestamps.
message TimestampRange {
// Start defines the inclusive lower bound.

View File

@ -2,7 +2,7 @@ syntax = "proto3";
package influxdata.iox.preserved_catalog.v1;
import "google/protobuf/timestamp.proto";
import "influxdata/iox/preserved_catalog/v1/predicate.proto";
import "influxdata/iox/predicate/v1/predicate.proto";
// Path for object store interaction.
message Path {
@ -68,7 +68,7 @@ message ChunkAddr {
// Register new delete predicate
message DeletePredicate {
// Predicate to be applied.
Predicate predicate = 1;
influxdata.iox.predicate.v1.Predicate predicate = 1;
// Chunks that are affected by the predicate.
repeated ChunkAddr chunks = 2;

View File

@ -62,6 +62,16 @@ pub mod influxdata {
}
}
pub mod predicate {
pub mod v1 {
include!(concat!(env!("OUT_DIR"), "/influxdata.iox.predicate.v1.rs"));
include!(concat!(
env!("OUT_DIR"),
"/influxdata.iox.predicate.v1.serde.rs"
));
}
}
pub mod preserved_catalog {
pub mod v1 {
include!(concat!(

View File

@ -3,7 +3,7 @@ use std::{
ops::Deref,
};
use generated_types::influxdata::iox::preserved_catalog::v1 as proto;
use generated_types::influxdata::iox::predicate::v1 as proto;
use ordered_float::OrderedFloat;
use snafu::{OptionExt, ResultExt, Snafu};

View File

@ -9,7 +9,7 @@
use std::convert::TryInto;
use data_types::timestamp::TimestampRange;
use generated_types::influxdata::iox::preserved_catalog::v1 as proto;
use generated_types::influxdata::iox::predicate::v1 as proto;
use snafu::{ResultExt, Snafu};
use crate::{delete_expr::DeleteExpr, delete_predicate::DeletePredicate};