1syntax = "proto3"; 2 3package google.internal.federated.plan; 4 5import "fcp/protos/plan.proto"; 6 7option java_package = "com.google.internal.federated.plan"; 8option java_outer_classname = "SelectionCriteriaProto"; 9 10// Schema information describing a column in the client execution context. 11message ColumnSchema { 12 // The column name. 13 string name = 1; 14 15 // ExampleQuery output vector data type. When generating results for 16 // the Lightweight client, client query results will be encoded using 17 // this type. 18 // These types are only populated for the SQL query output columns. 19 google.internal.federated.plan.ExampleQuerySpec.OutputVectorSpec.DataType 20 type = 2; 21} 22 23message SqlQuery { 24 // Supported SQL dialects. 25 enum SqlDialect { 26 UNKNOWN = 0; 27 SQLITE = 1; 28 // TODO(b/178190670) Currently only SQLite is supported, as Android clients 29 // can only execute via SQLite. 30 } 31 32 // The SQL dialect the query is expressed in. 33 SqlDialect sql_dialect = 1; 34 35 // The raw SQL query string. 36 string raw_sql = 2; 37 38 // Schema information for the client SQL query output columns. 39 repeated ColumnSchema output_columns = 3; 40} 41 42// A set of SQL queries that run on the client with the same inputs. They share 43// a database schema. 44message SqlQuerySet { 45 // Map of query names to SQL queries. 46 map<string, SqlQuery> sql_queries = 1; 47} 48 49// Selection criteria sent to Brella clients for SQL tasks. Contains the 50// query that the FedSqlExampleStore should execute before handing results 51// off to TensorFlow. 52message SelectionCriteria { 53 // The SQL queries executed by each client. The result columns will be 54 // serialized into `fcp.client.ExampleQueryResult` protos. 55 // This field should only be used by tasks using the lightweight client. 56 SqlQuerySet client_queries = 1; 57}