aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqiaoli <qiaoli@google.com>2023-08-03 19:45:07 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-03 19:45:07 +0000
commit83c494bfbb58480f0b7945295624d76f8575e797 (patch)
treed167eeb5c958fda66c1babaf273d7e54b7553ae7
parentac20511c421f59dd21e93664db55a598fa0d1a7f (diff)
parent542ed3e5d57ae87cebbaaadfddb53661592fa0a3 (diff)
downloadfederated-compute-83c494bfbb58480f0b7945295624d76f8575e797.tar.gz
Add FA selection criteria proto am: 542ed3e5d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/federated-compute/+/24299152 Change-Id: I6aaecdef764a997cbea0d8ce57a423481510a8b9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--fcp/protos/plan.proto1
-rw-r--r--fcp/protos/selection_criteria.proto57
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