diff options
author | qiaoli <qiaoli@google.com> | 2023-08-02 20:50:34 +0000 |
---|---|---|
committer | qiaoli <qiaoli@google.com> | 2023-08-03 18:06:51 +0000 |
commit | 542ed3e5d57ae87cebbaaadfddb53661592fa0a3 (patch) | |
tree | d167eeb5c958fda66c1babaf273d7e54b7553ae7 | |
parent | 87f3cd15448265adcf01c8198e1f19f72995919d (diff) | |
download | federated-compute-542ed3e5d57ae87cebbaaadfddb53661592fa0a3.tar.gz |
Add FA selection criteria proto
Bug: 278110226
Test: atest
Change-Id: I27b8d6de0aa4f5bd51aa36d9ada74fd582d5fdbb
-rw-r--r-- | fcp/protos/plan.proto | 1 | ||||
-rw-r--r-- | fcp/protos/selection_criteria.proto | 57 |
2 files changed, 57 insertions, 1 deletions
diff --git a/fcp/protos/plan.proto b/fcp/protos/plan.proto index 81076f4..cd3ee3f 100644 --- a/fcp/protos/plan.proto +++ b/fcp/protos/plan.proto @@ -18,7 +18,6 @@ package google.internal.federated.plan; import "google/protobuf/any.proto"; import "tensorflow/core/framework/tensor.proto"; -import "tensorflow/core/framework/tensor_shape.proto"; import "tensorflow/core/framework/types.proto"; import "tensorflow/core/protobuf/saver.proto"; import "tensorflow/core/protobuf/struct.proto"; diff --git a/fcp/protos/selection_criteria.proto b/fcp/protos/selection_criteria.proto new file mode 100644 index 0000000..5ad89a7 --- /dev/null +++ b/fcp/protos/selection_criteria.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; + +package google.internal.federated.plan; + +import "fcp/protos/plan.proto"; + +option java_package = "com.google.internal.federated.plan"; +option java_outer_classname = "SelectionCriteriaProto"; + +// Schema information describing a column in the client execution context. +message ColumnSchema { + // The column name. + string name = 1; + + // ExampleQuery output vector data type. When generating results for + // the Lightweight client, client query results will be encoded using + // this type. + // These types are only populated for the SQL query output columns. + google.internal.federated.plan.ExampleQuerySpec.OutputVectorSpec.DataType + type = 2; +} + +message SqlQuery { + // Supported SQL dialects. + enum SqlDialect { + UNKNOWN = 0; + SQLITE = 1; + // TODO(b/178190670) Currently only SQLite is supported, as Android clients + // can only execute via SQLite. + } + + // The SQL dialect the query is expressed in. + SqlDialect sql_dialect = 1; + + // The raw SQL query string. + string raw_sql = 2; + + // Schema information for the client SQL query output columns. + repeated ColumnSchema output_columns = 3; +} + +// A set of SQL queries that run on the client with the same inputs. They share +// a database schema. +message SqlQuerySet { + // Map of query names to SQL queries. + map<string, SqlQuery> sql_queries = 1; +} + +// Selection criteria sent to Brella clients for SQL tasks. Contains the +// query that the FedSqlExampleStore should execute before handing results +// off to TensorFlow. +message SelectionCriteria { + // The SQL queries executed by each client. The result columns will be + // serialized into `fcp.client.ExampleQueryResult` protos. + // This field should only be used by tasks using the lightweight client. + SqlQuerySet client_queries = 1; +}
\ No newline at end of file |