Skip to content

Instantly share code, notes, and snippets.

@tonyyang-svail
Created February 8, 2019 23:45
Show Gist options
  • Save tonyyang-svail/6b8bcfa2a732a58347bd8f405b74ee37 to your computer and use it in GitHub Desktop.
Save tonyyang-svail/6b8bcfa2a732a58347bd8f405b74ee37 to your computer and use it in GitHub Desktop.
syntax = "proto3";
import "google/protobuf/any.proto";
package server;
// SQL statements like `SELECT ...`, `DESCRIBE ...` returns a rowset.
// The rowset might be big. In such cases, Query returns a stream
// of RunResponse
//
// SQL statements like `USE database`, `DELETE` returns only a success
// message.
//
// SQL statement like `SELECT ... TRAIN/PREDICT ...` returns a stream of
// messages which indicates the training/predicting progress
service SQLFlow {
rpc File (Request) returns (Job);
rpc ReadRow (Job) returns (stream Row);
rpc ReadLog (Job) returns (stream Log);
}
message Request {
string sql = 1;
}
message Job {
int64 id = 1;
}
message Log {
string log = 1;
}
// A row of data. Data can be any type
message Row {
repeated google.protobuf.Any data = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment