From bb6b3cd4b616e1af60c2c9b9167727b7abcf98ab Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Fri, 13 Sep 2024 10:21:14 -0400 Subject: [PATCH 01/12] initial add integration server/client --- .../cases/location_reuse_connection.go | 40 +++ .../cases/poll_flight_info.go | 74 +++++ .../arrow-flight-integration-client/main.go | 40 +++ .../arrow-flight-integration-server/main.go | 40 +++ dev/flight-integration/go.mod | 20 ++ dev/flight-integration/go.sum | 26 ++ dev/flight-integration/scenario/runner.go | 63 ++++ dev/flight-integration/scenario/scenario.go | 96 ++++++ .../scenario/scenario_test.go | 283 +++++++++++++++++ dev/flight-integration/scenario/server.go | 296 ++++++++++++++++++ dev/flight-integration/server.go | 17 + dev/flight-integration/server_test.go | 40 +++ dev/flight-integration/tester/tester.go | 50 +++ 13 files changed, 1085 insertions(+) create mode 100644 dev/flight-integration/cases/location_reuse_connection.go create mode 100644 dev/flight-integration/cases/poll_flight_info.go create mode 100644 dev/flight-integration/cmd/arrow-flight-integration-client/main.go create mode 100644 dev/flight-integration/cmd/arrow-flight-integration-server/main.go create mode 100644 dev/flight-integration/go.mod create mode 100644 dev/flight-integration/go.sum create mode 100644 dev/flight-integration/scenario/runner.go create mode 100644 dev/flight-integration/scenario/scenario.go create mode 100644 dev/flight-integration/scenario/scenario_test.go create mode 100644 dev/flight-integration/scenario/server.go create mode 100644 dev/flight-integration/server.go create mode 100644 dev/flight-integration/server_test.go create mode 100644 dev/flight-integration/tester/tester.go diff --git a/dev/flight-integration/cases/location_reuse_connection.go b/dev/flight-integration/cases/location_reuse_connection.go new file mode 100644 index 0000000000000..bcb0df1f43264 --- /dev/null +++ b/dev/flight-integration/cases/location_reuse_connection.go @@ -0,0 +1,40 @@ +package scenario + +import ( + "context" + "integration/scenario" + "integration/tester" + + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" +) + +func init() { + scenario.RegisterScenario( + scenario.Scenario{ + Name: "location:reuse_connection", + Steps: []scenario.ScenarioStep{ + { + Name: "get_info", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{ + Endpoint: []*flight.FlightEndpoint{{ + Ticket: &flight.Ticket{Ticket: []byte("reuse")}, + Location: []*flight.Location{{Uri: "arrow-flight-reuse-connection://?"}}, + }}, + }, nil + }}, + }, + }, + RunClient: func(ctx context.Context, client flight.FlightServiceClient, t *tester.Tester) { + info, err := client.GetFlightInfo(ctx, &flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("reuse")}) + t.Require().NoError(err) + + t.Assert().Len(info.Endpoint, 1, "expected 1 endpoint, got %d", len(info.Endpoint)) + + endpoint := info.Endpoint[0] + t.Assert().Len(endpoint.Location, 1, "expected 1 location, got %d", len(endpoint.Location)) + t.Assert().Equal("arrow-flight-reuse-connection://?", endpoint.Location[0].Uri) + }, + }, + ) +} diff --git a/dev/flight-integration/cases/poll_flight_info.go b/dev/flight-integration/cases/poll_flight_info.go new file mode 100644 index 0000000000000..585f854388687 --- /dev/null +++ b/dev/flight-integration/cases/poll_flight_info.go @@ -0,0 +1,74 @@ +package scenario + +import ( + "context" + "fmt" + "integration/scenario" + "integration/tester" + "math" + "time" + + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func init() { + scenario.RegisterScenario( + scenario.Scenario{ + Name: "poll_flight_info", + Steps: []scenario.ScenarioStep{ + { + Name: "get_in_progress", + ServerHandler: scenario.Handler{PollFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.PollInfo, error) { + progress := 0.1 + + return &flight.PollInfo{ + Info: &flight.FlightInfo{FlightDescriptor: fd}, + FlightDescriptor: &flight.FlightDescriptor{ + Type: flight.FlightDescriptor_CMD, + Cmd: []byte("poll"), + }, + Progress: &progress, + ExpirationTime: timestamppb.New(time.Now().Add(time.Second * 10)), + }, nil + }}, + }, + { + Name: "get_completed", + ServerHandler: scenario.Handler{PollFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.PollInfo, error) { + if fd.Type != flight.FlightDescriptor_CMD { + return nil, fmt.Errorf("expected FlightDescriptor.Type to be CMD, found: %s", fd.Type) + } + if string(fd.Cmd) != "poll" { + return nil, fmt.Errorf("expected FlightDescriptor.Cmd to be \"poll\", found: \"%s\"", fd.Cmd) + } + + info := &flight.FlightInfo{FlightDescriptor: fd} + progress := 1.0 + return &flight.PollInfo{ + Info: info, + Progress: &progress, + }, nil + }}, + }, + }, + RunClient: func(ctx context.Context, client flight.FlightServiceClient, t *tester.Tester) { + info, err := client.PollFlightInfo(ctx, &flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("heavy query")}) + t.Require().NoError(err) + + t.Assert().NotNilf(info.FlightDescriptor, "descriptor is missing: %s", info.String()) + t.Assert().NotNilf(info.Progress, "progress is missing: %s", info.String()) + t.Assert().NotNilf(info.ExpirationTime, "expiration time is missing: %s", info.String()) + t.Assert().Truef(0.0 <= *info.Progress && *info.Progress <= 1.0, "invalid progress: %s", info.String()) + + info, err = client.PollFlightInfo(ctx, info.FlightDescriptor) + t.Require().NoError(err) + + t.Assert().Nilf(info.FlightDescriptor, "retried but not finished yet: %s", info.String()) + t.Assert().NotNilf(info.Progress, "progress is missing in finished query: %s", info.String()) + t.Assert().Nilf(info.ExpirationTime, "expiration time must not be set for finished query: %s", info.String()) + t.Assert().Falsef(math.Abs(*info.Progress-1.0) > 1e-5, "progress for finished query isn't 1.0: %s", info.String()) + }, + }, + ) +} diff --git a/dev/flight-integration/cmd/arrow-flight-integration-client/main.go b/dev/flight-integration/cmd/arrow-flight-integration-client/main.go new file mode 100644 index 0000000000000..09eb1285bb8e5 --- /dev/null +++ b/dev/flight-integration/cmd/arrow-flight-integration-client/main.go @@ -0,0 +1,40 @@ +package main + +import ( + "flag" + "fmt" + "log" + "strings" + + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + + _ "integration/cases" + "integration/scenario" +) + +var ( + host = flag.String("host", "localhost", "Server host to connect to") + port = flag.Int("port", 31337, "Server port to connect to") + scenariosStr = flag.String("scenarios", "", "Comma-delimited scenarios to run") +) + +func main() { + flag.Parse() + addr := fmt.Sprintf("%s:%d", *host, *port) + scenarioNames := strings.Split(*scenariosStr, ",") + + scenarios, err := scenario.GetScenarios(scenarioNames...) + if err != nil { + log.Fatal(err) + } + + dialServer := func() (conn *grpc.ClientConn, err error) { + return grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) + } + + runner := scenario.NewScenarioRunner(scenarios) + if err := runner.RunScenarios(dialServer); err != nil { + log.Fatal(err) + } +} diff --git a/dev/flight-integration/cmd/arrow-flight-integration-server/main.go b/dev/flight-integration/cmd/arrow-flight-integration-server/main.go new file mode 100644 index 0000000000000..3abb639a9cfc8 --- /dev/null +++ b/dev/flight-integration/cmd/arrow-flight-integration-server/main.go @@ -0,0 +1,40 @@ +package main + +import ( + "flag" + "fmt" + "integration" + "log" + "net" + "strings" + + _ "integration/cases" + "integration/scenario" +) + +var ( + port = flag.Int("port", 31337, "Server port to listen on") + scenariosStr = flag.String("scenarios", "", "Comma-delimited scenarios to run") +) + +func main() { + flag.Parse() + scenarioNames := strings.Split(*scenariosStr, ",") + + lis, err := net.Listen("tcp", fmt.Sprintf(":%d", *port)) + if err != nil { + log.Fatalf("failed to listen on port %d: %v", *port, err) + } + + scenarios, err := scenario.GetScenarios(scenarioNames...) + if err != nil { + log.Fatal(err) + } + + srv := integration.NewIntegrationServer(scenarios...) + + log.Printf("server listening at %v", lis.Addr()) + if err := srv.Serve(lis); err != nil { + log.Fatalf("failed to serve: %v", err) + } +} diff --git a/dev/flight-integration/go.mod b/dev/flight-integration/go.mod new file mode 100644 index 0000000000000..ae02f046360ab --- /dev/null +++ b/dev/flight-integration/go.mod @@ -0,0 +1,20 @@ +module integration + +go 1.22.3 + +require ( + github.com/apache/arrow/go/v18 v18.0.0-20240912174209-990cdf7dca8b + github.com/stretchr/testify v1.9.0 + google.golang.org/grpc v1.66.2 + google.golang.org/protobuf v1.34.2 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/dev/flight-integration/go.sum b/dev/flight-integration/go.sum new file mode 100644 index 0000000000000..35f0ac468ea61 --- /dev/null +++ b/dev/flight-integration/go.sum @@ -0,0 +1,26 @@ +github.com/apache/arrow/go/v18 v18.0.0-20240912174209-990cdf7dca8b h1:qoHDuszpabcuxTvXi/JIFdcDF5a2dtpa4lIYHKnMvR4= +github.com/apache/arrow/go/v18 v18.0.0-20240912174209-990cdf7dca8b/go.mod h1:GjCnS5QddrJzyqrdYqCUvwlND7SfAw4WH/722M2U2NM= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= +google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/dev/flight-integration/scenario/runner.go b/dev/flight-integration/scenario/runner.go new file mode 100644 index 0000000000000..cc22fbca7bfd1 --- /dev/null +++ b/dev/flight-integration/scenario/runner.go @@ -0,0 +1,63 @@ +package scenario + +import ( + "context" + "errors" + "fmt" + "integration/tester" + + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" + "google.golang.org/grpc" +) + +func NewScenarioRunner(scenarios []Scenario) *ScenarioRunner { + return &ScenarioRunner{scenarios: scenarios, results: make(map[string]error, len(scenarios))} +} + +type ScenarioRunner struct { + scenarios []Scenario + + results map[string]error +} + +func (r *ScenarioRunner) RunScenario(scenario Scenario, newConnFn func() (conn *grpc.ClientConn, err error)) (err error) { + conn, err := newConnFn() + if err != nil { + return err + } + defer conn.Close() + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + t := tester.NewTester() + defer func() { + err = errors.Join(t.Errors()...) + r := recover() + if r == tester.RequirementFailedMsg { + return + } + if r != nil { + panic(r) + } + }() + + client := flight.NewFlightServiceClient(conn) + scenario.RunClient(ctx, client, t) + return +} + +func (r *ScenarioRunner) RunScenarios(newConnFn func() (conn *grpc.ClientConn, err error)) error { + var err error + for _, scenario := range r.scenarios { + if err := r.RunScenario(scenario, newConnFn); err != nil { + r.results[scenario.Name] = err + } + } + + if len(r.results) > 0 { + err = fmt.Errorf("client-side errors:\n%v", r.results) + } + + return err +} diff --git a/dev/flight-integration/scenario/scenario.go b/dev/flight-integration/scenario/scenario.go new file mode 100644 index 0000000000000..40d91bb460216 --- /dev/null +++ b/dev/flight-integration/scenario/scenario.go @@ -0,0 +1,96 @@ +package scenario + +import ( + "context" + "errors" + "fmt" + "integration/tester" + "sync" + + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" +) + +var ( + ErrExpectedClientDisconnect = errors.New("expected previous client to disconnect before starting new scenario") +) + +var ( + scenariosMu sync.RWMutex + scenarios = make(map[string]Scenario) +) + +func RegisterScenario(scenario Scenario) { + scenariosMu.Lock() + defer scenariosMu.Unlock() + + if _, dup := scenarios[scenario.Name]; dup { + panic("scenario: RegisterScenario called twice for scenario " + scenario.Name) + } + scenarios[scenario.Name] = scenario +} + +func UnregisterScenario(scenario string) { + scenariosMu.Lock() + defer scenariosMu.Unlock() + + _, found := scenarios[scenario] + if !found { + panic("scenario: cannot UnregisterScenario, scenario not found: " + scenario) + } + + delete(scenarios, scenario) +} + +func GetScenarios(names ...string) ([]Scenario, error) { + res := make([]Scenario, len(names)) + + scenariosMu.RLock() + defer scenariosMu.RUnlock() + + for i, name := range names { + scenario, ok := scenarios[name] + if !ok { + return nil, fmt.Errorf("scenario: unknown scenario %q", name) + } + + res[i] = scenario + } + + return res, nil +} + +func GetAllScenarios() ([]Scenario, error) { + scenariosMu.RLock() + defer scenariosMu.RUnlock() + + res := make([]Scenario, 0, len(scenarios)) + for _, scenario := range scenarios { + res = append(res, scenario) + } + + return res, nil +} + +type Scenario struct { + Name string + Steps []ScenarioStep + RunClient func(ctx context.Context, client flight.FlightServiceClient, t *tester.Tester) +} + +type ScenarioStep struct { + Name string + ServerHandler Handler +} + +type Handler struct { + DoAction func(*flight.Action, flight.FlightService_DoActionServer) error + DoExchange func(flight.FlightService_DoExchangeServer) error + DoGet func(*flight.Ticket, flight.FlightService_DoGetServer) error + DoPut func(flight.FlightService_DoPutServer) error + GetFlightInfo func(context.Context, *flight.FlightDescriptor) (*flight.FlightInfo, error) + GetSchema func(context.Context, *flight.FlightDescriptor) (*flight.SchemaResult, error) + Handshake func(flight.FlightService_HandshakeServer) error + ListActions func(*flight.Empty, flight.FlightService_ListActionsServer) error + ListFlights func(*flight.Criteria, flight.FlightService_ListFlightsServer) error + PollFlightInfo func(context.Context, *flight.FlightDescriptor) (*flight.PollInfo, error) +} diff --git a/dev/flight-integration/scenario/scenario_test.go b/dev/flight-integration/scenario/scenario_test.go new file mode 100644 index 0000000000000..5ef2fa399b00c --- /dev/null +++ b/dev/flight-integration/scenario/scenario_test.go @@ -0,0 +1,283 @@ +package scenario_test + +import ( + "context" + "fmt" + "integration" + "integration/scenario" + "net" + "testing" + + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" + "github.com/stretchr/testify/suite" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/test/bufconn" + "google.golang.org/protobuf/proto" +) + +type ScenarioSuite struct { + suite.Suite + + ctx context.Context + lis *bufconn.Listener + conn *grpc.ClientConn +} + +func createConn(lis *bufconn.Listener) (*grpc.ClientConn, error) { + return grpc.NewClient( + "passthrough://", + grpc.WithContextDialer(func(ctx context.Context, str string) (net.Conn, error) { return lis.DialContext(ctx) }), + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) +} + +func (s *ScenarioSuite) closeConn() error { return s.conn.Close() } + +func (s *ScenarioSuite) resetConn() error { + var err error + if err = s.closeConn(); err != nil { + return err + } + + s.conn, err = createConn(s.lis) + return err +} + +func (s *ScenarioSuite) SetupTest() { + lis := bufconn.Listen(1024 * 1024) + conn, err := createConn(lis) + if err != nil { + panic(err) + } + + s.ctx = context.Background() + s.lis = lis + s.conn = conn +} + +func (s *ScenarioSuite) TearDownTest() { + s.ctx = nil + s.lis = nil + if err := s.closeConn(); err != nil { + panic(err) + } +} + +func TestScenarios(t *testing.T) { + suite.Run(t, &ScenarioSuite{}) +} + +func (s *ScenarioSuite) TestSingleScenario() { + // scenario.RegisterScenario( + // scenario.Scenario{ + // Name: "mock_scenario", + // Steps: []scenario.ScenarioStep{ + // { + // Name: "step_one", + // ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + // return &flight.FlightInfo{FlightDescriptor: fd}, nil + // }}, + // }, + // }, + // }, + // ) + // defer scenario.UnregisterScenario("mock_scenario") + + srv := integration.NewIntegrationServer( + scenario.Scenario{ + Name: "mock_scenario", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + }, + }, + ) + + go srv.Serve(s.lis) + defer srv.GracefulStop() + + client := flight.NewFlightServiceClient(s.conn) + + desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} + info, err := client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().True(proto.Equal(&desc, info.FlightDescriptor)) +} + +func (s *ScenarioSuite) TestMultipleScenariosNoDisconnect() { + srv := integration.NewIntegrationServer( + scenario.Scenario{ + Name: "mock_scenario1", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + { + Name: "step_two", + ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + return &flight.SchemaResult{Schema: []byte("apparently a schema")}, nil + }}, + }, + }, + }, + scenario.Scenario{ + Name: "mock_scenario2", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + }, + }, + ) + + go srv.Serve(s.lis) + defer srv.GracefulStop() + + client := flight.NewFlightServiceClient(s.conn) + + // mock_scenario1, step_one + desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} + info, err := client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().True(proto.Equal(&desc, info.FlightDescriptor)) + + // mock_scenario1, step_two + schema, err := client.GetSchema(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().Equal([]byte("apparently a schema"), schema.Schema) + + // all steps in scenario1 have been completed successfully. + // + // the client acknowledge completion to the server by disconnecting + // before continuing to the next scenario. + + // mock_scenario2, step_one + // expect failure because the same client conn is in-use, signalling the client is still on the same scenario. + _, err = client.GetFlightInfo(s.ctx, &desc) + s.Require().ErrorContains(err, "expected previous client to disconnect before starting new scenario") +} + +func (s *ScenarioSuite) TestMultipleScenariosWithDisconnect() { + srv := integration.NewIntegrationServer( + scenario.Scenario{ + Name: "mock_scenario1", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + { + Name: "step_two", + ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + return &flight.SchemaResult{Schema: []byte("apparently a schema")}, nil + }}, + }, + }, + }, + scenario.Scenario{ + Name: "mock_scenario2", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + }, + }, + ) + + go srv.Serve(s.lis) + defer srv.GracefulStop() + + client := flight.NewFlightServiceClient(s.conn) + + // mock_scenario1, step_one + desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} + info, err := client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().True(proto.Equal(&desc, info.FlightDescriptor)) + + // mock_scenario1, step_two + schema, err := client.GetSchema(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().Equal([]byte("apparently a schema"), schema.Schema) + + // disconnect and reconnect to the server with a new client/conn to advance to the next scenario + s.Require().NoError(s.resetConn()) + client = flight.NewFlightServiceClient(s.conn) + + // mock_scenario2, step_one + _, err = client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) +} + +func (s *ScenarioSuite) TestMultipleScenariosWithError() { + srv := integration.NewIntegrationServer( + scenario.Scenario{ + Name: "mock_scenario1", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return nil, fmt.Errorf("gotcha!") + }}, + }, + { + Name: "step_two", + ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + return &flight.SchemaResult{Schema: []byte("apparently a schema")}, nil + }}, + }, + }, + }, + scenario.Scenario{ + Name: "mock_scenario2", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + }, + }, + ) + + go srv.Serve(s.lis) + defer srv.GracefulStop() + + client := flight.NewFlightServiceClient(s.conn) + + // mock_scenario1, step_one + desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} + info, err := client.GetFlightInfo(s.ctx, &desc) + s.Require().Error(err) + s.Require().Nil(info) + + // received an error from the server. we expected it here but might not in a real test. + // + // if the client-side assertions fail, client should disconnect + // and expect server to skip to next scenario on reconnect. + + // disconnect and reconnect to the server with a new client/conn to advance to the next scenario + s.Require().NoError(s.resetConn()) + client = flight.NewFlightServiceClient(s.conn) + + // expect server to skip to mock_scenario2 + _, err = client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) +} diff --git a/dev/flight-integration/scenario/server.go b/dev/flight-integration/scenario/server.go new file mode 100644 index 0000000000000..edc888f73c807 --- /dev/null +++ b/dev/flight-integration/scenario/server.go @@ -0,0 +1,296 @@ +package scenario + +import ( + "context" + "fmt" + "log" + + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/stats" + "google.golang.org/grpc/status" +) + +func NewScenarioServer(scenarios []Scenario) *scenarioServer { + server := scenarioServer{ + scenarios: scenarios, + clientDoneCh: make(chan struct{}, 1), + serverReadyCh: make(chan struct{}, 1), + } + server.serverReadyCh <- struct{}{} + + // TODO: maybe provide shutdown callback + go func() { + for { + <-server.clientDoneCh + + if !server.expectingClientReset { + server.FinishScenario() + } + server.expectingClientReset = false + + server.serverReadyCh <- struct{}{} + } + }() + + return &server +} + +type scenarioServer struct { + flight.UnimplementedFlightServiceServer + + scenarios []Scenario + + curScenario, curStep int + clientDoneCh, serverReadyCh chan struct{} + expectingClientReset, failed, done bool +} + +func (s *scenarioServer) CurrentScenario() (Scenario, error) { + if s.curScenario < len(s.scenarios) { + return s.scenarios[s.curScenario], nil + } + return Scenario{}, fmt.Errorf("no more scenarios to execute, all %d have already run", len(s.scenarios)) +} + +func (s *scenarioServer) CurrentStep() (Scenario, ScenarioStep, error) { + scenario, err := s.CurrentScenario() + if err != nil { + return Scenario{}, ScenarioStep{}, err + } + + if s.curStep < len(scenario.Steps) { + return scenario, scenario.Steps[s.curStep], nil + } + + return scenario, ScenarioStep{}, status.Errorf(codes.OutOfRange, "call number %d for scenario %s, only %d steps expected", s.curStep, scenario.Name, len(scenario.Steps)) +} + +func (s *scenarioServer) StartStep() (Scenario, ScenarioStep, error) { + if s.done { + return Scenario{}, ScenarioStep{}, fmt.Errorf("no more scenarios left to run") + } + + if s.expectingClientReset { + return Scenario{}, + ScenarioStep{}, + status.Errorf(codes.FailedPrecondition, "finished scenario \"%s\", waiting to start scenario \"%s\": %s", s.scenarios[s.curScenario-1].Name, s.scenarios[s.curScenario].Name, ErrExpectedClientDisconnect) + } + + return s.CurrentStep() +} + +func (s *scenarioServer) FinishStep() { + s.curStep++ + if s.failed || s.curStep == len(s.scenarios[s.curScenario].Steps) { + s.FinishScenario() + } +} + +func (s *scenarioServer) FinishScenario() { + s.curStep = 0 + s.expectingClientReset = true + s.failed = false + + s.curScenario++ + if s.curScenario == len(s.scenarios) { + log.Println("All scenarios completed") + s.done = true + } +} + +func (s *scenarioServer) Error(scenario, step, method string) error { + s.failed = true + return status.Errorf(codes.PermissionDenied, "%s should not be called for scenario: %s, step: %s", method, scenario, step) +} + +// DoAction implements flight.FlightServiceServer. +func (s *scenarioServer) DoAction(action *flight.Action, stream flight.FlightService_DoActionServer) error { + scenario, step, err := s.StartStep() + if err != nil { + return err + } + defer s.FinishStep() + + if step.ServerHandler.DoAction == nil { + return s.Error(scenario.Name, step.Name, "DoAction") + } + + return step.ServerHandler.DoAction(action, stream) +} + +// DoExchange implements flight.FlightServiceServer. +func (s *scenarioServer) DoExchange(stream flight.FlightService_DoExchangeServer) error { + scenario, step, err := s.StartStep() + if err != nil { + return err + } + defer s.FinishStep() + + if step.ServerHandler.DoExchange == nil { + return s.Error(scenario.Name, step.Name, "DoExchange") + } + + return step.ServerHandler.DoExchange(stream) +} + +// DoGet implements flight.FlightServiceServer. +func (s *scenarioServer) DoGet(ticket *flight.Ticket, stream flight.FlightService_DoGetServer) error { + scenario, step, err := s.StartStep() + if err != nil { + return err + } + defer s.FinishStep() + + if step.ServerHandler.DoGet == nil { + return s.Error(scenario.Name, step.Name, "DoGet") + } + + return step.ServerHandler.DoGet(ticket, stream) +} + +// DoPut implements flight.FlightServiceServer. +func (s *scenarioServer) DoPut(stream flight.FlightService_DoPutServer) error { + scenario, step, err := s.StartStep() + if err != nil { + return err + } + defer s.FinishStep() + + if step.ServerHandler.DoPut == nil { + return s.Error(scenario.Name, step.Name, "DoPut") + } + + return step.ServerHandler.DoPut(stream) +} + +// GetFlightInfo implements flight.FlightServiceServer. +func (s *scenarioServer) GetFlightInfo(ctx context.Context, desc *flight.FlightDescriptor) (*flight.FlightInfo, error) { + scenario, step, err := s.StartStep() + if err != nil { + return nil, err + } + defer s.FinishStep() + + if step.ServerHandler.GetFlightInfo == nil { + return nil, s.Error(scenario.Name, step.Name, "GetFlightInfo") + } + + return step.ServerHandler.GetFlightInfo(ctx, desc) +} + +// GetSchema implements flight.FlightServiceServer. +func (s *scenarioServer) GetSchema(ctx context.Context, desc *flight.FlightDescriptor) (*flight.SchemaResult, error) { + scenario, step, err := s.StartStep() + if err != nil { + return nil, err + } + defer s.FinishStep() + + if step.ServerHandler.GetSchema == nil { + return nil, s.Error(scenario.Name, step.Name, "GetSchema") + } + + return step.ServerHandler.GetSchema(ctx, desc) +} + +// Handshake implements flight.FlightServiceServer. +func (s *scenarioServer) Handshake(stream flight.FlightService_HandshakeServer) error { + scenario, step, err := s.StartStep() + if err != nil { + return err + } + defer s.FinishStep() + + if step.ServerHandler.Handshake == nil { + return s.Error(scenario.Name, step.Name, "Handshake") + } + + return step.ServerHandler.Handshake(stream) +} + +// ListActions implements flight.FlightServiceServer. +func (s *scenarioServer) ListActions(in *flight.Empty, stream flight.FlightService_ListActionsServer) error { + scenario, step, err := s.StartStep() + if err != nil { + return err + } + defer s.FinishStep() + + if step.ServerHandler.ListActions == nil { + return s.Error(scenario.Name, step.Name, "ListActions") + } + + return step.ServerHandler.ListActions(in, stream) +} + +// ListFlights implements flight.FlightServiceServer. +func (s *scenarioServer) ListFlights(in *flight.Criteria, stream flight.FlightService_ListFlightsServer) error { + scenario, step, err := s.StartStep() + if err != nil { + return err + } + defer s.FinishStep() + + if step.ServerHandler.ListFlights == nil { + return s.Error(scenario.Name, step.Name, "ListFlights") + } + + return step.ServerHandler.ListFlights(in, stream) +} + +// PollFlightInfo implements flight.FlightServiceServer. +func (s *scenarioServer) PollFlightInfo(ctx context.Context, desc *flight.FlightDescriptor) (*flight.PollInfo, error) { + scenario, step, err := s.StartStep() + if err != nil { + return nil, err + } + defer s.FinishStep() + + if step.ServerHandler.PollFlightInfo == nil { + return nil, s.Error(scenario.Name, step.Name, "PollFlightInfo") + } + + return step.ServerHandler.PollFlightInfo(ctx, desc) +} + +// HandleConn implements stats.Handler. +func (s *scenarioServer) HandleConn(ctx context.Context, connStats stats.ConnStats) { + switch connStats.(type) { + case *stats.ConnBegin: + log.Println("Begin conn") + select { + case <-s.serverReadyCh: + log.Println("conn acquired") + default: + log.Fatal("invalid state: only one client may connect to the integration server at a time") + } + + case *stats.ConnEnd: + log.Println("End conn") + select { + case s.clientDoneCh <- struct{}{}: + log.Println("conn restored") + default: + log.Fatal("invalid state: server recieved multiple disconnects but only supports one client") + } + } +} + +// HandleRPC implements stats.Handler. +func (s *scenarioServer) HandleRPC(ctx context.Context, rpcStats stats.RPCStats) {} + +// TagConn implements stats.Handler. +func (s *scenarioServer) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context { + return ctx +} + +// TagRPC implements stats.Handler. +func (s *scenarioServer) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context { + return ctx +} + +var ( + _ flight.FlightServiceServer = (*scenarioServer)(nil) + _ stats.Handler = (*scenarioServer)(nil) +) diff --git a/dev/flight-integration/server.go b/dev/flight-integration/server.go new file mode 100644 index 0000000000000..3050dd9a48d6d --- /dev/null +++ b/dev/flight-integration/server.go @@ -0,0 +1,17 @@ +package integration + +import ( + "integration/scenario" + + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" + "google.golang.org/grpc" +) + +func NewIntegrationServer(scenarios ...scenario.Scenario) *grpc.Server { + server := scenario.NewScenarioServer(scenarios) + + srv := grpc.NewServer(grpc.StatsHandler(server)) + flight.RegisterFlightServiceServer(srv, server) + + return srv +} diff --git a/dev/flight-integration/server_test.go b/dev/flight-integration/server_test.go new file mode 100644 index 0000000000000..c1bfc5609cf30 --- /dev/null +++ b/dev/flight-integration/server_test.go @@ -0,0 +1,40 @@ +package integration_test + +import ( + "context" + "integration" + "integration/scenario" + "net" + "testing" + + "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/test/bufconn" + + _ "integration/cases" +) + +func TestIntegrationClientAndServer(t *testing.T) { + lis := bufconn.Listen(1024 * 1024) + + scenarios, err := scenario.GetAllScenarios() + require.NoError(t, err) + + srv := integration.NewIntegrationServer(scenarios...) + require.NoError(t, err) + + go srv.Serve(lis) + defer srv.GracefulStop() + + dialer := func() (conn *grpc.ClientConn, err error) { + return grpc.NewClient( + "passthrough://", + grpc.WithContextDialer(func(ctx context.Context, str string) (net.Conn, error) { return lis.DialContext(ctx) }), + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) + } + + runner := scenario.NewScenarioRunner(scenarios) + require.NoError(t, runner.RunScenarios(dialer)) +} diff --git a/dev/flight-integration/tester/tester.go b/dev/flight-integration/tester/tester.go new file mode 100644 index 0000000000000..d4817c1a187db --- /dev/null +++ b/dev/flight-integration/tester/tester.go @@ -0,0 +1,50 @@ +package tester + +import ( + "fmt" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +const RequirementFailedMsg = "tester: requirement failed" + +func NewTester() *Tester { + req := requireT{} + return &Tester{req: &req, assert: assert.New(&req), require: require.New(&req)} +} + +type Tester struct { + req *requireT + + assert *assert.Assertions + require *require.Assertions +} + +func (t *Tester) Errors() []error { + return t.req.errors +} + +func (t *Tester) Assert() *assert.Assertions { + return t.assert +} + +func (t *Tester) Require() *require.Assertions { + return t.require +} + +type requireT struct { + errors []error +} + +// FailNow implements require.TestingT. +func (a *requireT) FailNow() { + panic(RequirementFailedMsg) +} + +// Errorf implements assert.TestingT. +func (a *requireT) Errorf(format string, args ...interface{}) { + a.errors = append(a.errors, fmt.Errorf(format, args...)) +} + +var _ require.TestingT = (*requireT)(nil) From 600f92950d01911bace78791888c36dd66f24cf1 Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Fri, 13 Sep 2024 16:08:28 -0400 Subject: [PATCH 02/12] add auth scenario + more cleanup --- .../cases/auth:basic_proto.go | 121 ++++++++ ...ection.go => location:reuse_connection.go} | 4 +- .../cases/poll_flight_info.go | 4 +- .../arrow-flight-integration-client/main.go | 2 +- dev/flight-integration/scenario/runner.go | 22 +- dev/flight-integration/scenario/scenario.go | 15 +- .../scenario/scenario_test.go | 263 ++--------------- dev/flight-integration/scenario/server.go | 44 ++- .../scenario/server_test.go | 268 ++++++++++++++++++ dev/flight-integration/server.go | 2 +- dev/flight-integration/server_test.go | 4 +- 11 files changed, 480 insertions(+), 269 deletions(-) create mode 100644 dev/flight-integration/cases/auth:basic_proto.go rename dev/flight-integration/cases/{location_reuse_connection.go => location:reuse_connection.go} (96%) create mode 100644 dev/flight-integration/scenario/server_test.go diff --git a/dev/flight-integration/cases/auth:basic_proto.go b/dev/flight-integration/cases/auth:basic_proto.go new file mode 100644 index 0000000000000..e9b68798c3607 --- /dev/null +++ b/dev/flight-integration/cases/auth:basic_proto.go @@ -0,0 +1,121 @@ +package cases + +import ( + "context" + "fmt" + "integration/scenario" + "integration/tester" + "io" + + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +func init() { + var ( + username = "arrow" + password = "flight" + authHeader = "auth-token-bin" + token = username + ) + + scenario.Register( + scenario.Scenario{ + Name: "auth:basic_proto", + Steps: []scenario.ScenarioStep{ + { + Name: "unauthenticated_action", + ServerHandler: scenario.Handler{DoAction: func(a *flight.Action, fs flight.FlightService_DoActionServer) error { + return status.Error(codes.Unauthenticated, "no token") + }}, + }, + { + Name: "auth_handshake", + ServerHandler: scenario.Handler{Handshake: func(fs flight.FlightService_HandshakeServer) error { + + in, err := fs.Recv() + if err != nil { + return err + } + + var incoming flight.BasicAuth + if err = proto.Unmarshal(in.Payload, &incoming); err != nil { + return err + } + + if incoming.Username != username { + return fmt.Errorf("incorrect username for auth: expected: %s, got: %s", username, incoming.Username) + } + + if incoming.Password != password { + return fmt.Errorf("incorrect password for auth: expected: %s, got: %s", password, incoming.Password) + } + + return fs.Send(&flight.HandshakeResponse{Payload: []byte(token)}) + }}, + }, + { + Name: "authenticated_action", + ServerHandler: scenario.Handler{DoAction: func(a *flight.Action, fs flight.FlightService_DoActionServer) error { + md, ok := metadata.FromIncomingContext(fs.Context()) + if !ok { + return fmt.Errorf("auth metadata not present") + } + + vals := md.Get(authHeader) + if len(vals) != 1 { + return fmt.Errorf("expected 1 token value for header \"%s\" but found %d: %s", authHeader, len(vals), vals) + } + + if vals[0] != token { + return fmt.Errorf("invalid token: expected %s, got %s", token, vals[0]) + } + + return fs.Send(&flight.Result{Body: []byte(token)}) + }}, + }, + }, + RunClient: func(ctx context.Context, client flight.FlightServiceClient, t *tester.Tester) { + actionStream, err := client.DoAction(ctx, &flight.Action{}) + t.Require().NoError(err) + + _, err = actionStream.Recv() + st, ok := status.FromError(err) + t.Require().True(ok, "failed to extract grpc status from stream error") + t.Assert().Equalf(codes.Unauthenticated, st.Code(), "expected stream error: %s, got: %s", codes.Unauthenticated, st.Code()) + + handshakeStream, err := client.Handshake(ctx) + t.Require().NoError(err) + + b, err := proto.Marshal(&flight.BasicAuth{Username: username, Password: password}) + t.Require().NoError(err) + + t.Require().NoError(handshakeStream.Send(&flight.HandshakeRequest{Payload: b})) + + in, err := handshakeStream.Recv() + t.Require().NoError(err) + + _, err = handshakeStream.Recv() + t.Require().ErrorIs(err, io.EOF, "handshake result stream had too many entries") + t.Require().NoError(handshakeStream.CloseSend()) + + ctx = metadata.NewOutgoingContext(ctx, metadata.New(map[string]string{authHeader: string(in.Payload)})) + actionStream, err = client.DoAction(ctx, &flight.Action{}) + t.Require().NoError(err) + + res, err := actionStream.Recv() + t.Require().NoError(err) + + t.Assert().Equal([]byte(token), res.Body) + + _, err = actionStream.Recv() + t.Require().ErrorIs(err, io.EOF, "action result stream had too many entries") + t.Require().NoError(actionStream.CloseSend()) + + }, + }, + ) +} diff --git a/dev/flight-integration/cases/location_reuse_connection.go b/dev/flight-integration/cases/location:reuse_connection.go similarity index 96% rename from dev/flight-integration/cases/location_reuse_connection.go rename to dev/flight-integration/cases/location:reuse_connection.go index bcb0df1f43264..732858b70f5c4 100644 --- a/dev/flight-integration/cases/location_reuse_connection.go +++ b/dev/flight-integration/cases/location:reuse_connection.go @@ -1,4 +1,4 @@ -package scenario +package cases import ( "context" @@ -9,7 +9,7 @@ import ( ) func init() { - scenario.RegisterScenario( + scenario.Register( scenario.Scenario{ Name: "location:reuse_connection", Steps: []scenario.ScenarioStep{ diff --git a/dev/flight-integration/cases/poll_flight_info.go b/dev/flight-integration/cases/poll_flight_info.go index 585f854388687..9bd1a52755169 100644 --- a/dev/flight-integration/cases/poll_flight_info.go +++ b/dev/flight-integration/cases/poll_flight_info.go @@ -1,4 +1,4 @@ -package scenario +package cases import ( "context" @@ -13,7 +13,7 @@ import ( ) func init() { - scenario.RegisterScenario( + scenario.Register( scenario.Scenario{ Name: "poll_flight_info", Steps: []scenario.ScenarioStep{ diff --git a/dev/flight-integration/cmd/arrow-flight-integration-client/main.go b/dev/flight-integration/cmd/arrow-flight-integration-client/main.go index 09eb1285bb8e5..aaa01093b7bbe 100644 --- a/dev/flight-integration/cmd/arrow-flight-integration-client/main.go +++ b/dev/flight-integration/cmd/arrow-flight-integration-client/main.go @@ -33,7 +33,7 @@ func main() { return grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) } - runner := scenario.NewScenarioRunner(scenarios) + runner := scenario.NewRunner(scenarios) if err := runner.RunScenarios(dialServer); err != nil { log.Fatal(err) } diff --git a/dev/flight-integration/scenario/runner.go b/dev/flight-integration/scenario/runner.go index cc22fbca7bfd1..3b68ae6524f0f 100644 --- a/dev/flight-integration/scenario/runner.go +++ b/dev/flight-integration/scenario/runner.go @@ -5,12 +5,13 @@ import ( "errors" "fmt" "integration/tester" + "strings" "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/grpc" ) -func NewScenarioRunner(scenarios []Scenario) *ScenarioRunner { +func NewRunner(scenarios []Scenario) *ScenarioRunner { return &ScenarioRunner{scenarios: scenarios, results: make(map[string]error, len(scenarios))} } @@ -20,7 +21,7 @@ type ScenarioRunner struct { results map[string]error } -func (r *ScenarioRunner) RunScenario(scenario Scenario, newConnFn func() (conn *grpc.ClientConn, err error)) (err error) { +func (r *ScenarioRunner) runScenario(scenario Scenario, newConnFn func() (conn *grpc.ClientConn, err error)) (err error) { conn, err := newConnFn() if err != nil { return err @@ -32,7 +33,7 @@ func (r *ScenarioRunner) RunScenario(scenario Scenario, newConnFn func() (conn * t := tester.NewTester() defer func() { - err = errors.Join(t.Errors()...) + err = processErrors(t.Errors()) r := recover() if r == tester.RequirementFailedMsg { return @@ -50,7 +51,7 @@ func (r *ScenarioRunner) RunScenario(scenario Scenario, newConnFn func() (conn * func (r *ScenarioRunner) RunScenarios(newConnFn func() (conn *grpc.ClientConn, err error)) error { var err error for _, scenario := range r.scenarios { - if err := r.RunScenario(scenario, newConnFn); err != nil { + if err := r.runScenario(scenario, newConnFn); err != nil { r.results[scenario.Name] = err } } @@ -61,3 +62,16 @@ func (r *ScenarioRunner) RunScenarios(newConnFn func() (conn *grpc.ClientConn, e return err } + +func processErrors(errs []error) error { + res := make([]error, len(errs)) + for i, err := range errs { + switch { + case strings.Contains(err.Error(), msgExpectedClientDisconnect): + res[i] = fmt.Errorf("client made too many RPC calls, server closed the scenario before the client was done") + default: + res[i] = err + } + } + return errors.Join(res...) +} diff --git a/dev/flight-integration/scenario/scenario.go b/dev/flight-integration/scenario/scenario.go index 40d91bb460216..d785377333aab 100644 --- a/dev/flight-integration/scenario/scenario.go +++ b/dev/flight-integration/scenario/scenario.go @@ -2,7 +2,6 @@ package scenario import ( "context" - "errors" "fmt" "integration/tester" "sync" @@ -10,16 +9,12 @@ import ( "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" ) -var ( - ErrExpectedClientDisconnect = errors.New("expected previous client to disconnect before starting new scenario") -) - var ( scenariosMu sync.RWMutex scenarios = make(map[string]Scenario) ) -func RegisterScenario(scenario Scenario) { +func Register(scenario Scenario) { scenariosMu.Lock() defer scenariosMu.Unlock() @@ -29,7 +24,7 @@ func RegisterScenario(scenario Scenario) { scenarios[scenario.Name] = scenario } -func UnregisterScenario(scenario string) { +func Unregister(scenario string) { scenariosMu.Lock() defer scenariosMu.Unlock() @@ -42,6 +37,10 @@ func UnregisterScenario(scenario string) { } func GetScenarios(names ...string) ([]Scenario, error) { + if len(names) == 0 { + return getAllScenarios() + } + res := make([]Scenario, len(names)) scenariosMu.RLock() @@ -59,7 +58,7 @@ func GetScenarios(names ...string) ([]Scenario, error) { return res, nil } -func GetAllScenarios() ([]Scenario, error) { +func getAllScenarios() ([]Scenario, error) { scenariosMu.RLock() defer scenariosMu.RUnlock() diff --git a/dev/flight-integration/scenario/scenario_test.go b/dev/flight-integration/scenario/scenario_test.go index 5ef2fa399b00c..35a4a91ec7b35 100644 --- a/dev/flight-integration/scenario/scenario_test.go +++ b/dev/flight-integration/scenario/scenario_test.go @@ -2,134 +2,18 @@ package scenario_test import ( "context" - "fmt" - "integration" "integration/scenario" - "net" "testing" "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" - "github.com/stretchr/testify/suite" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/test/bufconn" - "google.golang.org/protobuf/proto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) -type ScenarioSuite struct { - suite.Suite - - ctx context.Context - lis *bufconn.Listener - conn *grpc.ClientConn -} - -func createConn(lis *bufconn.Listener) (*grpc.ClientConn, error) { - return grpc.NewClient( - "passthrough://", - grpc.WithContextDialer(func(ctx context.Context, str string) (net.Conn, error) { return lis.DialContext(ctx) }), - grpc.WithTransportCredentials(insecure.NewCredentials()), - ) -} - -func (s *ScenarioSuite) closeConn() error { return s.conn.Close() } - -func (s *ScenarioSuite) resetConn() error { - var err error - if err = s.closeConn(); err != nil { - return err - } - - s.conn, err = createConn(s.lis) - return err -} - -func (s *ScenarioSuite) SetupTest() { - lis := bufconn.Listen(1024 * 1024) - conn, err := createConn(lis) - if err != nil { - panic(err) - } - - s.ctx = context.Background() - s.lis = lis - s.conn = conn -} - -func (s *ScenarioSuite) TearDownTest() { - s.ctx = nil - s.lis = nil - if err := s.closeConn(); err != nil { - panic(err) - } -} - -func TestScenarios(t *testing.T) { - suite.Run(t, &ScenarioSuite{}) -} - -func (s *ScenarioSuite) TestSingleScenario() { - // scenario.RegisterScenario( - // scenario.Scenario{ - // Name: "mock_scenario", - // Steps: []scenario.ScenarioStep{ - // { - // Name: "step_one", - // ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { - // return &flight.FlightInfo{FlightDescriptor: fd}, nil - // }}, - // }, - // }, - // }, - // ) - // defer scenario.UnregisterScenario("mock_scenario") - - srv := integration.NewIntegrationServer( - scenario.Scenario{ - Name: "mock_scenario", - Steps: []scenario.ScenarioStep{ - { - Name: "step_one", - ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { - return &flight.FlightInfo{FlightDescriptor: fd}, nil - }}, - }, - }, - }, - ) - - go srv.Serve(s.lis) - defer srv.GracefulStop() - - client := flight.NewFlightServiceClient(s.conn) - - desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} - info, err := client.GetFlightInfo(s.ctx, &desc) - s.Require().NoError(err) - s.Assert().True(proto.Equal(&desc, info.FlightDescriptor)) -} - -func (s *ScenarioSuite) TestMultipleScenariosNoDisconnect() { - srv := integration.NewIntegrationServer( +func TestRegisterScenarios(t *testing.T) { + scenario.Register( scenario.Scenario{ Name: "mock_scenario1", - Steps: []scenario.ScenarioStep{ - { - Name: "step_one", - ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { - return &flight.FlightInfo{FlightDescriptor: fd}, nil - }}, - }, - { - Name: "step_two", - ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { - return &flight.SchemaResult{Schema: []byte("apparently a schema")}, nil - }}, - }, - }, - }, - scenario.Scenario{ - Name: "mock_scenario2", Steps: []scenario.ScenarioStep{ { Name: "step_one", @@ -140,53 +24,9 @@ func (s *ScenarioSuite) TestMultipleScenariosNoDisconnect() { }, }, ) + defer scenario.Unregister("mock_scenario1") - go srv.Serve(s.lis) - defer srv.GracefulStop() - - client := flight.NewFlightServiceClient(s.conn) - - // mock_scenario1, step_one - desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} - info, err := client.GetFlightInfo(s.ctx, &desc) - s.Require().NoError(err) - s.Assert().True(proto.Equal(&desc, info.FlightDescriptor)) - - // mock_scenario1, step_two - schema, err := client.GetSchema(s.ctx, &desc) - s.Require().NoError(err) - s.Assert().Equal([]byte("apparently a schema"), schema.Schema) - - // all steps in scenario1 have been completed successfully. - // - // the client acknowledge completion to the server by disconnecting - // before continuing to the next scenario. - - // mock_scenario2, step_one - // expect failure because the same client conn is in-use, signalling the client is still on the same scenario. - _, err = client.GetFlightInfo(s.ctx, &desc) - s.Require().ErrorContains(err, "expected previous client to disconnect before starting new scenario") -} - -func (s *ScenarioSuite) TestMultipleScenariosWithDisconnect() { - srv := integration.NewIntegrationServer( - scenario.Scenario{ - Name: "mock_scenario1", - Steps: []scenario.ScenarioStep{ - { - Name: "step_one", - ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { - return &flight.FlightInfo{FlightDescriptor: fd}, nil - }}, - }, - { - Name: "step_two", - ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { - return &flight.SchemaResult{Schema: []byte("apparently a schema")}, nil - }}, - }, - }, - }, + scenario.Register( scenario.Scenario{ Name: "mock_scenario2", Steps: []scenario.ScenarioStep{ @@ -199,85 +39,24 @@ func (s *ScenarioSuite) TestMultipleScenariosWithDisconnect() { }, }, ) + defer scenario.Unregister("mock_scenario2") - go srv.Serve(s.lis) - defer srv.GracefulStop() - - client := flight.NewFlightServiceClient(s.conn) - - // mock_scenario1, step_one - desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} - info, err := client.GetFlightInfo(s.ctx, &desc) - s.Require().NoError(err) - s.Assert().True(proto.Equal(&desc, info.FlightDescriptor)) - - // mock_scenario1, step_two - schema, err := client.GetSchema(s.ctx, &desc) - s.Require().NoError(err) - s.Assert().Equal([]byte("apparently a schema"), schema.Schema) - - // disconnect and reconnect to the server with a new client/conn to advance to the next scenario - s.Require().NoError(s.resetConn()) - client = flight.NewFlightServiceClient(s.conn) - - // mock_scenario2, step_one - _, err = client.GetFlightInfo(s.ctx, &desc) - s.Require().NoError(err) -} - -func (s *ScenarioSuite) TestMultipleScenariosWithError() { - srv := integration.NewIntegrationServer( - scenario.Scenario{ - Name: "mock_scenario1", - Steps: []scenario.ScenarioStep{ - { - Name: "step_one", - ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { - return nil, fmt.Errorf("gotcha!") - }}, - }, - { - Name: "step_two", - ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { - return &flight.SchemaResult{Schema: []byte("apparently a schema")}, nil - }}, - }, - }, - }, - scenario.Scenario{ - Name: "mock_scenario2", - Steps: []scenario.ScenarioStep{ - { - Name: "step_one", - ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { - return &flight.FlightInfo{FlightDescriptor: fd}, nil - }}, - }, - }, - }, - ) - - go srv.Serve(s.lis) - defer srv.GracefulStop() - - client := flight.NewFlightServiceClient(s.conn) + scenarios, err := scenario.GetScenarios("mock_scenario1") + require.NoError(t, err) + assert.Len(t, scenarios, 1) - // mock_scenario1, step_one - desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} - info, err := client.GetFlightInfo(s.ctx, &desc) - s.Require().Error(err) - s.Require().Nil(info) + scenarios, err = scenario.GetScenarios("mock_scenario2") + require.NoError(t, err) + assert.Len(t, scenarios, 1) - // received an error from the server. we expected it here but might not in a real test. - // - // if the client-side assertions fail, client should disconnect - // and expect server to skip to next scenario on reconnect. + scenarios, err = scenario.GetScenarios("mock_scenario1", "mock_scenario2") + require.NoError(t, err) + assert.Len(t, scenarios, 2) - // disconnect and reconnect to the server with a new client/conn to advance to the next scenario - s.Require().NoError(s.resetConn()) - client = flight.NewFlightServiceClient(s.conn) + scenarios, err = scenario.GetScenarios() + require.NoError(t, err) + assert.Len(t, scenarios, 2) - // expect server to skip to mock_scenario2 - _, err = client.GetFlightInfo(s.ctx, &desc) - s.Require().NoError(err) + _, err = scenario.GetScenarios("fake_scenario") + require.Error(t, err) } diff --git a/dev/flight-integration/scenario/server.go b/dev/flight-integration/scenario/server.go index edc888f73c807..f0ba50c10edba 100644 --- a/dev/flight-integration/scenario/server.go +++ b/dev/flight-integration/scenario/server.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "log" + "strings" "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/grpc/codes" @@ -11,25 +12,39 @@ import ( "google.golang.org/grpc/status" ) -func NewScenarioServer(scenarios []Scenario) *scenarioServer { +var ( + msgExpectedClientDisconnect = "expected previous client to disconnect before starting new scenario" +) + +func NewServer(scenarios []Scenario) *scenarioServer { + ctx, cancel := context.WithCancel(context.Background()) server := scenarioServer{ scenarios: scenarios, + ctx: ctx, + cancel: cancel, clientDoneCh: make(chan struct{}, 1), serverReadyCh: make(chan struct{}, 1), } server.serverReadyCh <- struct{}{} - // TODO: maybe provide shutdown callback go func() { for { - <-server.clientDoneCh + select { + case <-server.clientDoneCh: + case <-ctx.Done(): + return + } if !server.expectingClientReset { server.FinishScenario() } server.expectingClientReset = false - server.serverReadyCh <- struct{}{} + select { + case server.serverReadyCh <- struct{}{}: + case <-ctx.Done(): + return + } } }() @@ -41,16 +56,20 @@ type scenarioServer struct { scenarios []Scenario + ctx context.Context + cancel context.CancelFunc + curScenario, curStep int clientDoneCh, serverReadyCh chan struct{} expectingClientReset, failed, done bool + incompleteScenarios []string } func (s *scenarioServer) CurrentScenario() (Scenario, error) { if s.curScenario < len(s.scenarios) { return s.scenarios[s.curScenario], nil } - return Scenario{}, fmt.Errorf("no more scenarios to execute, all %d have already run", len(s.scenarios)) + return Scenario{}, status.Errorf(codes.OutOfRange, "no more scenarios to execute, all %d have already run", len(s.scenarios)) } func (s *scenarioServer) CurrentStep() (Scenario, ScenarioStep, error) { @@ -74,7 +93,7 @@ func (s *scenarioServer) StartStep() (Scenario, ScenarioStep, error) { if s.expectingClientReset { return Scenario{}, ScenarioStep{}, - status.Errorf(codes.FailedPrecondition, "finished scenario \"%s\", waiting to start scenario \"%s\": %s", s.scenarios[s.curScenario-1].Name, s.scenarios[s.curScenario].Name, ErrExpectedClientDisconnect) + status.Errorf(codes.FailedPrecondition, "finished scenario \"%s\", waiting to start scenario \"%s\": %s", s.scenarios[s.curScenario-1].Name, s.scenarios[s.curScenario].Name, msgExpectedClientDisconnect) } return s.CurrentStep() @@ -88,14 +107,25 @@ func (s *scenarioServer) FinishStep() { } func (s *scenarioServer) FinishScenario() { + if s.curStep < len(s.scenarios[s.curScenario].Steps) && !s.failed { + scenario := s.scenarios[s.curScenario] + step := scenario.Steps[s.curStep] + s.incompleteScenarios = append(s.incompleteScenarios, fmt.Sprintf("%s/%s", scenario.Name, step.Name)) + } + s.curStep = 0 s.expectingClientReset = true s.failed = false s.curScenario++ if s.curScenario == len(s.scenarios) { - log.Println("All scenarios completed") s.done = true + s.cancel() + + log.Println("All scenarios completed") + if len(s.incompleteScenarios) > 0 { + log.Printf("Execution did not complete for the following scenario/steps: [ %s ]\n", strings.Join(s.incompleteScenarios, ", ")) + } } } diff --git a/dev/flight-integration/scenario/server_test.go b/dev/flight-integration/scenario/server_test.go new file mode 100644 index 0000000000000..da6ef8affe864 --- /dev/null +++ b/dev/flight-integration/scenario/server_test.go @@ -0,0 +1,268 @@ +package scenario_test + +import ( + "context" + "fmt" + "integration" + "integration/scenario" + "net" + "testing" + + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" + "github.com/stretchr/testify/suite" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/test/bufconn" + "google.golang.org/protobuf/proto" +) + +type ServerSuite struct { + suite.Suite + + ctx context.Context + lis *bufconn.Listener + conn *grpc.ClientConn +} + +func createConn(lis *bufconn.Listener) (*grpc.ClientConn, error) { + return grpc.NewClient( + "passthrough://", + grpc.WithContextDialer(func(ctx context.Context, str string) (net.Conn, error) { return lis.DialContext(ctx) }), + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) +} + +func (s *ServerSuite) closeConn() error { return s.conn.Close() } + +func (s *ServerSuite) resetConn() error { + var err error + if err = s.closeConn(); err != nil { + return err + } + + s.conn, err = createConn(s.lis) + return err +} + +func (s *ServerSuite) SetupTest() { + lis := bufconn.Listen(1024 * 1024) + conn, err := createConn(lis) + if err != nil { + panic(err) + } + + s.ctx = context.Background() + s.lis = lis + s.conn = conn +} + +func (s *ServerSuite) TearDownTest() { + s.ctx = nil + s.lis = nil + if err := s.closeConn(); err != nil { + panic(err) + } +} + +func TestServer(t *testing.T) { + suite.Run(t, &ServerSuite{}) +} + +func (s *ServerSuite) TestSingleScenario() { + srv := integration.NewIntegrationServer( + scenario.Scenario{ + Name: "mock_scenario", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + }, + }, + ) + + go srv.Serve(s.lis) + defer srv.GracefulStop() + + client := flight.NewFlightServiceClient(s.conn) + + desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} + info, err := client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().True(proto.Equal(&desc, info.FlightDescriptor)) +} + +func (s *ServerSuite) TestMultipleScenariosNoDisconnect() { + srv := integration.NewIntegrationServer( + scenario.Scenario{ + Name: "mock_scenario1", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + { + Name: "step_two", + ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + return &flight.SchemaResult{Schema: []byte("apparently a schema")}, nil + }}, + }, + }, + }, + scenario.Scenario{ + Name: "mock_scenario2", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + }, + }, + ) + + go srv.Serve(s.lis) + defer srv.GracefulStop() + + client := flight.NewFlightServiceClient(s.conn) + + // mock_scenario1, step_one + desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} + info, err := client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().True(proto.Equal(&desc, info.FlightDescriptor)) + + // mock_scenario1, step_two + schema, err := client.GetSchema(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().Equal([]byte("apparently a schema"), schema.Schema) + + // all steps in scenario1 have been completed successfully. + // + // the client acknowledge completion to the server by disconnecting + // before continuing to the next scenario. + + // mock_scenario2, step_one + // expect failure because the same client conn is in-use, signalling the client is still on the same scenario. + _, err = client.GetFlightInfo(s.ctx, &desc) + s.Require().ErrorContains(err, "expected previous client to disconnect before starting new scenario") +} + +func (s *ServerSuite) TestMultipleScenariosWithDisconnect() { + srv := integration.NewIntegrationServer( + scenario.Scenario{ + Name: "mock_scenario1", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + { + Name: "step_two", + ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + return &flight.SchemaResult{Schema: []byte("apparently a schema")}, nil + }}, + }, + }, + }, + scenario.Scenario{ + Name: "mock_scenario2", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + }, + }, + ) + + go srv.Serve(s.lis) + defer srv.GracefulStop() + + client := flight.NewFlightServiceClient(s.conn) + + // mock_scenario1, step_one + desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} + info, err := client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().True(proto.Equal(&desc, info.FlightDescriptor)) + + // mock_scenario1, step_two + schema, err := client.GetSchema(s.ctx, &desc) + s.Require().NoError(err) + s.Assert().Equal([]byte("apparently a schema"), schema.Schema) + + // disconnect and reconnect to the server with a new client/conn to advance to the next scenario + s.Require().NoError(s.resetConn()) + client = flight.NewFlightServiceClient(s.conn) + + // mock_scenario2, step_one + _, err = client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) +} + +func (s *ServerSuite) TestMultipleScenariosWithError() { + srv := integration.NewIntegrationServer( + scenario.Scenario{ + Name: "mock_scenario1", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return nil, fmt.Errorf("gotcha!") + }}, + }, + { + Name: "step_two", + ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + return &flight.SchemaResult{Schema: []byte("apparently a schema")}, nil + }}, + }, + }, + }, + scenario.Scenario{ + Name: "mock_scenario2", + Steps: []scenario.ScenarioStep{ + { + Name: "step_one", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{FlightDescriptor: fd}, nil + }}, + }, + }, + }, + ) + + go srv.Serve(s.lis) + defer srv.GracefulStop() + + client := flight.NewFlightServiceClient(s.conn) + + // mock_scenario1, step_one + desc := flight.FlightDescriptor{Type: flight.FlightDescriptor_CMD, Cmd: []byte("the_command")} + info, err := client.GetFlightInfo(s.ctx, &desc) + s.Require().Error(err) + s.Require().Nil(info) + + // received an error from the server. we expected it here but might not in a real test. + // + // if the client-side assertions fail, client should disconnect + // and expect server to skip to next scenario on reconnect. + + // disconnect and reconnect to the server with a new client/conn to advance to the next scenario + s.Require().NoError(s.resetConn()) + client = flight.NewFlightServiceClient(s.conn) + + // expect server to skip to mock_scenario2 + _, err = client.GetFlightInfo(s.ctx, &desc) + s.Require().NoError(err) +} diff --git a/dev/flight-integration/server.go b/dev/flight-integration/server.go index 3050dd9a48d6d..8bac27b81cbf4 100644 --- a/dev/flight-integration/server.go +++ b/dev/flight-integration/server.go @@ -8,7 +8,7 @@ import ( ) func NewIntegrationServer(scenarios ...scenario.Scenario) *grpc.Server { - server := scenario.NewScenarioServer(scenarios) + server := scenario.NewServer(scenarios) srv := grpc.NewServer(grpc.StatsHandler(server)) flight.RegisterFlightServiceServer(srv, server) diff --git a/dev/flight-integration/server_test.go b/dev/flight-integration/server_test.go index c1bfc5609cf30..441f7c478cd32 100644 --- a/dev/flight-integration/server_test.go +++ b/dev/flight-integration/server_test.go @@ -18,7 +18,7 @@ import ( func TestIntegrationClientAndServer(t *testing.T) { lis := bufconn.Listen(1024 * 1024) - scenarios, err := scenario.GetAllScenarios() + scenarios, err := scenario.GetScenarios() require.NoError(t, err) srv := integration.NewIntegrationServer(scenarios...) @@ -35,6 +35,6 @@ func TestIntegrationClientAndServer(t *testing.T) { ) } - runner := scenario.NewScenarioRunner(scenarios) + runner := scenario.NewRunner(scenarios) require.NoError(t, runner.RunScenarios(dialer)) } From 13d0e04d03d3be7ed149d3cd997d30f298695bda Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Fri, 13 Sep 2024 16:12:09 -0400 Subject: [PATCH 03/12] change module name --- dev/flight-integration/cases/auth:basic_proto.go | 5 +++-- dev/flight-integration/cases/location:reuse_connection.go | 5 +++-- dev/flight-integration/cases/poll_flight_info.go | 5 +++-- .../cmd/arrow-flight-integration-client/main.go | 4 ++-- .../cmd/arrow-flight-integration-server/main.go | 7 ++++--- dev/flight-integration/go.mod | 2 +- dev/flight-integration/scenario/runner.go | 3 ++- dev/flight-integration/scenario/scenario.go | 3 ++- dev/flight-integration/scenario/scenario_test.go | 3 ++- dev/flight-integration/scenario/server_test.go | 5 +++-- dev/flight-integration/server.go | 2 +- dev/flight-integration/server_test.go | 7 ++++--- 12 files changed, 30 insertions(+), 21 deletions(-) diff --git a/dev/flight-integration/cases/auth:basic_proto.go b/dev/flight-integration/cases/auth:basic_proto.go index e9b68798c3607..e18f1972ea6bb 100644 --- a/dev/flight-integration/cases/auth:basic_proto.go +++ b/dev/flight-integration/cases/auth:basic_proto.go @@ -3,10 +3,11 @@ package cases import ( "context" "fmt" - "integration/scenario" - "integration/tester" "io" + "github.com/apache/arrow/dev/flight-integration/scenario" + "github.com/apache/arrow/dev/flight-integration/tester" + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/dev/flight-integration/cases/location:reuse_connection.go b/dev/flight-integration/cases/location:reuse_connection.go index 732858b70f5c4..2885cd1685cbb 100644 --- a/dev/flight-integration/cases/location:reuse_connection.go +++ b/dev/flight-integration/cases/location:reuse_connection.go @@ -2,8 +2,9 @@ package cases import ( "context" - "integration/scenario" - "integration/tester" + + "github.com/apache/arrow/dev/flight-integration/scenario" + "github.com/apache/arrow/dev/flight-integration/tester" "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" ) diff --git a/dev/flight-integration/cases/poll_flight_info.go b/dev/flight-integration/cases/poll_flight_info.go index 9bd1a52755169..108f2c747b5f1 100644 --- a/dev/flight-integration/cases/poll_flight_info.go +++ b/dev/flight-integration/cases/poll_flight_info.go @@ -3,11 +3,12 @@ package cases import ( "context" "fmt" - "integration/scenario" - "integration/tester" "math" "time" + "github.com/apache/arrow/dev/flight-integration/scenario" + "github.com/apache/arrow/dev/flight-integration/tester" + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/dev/flight-integration/cmd/arrow-flight-integration-client/main.go b/dev/flight-integration/cmd/arrow-flight-integration-client/main.go index aaa01093b7bbe..8c243050f28a2 100644 --- a/dev/flight-integration/cmd/arrow-flight-integration-client/main.go +++ b/dev/flight-integration/cmd/arrow-flight-integration-client/main.go @@ -9,8 +9,8 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - _ "integration/cases" - "integration/scenario" + _ "github.com/apache/arrow/dev/flight-integration/cases" + "github.com/apache/arrow/dev/flight-integration/scenario" ) var ( diff --git a/dev/flight-integration/cmd/arrow-flight-integration-server/main.go b/dev/flight-integration/cmd/arrow-flight-integration-server/main.go index 3abb639a9cfc8..dabb9641846ec 100644 --- a/dev/flight-integration/cmd/arrow-flight-integration-server/main.go +++ b/dev/flight-integration/cmd/arrow-flight-integration-server/main.go @@ -3,13 +3,14 @@ package main import ( "flag" "fmt" - "integration" "log" "net" "strings" - _ "integration/cases" - "integration/scenario" + integration "github.com/apache/arrow/dev/flight-integration" + + _ "github.com/apache/arrow/dev/flight-integration/cases" + "github.com/apache/arrow/dev/flight-integration/scenario" ) var ( diff --git a/dev/flight-integration/go.mod b/dev/flight-integration/go.mod index ae02f046360ab..48f6b1ead955a 100644 --- a/dev/flight-integration/go.mod +++ b/dev/flight-integration/go.mod @@ -1,4 +1,4 @@ -module integration +module github.com/apache/arrow/dev/flight-integration go 1.22.3 diff --git a/dev/flight-integration/scenario/runner.go b/dev/flight-integration/scenario/runner.go index 3b68ae6524f0f..a0e41f6466900 100644 --- a/dev/flight-integration/scenario/runner.go +++ b/dev/flight-integration/scenario/runner.go @@ -4,9 +4,10 @@ import ( "context" "errors" "fmt" - "integration/tester" "strings" + "github.com/apache/arrow/dev/flight-integration/tester" + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/grpc" ) diff --git a/dev/flight-integration/scenario/scenario.go b/dev/flight-integration/scenario/scenario.go index d785377333aab..62e6bb9fa6dfe 100644 --- a/dev/flight-integration/scenario/scenario.go +++ b/dev/flight-integration/scenario/scenario.go @@ -3,9 +3,10 @@ package scenario import ( "context" "fmt" - "integration/tester" "sync" + "github.com/apache/arrow/dev/flight-integration/tester" + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" ) diff --git a/dev/flight-integration/scenario/scenario_test.go b/dev/flight-integration/scenario/scenario_test.go index 35a4a91ec7b35..d07df9d49d382 100644 --- a/dev/flight-integration/scenario/scenario_test.go +++ b/dev/flight-integration/scenario/scenario_test.go @@ -2,9 +2,10 @@ package scenario_test import ( "context" - "integration/scenario" "testing" + "github.com/apache/arrow/dev/flight-integration/scenario" + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/dev/flight-integration/scenario/server_test.go b/dev/flight-integration/scenario/server_test.go index da6ef8affe864..ece3470ae7437 100644 --- a/dev/flight-integration/scenario/server_test.go +++ b/dev/flight-integration/scenario/server_test.go @@ -3,11 +3,12 @@ package scenario_test import ( "context" "fmt" - "integration" - "integration/scenario" "net" "testing" + integration "github.com/apache/arrow/dev/flight-integration" + "github.com/apache/arrow/dev/flight-integration/scenario" + "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "github.com/stretchr/testify/suite" "google.golang.org/grpc" diff --git a/dev/flight-integration/server.go b/dev/flight-integration/server.go index 8bac27b81cbf4..0f0031b62a14f 100644 --- a/dev/flight-integration/server.go +++ b/dev/flight-integration/server.go @@ -1,7 +1,7 @@ package integration import ( - "integration/scenario" + "github.com/apache/arrow/dev/flight-integration/scenario" "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/grpc" diff --git a/dev/flight-integration/server_test.go b/dev/flight-integration/server_test.go index 441f7c478cd32..a46b048a81a80 100644 --- a/dev/flight-integration/server_test.go +++ b/dev/flight-integration/server_test.go @@ -2,17 +2,18 @@ package integration_test import ( "context" - "integration" - "integration/scenario" "net" "testing" + integration "github.com/apache/arrow/dev/flight-integration" + "github.com/apache/arrow/dev/flight-integration/scenario" + "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/test/bufconn" - _ "integration/cases" + _ "github.com/apache/arrow/dev/flight-integration/cases" ) func TestIntegrationClientAndServer(t *testing.T) { From ed43b3ece164216803dfe258d6bb10b22e87eb1b Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Fri, 13 Sep 2024 16:25:56 -0400 Subject: [PATCH 04/12] remove arrow dependency --- .../cases/auth:basic_proto.go | 2 +- .../cases/location:reuse_connection.go | 3 +- .../cases/poll_flight_info.go | 2 +- dev/flight-integration/flight/Flight.pb.go | 2831 ++++++++ dev/flight-integration/flight/FlightSql.pb.go | 6071 +++++++++++++++++ .../flight/Flight_grpc.pb.go | 804 +++ dev/flight-integration/flight/gen.go | 20 + dev/flight-integration/go.mod | 1 - dev/flight-integration/go.sum | 2 - dev/flight-integration/scenario/runner.go | 2 +- dev/flight-integration/scenario/scenario.go | 3 +- .../scenario/scenario_test.go | 2 +- dev/flight-integration/scenario/server.go | 2 +- .../scenario/server_test.go | 2 +- dev/flight-integration/server.go | 2 +- 15 files changed, 9735 insertions(+), 14 deletions(-) create mode 100644 dev/flight-integration/flight/Flight.pb.go create mode 100644 dev/flight-integration/flight/FlightSql.pb.go create mode 100644 dev/flight-integration/flight/Flight_grpc.pb.go create mode 100644 dev/flight-integration/flight/gen.go diff --git a/dev/flight-integration/cases/auth:basic_proto.go b/dev/flight-integration/cases/auth:basic_proto.go index e18f1972ea6bb..07ddeff66dd80 100644 --- a/dev/flight-integration/cases/auth:basic_proto.go +++ b/dev/flight-integration/cases/auth:basic_proto.go @@ -5,10 +5,10 @@ import ( "fmt" "io" + "github.com/apache/arrow/dev/flight-integration/flight" "github.com/apache/arrow/dev/flight-integration/scenario" "github.com/apache/arrow/dev/flight-integration/tester" - "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" diff --git a/dev/flight-integration/cases/location:reuse_connection.go b/dev/flight-integration/cases/location:reuse_connection.go index 2885cd1685cbb..6d319bf206511 100644 --- a/dev/flight-integration/cases/location:reuse_connection.go +++ b/dev/flight-integration/cases/location:reuse_connection.go @@ -3,10 +3,9 @@ package cases import ( "context" + "github.com/apache/arrow/dev/flight-integration/flight" "github.com/apache/arrow/dev/flight-integration/scenario" "github.com/apache/arrow/dev/flight-integration/tester" - - "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" ) func init() { diff --git a/dev/flight-integration/cases/poll_flight_info.go b/dev/flight-integration/cases/poll_flight_info.go index 108f2c747b5f1..aec7860283b90 100644 --- a/dev/flight-integration/cases/poll_flight_info.go +++ b/dev/flight-integration/cases/poll_flight_info.go @@ -6,10 +6,10 @@ import ( "math" "time" + "github.com/apache/arrow/dev/flight-integration/flight" "github.com/apache/arrow/dev/flight-integration/scenario" "github.com/apache/arrow/dev/flight-integration/tester" - "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/dev/flight-integration/flight/Flight.pb.go b/dev/flight-integration/flight/Flight.pb.go new file mode 100644 index 0000000000000..c0d865e8eb4a8 --- /dev/null +++ b/dev/flight-integration/flight/Flight.pb.go @@ -0,0 +1,2831 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +//

+// http://www.apache.org/licenses/LICENSE-2.0 +//

+// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v4.25.3 +// source: Flight.proto + +package flight + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The result of a cancel operation. +// +// This is used by CancelFlightInfoResult.status. +type CancelStatus int32 + +const ( + // The cancellation status is unknown. Servers should avoid using + // this value (send a NOT_FOUND error if the requested query is + // not known). Clients can retry the request. + CancelStatus_CANCEL_STATUS_UNSPECIFIED CancelStatus = 0 + // The cancellation request is complete. Subsequent requests with + // the same payload may return CANCELLED or a NOT_FOUND error. + CancelStatus_CANCEL_STATUS_CANCELLED CancelStatus = 1 + // The cancellation request is in progress. The client may retry + // the cancellation request. + CancelStatus_CANCEL_STATUS_CANCELLING CancelStatus = 2 + // The query is not cancellable. The client should not retry the + // cancellation request. + CancelStatus_CANCEL_STATUS_NOT_CANCELLABLE CancelStatus = 3 +) + +// Enum value maps for CancelStatus. +var ( + CancelStatus_name = map[int32]string{ + 0: "CANCEL_STATUS_UNSPECIFIED", + 1: "CANCEL_STATUS_CANCELLED", + 2: "CANCEL_STATUS_CANCELLING", + 3: "CANCEL_STATUS_NOT_CANCELLABLE", + } + CancelStatus_value = map[string]int32{ + "CANCEL_STATUS_UNSPECIFIED": 0, + "CANCEL_STATUS_CANCELLED": 1, + "CANCEL_STATUS_CANCELLING": 2, + "CANCEL_STATUS_NOT_CANCELLABLE": 3, + } +) + +func (x CancelStatus) Enum() *CancelStatus { + p := new(CancelStatus) + *p = x + return p +} + +func (x CancelStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CancelStatus) Descriptor() protoreflect.EnumDescriptor { + return file_Flight_proto_enumTypes[0].Descriptor() +} + +func (CancelStatus) Type() protoreflect.EnumType { + return &file_Flight_proto_enumTypes[0] +} + +func (x CancelStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CancelStatus.Descriptor instead. +func (CancelStatus) EnumDescriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{0} +} + +// Describes what type of descriptor is defined. +type FlightDescriptor_DescriptorType int32 + +const ( + // Protobuf pattern, not used. + FlightDescriptor_UNKNOWN FlightDescriptor_DescriptorType = 0 + // A named path that identifies a dataset. A path is composed of a string + // or list of strings describing a particular dataset. This is conceptually + // + // similar to a path inside a filesystem. + FlightDescriptor_PATH FlightDescriptor_DescriptorType = 1 + // An opaque command to generate a dataset. + FlightDescriptor_CMD FlightDescriptor_DescriptorType = 2 +) + +// Enum value maps for FlightDescriptor_DescriptorType. +var ( + FlightDescriptor_DescriptorType_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PATH", + 2: "CMD", + } + FlightDescriptor_DescriptorType_value = map[string]int32{ + "UNKNOWN": 0, + "PATH": 1, + "CMD": 2, + } +) + +func (x FlightDescriptor_DescriptorType) Enum() *FlightDescriptor_DescriptorType { + p := new(FlightDescriptor_DescriptorType) + *p = x + return p +} + +func (x FlightDescriptor_DescriptorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FlightDescriptor_DescriptorType) Descriptor() protoreflect.EnumDescriptor { + return file_Flight_proto_enumTypes[1].Descriptor() +} + +func (FlightDescriptor_DescriptorType) Type() protoreflect.EnumType { + return &file_Flight_proto_enumTypes[1] +} + +func (x FlightDescriptor_DescriptorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FlightDescriptor_DescriptorType.Descriptor instead. +func (FlightDescriptor_DescriptorType) EnumDescriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{9, 0} +} + +type SetSessionOptionsResult_ErrorValue int32 + +const ( + // Protobuf deserialization fallback value: The status is unknown or unrecognized. + // Servers should avoid using this value. The request may be retried by the client. + SetSessionOptionsResult_UNSPECIFIED SetSessionOptionsResult_ErrorValue = 0 + // The given session option name is invalid. + SetSessionOptionsResult_INVALID_NAME SetSessionOptionsResult_ErrorValue = 1 + // The session option value or type is invalid. + SetSessionOptionsResult_INVALID_VALUE SetSessionOptionsResult_ErrorValue = 2 + // The session option cannot be set. + SetSessionOptionsResult_ERROR SetSessionOptionsResult_ErrorValue = 3 +) + +// Enum value maps for SetSessionOptionsResult_ErrorValue. +var ( + SetSessionOptionsResult_ErrorValue_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "INVALID_NAME", + 2: "INVALID_VALUE", + 3: "ERROR", + } + SetSessionOptionsResult_ErrorValue_value = map[string]int32{ + "UNSPECIFIED": 0, + "INVALID_NAME": 1, + "INVALID_VALUE": 2, + "ERROR": 3, + } +) + +func (x SetSessionOptionsResult_ErrorValue) Enum() *SetSessionOptionsResult_ErrorValue { + p := new(SetSessionOptionsResult_ErrorValue) + *p = x + return p +} + +func (x SetSessionOptionsResult_ErrorValue) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SetSessionOptionsResult_ErrorValue) Descriptor() protoreflect.EnumDescriptor { + return file_Flight_proto_enumTypes[2].Descriptor() +} + +func (SetSessionOptionsResult_ErrorValue) Type() protoreflect.EnumType { + return &file_Flight_proto_enumTypes[2] +} + +func (x SetSessionOptionsResult_ErrorValue) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SetSessionOptionsResult_ErrorValue.Descriptor instead. +func (SetSessionOptionsResult_ErrorValue) EnumDescriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{22, 0} +} + +type CloseSessionResult_Status int32 + +const ( + // Protobuf deserialization fallback value: The session close status is unknown or + // not recognized. Servers should avoid using this value (send a NOT_FOUND error if + // the requested session is not known or expired). Clients can retry the request. + CloseSessionResult_UNSPECIFIED CloseSessionResult_Status = 0 + // The session close request is complete. Subsequent requests with + // the same session produce a NOT_FOUND error. + CloseSessionResult_CLOSED CloseSessionResult_Status = 1 + // The session close request is in progress. The client may retry + // the close request. + CloseSessionResult_CLOSING CloseSessionResult_Status = 2 + // The session is not closeable. The client should not retry the + // close request. + CloseSessionResult_NOT_CLOSEABLE CloseSessionResult_Status = 3 +) + +// Enum value maps for CloseSessionResult_Status. +var ( + CloseSessionResult_Status_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CLOSED", + 2: "CLOSING", + 3: "NOT_CLOSEABLE", + } + CloseSessionResult_Status_value = map[string]int32{ + "UNSPECIFIED": 0, + "CLOSED": 1, + "CLOSING": 2, + "NOT_CLOSEABLE": 3, + } +) + +func (x CloseSessionResult_Status) Enum() *CloseSessionResult_Status { + p := new(CloseSessionResult_Status) + *p = x + return p +} + +func (x CloseSessionResult_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CloseSessionResult_Status) Descriptor() protoreflect.EnumDescriptor { + return file_Flight_proto_enumTypes[3].Descriptor() +} + +func (CloseSessionResult_Status) Type() protoreflect.EnumType { + return &file_Flight_proto_enumTypes[3] +} + +func (x CloseSessionResult_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CloseSessionResult_Status.Descriptor instead. +func (CloseSessionResult_Status) EnumDescriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{26, 0} +} + +// The request that a client provides to a server on handshake. +type HandshakeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A defined protocol version + ProtocolVersion uint64 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` + // Arbitrary auth/handshake info. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *HandshakeRequest) Reset() { + *x = HandshakeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HandshakeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HandshakeRequest) ProtoMessage() {} + +func (x *HandshakeRequest) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HandshakeRequest.ProtoReflect.Descriptor instead. +func (*HandshakeRequest) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{0} +} + +func (x *HandshakeRequest) GetProtocolVersion() uint64 { + if x != nil { + return x.ProtocolVersion + } + return 0 +} + +func (x *HandshakeRequest) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +type HandshakeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A defined protocol version + ProtocolVersion uint64 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` + // Arbitrary auth/handshake info. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *HandshakeResponse) Reset() { + *x = HandshakeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HandshakeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HandshakeResponse) ProtoMessage() {} + +func (x *HandshakeResponse) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HandshakeResponse.ProtoReflect.Descriptor instead. +func (*HandshakeResponse) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{1} +} + +func (x *HandshakeResponse) GetProtocolVersion() uint64 { + if x != nil { + return x.ProtocolVersion + } + return 0 +} + +func (x *HandshakeResponse) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// A message for doing simple auth. +type BasicAuth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` +} + +func (x *BasicAuth) Reset() { + *x = BasicAuth{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BasicAuth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BasicAuth) ProtoMessage() {} + +func (x *BasicAuth) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BasicAuth.ProtoReflect.Descriptor instead. +func (*BasicAuth) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{2} +} + +func (x *BasicAuth) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *BasicAuth) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type Empty struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Empty) ProtoMessage() {} + +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{3} +} + +// Describes an available action, including both the name used for execution +// along with a short description of the purpose of the action. +type ActionType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *ActionType) Reset() { + *x = ActionType{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionType) ProtoMessage() {} + +func (x *ActionType) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionType.ProtoReflect.Descriptor instead. +func (*ActionType) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{4} +} + +func (x *ActionType) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *ActionType) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// A service specific expression that can be used to return a limited set +// of available Arrow Flight streams. +type Criteria struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Expression []byte `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"` +} + +func (x *Criteria) Reset() { + *x = Criteria{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Criteria) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Criteria) ProtoMessage() {} + +func (x *Criteria) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Criteria.ProtoReflect.Descriptor instead. +func (*Criteria) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{5} +} + +func (x *Criteria) GetExpression() []byte { + if x != nil { + return x.Expression + } + return nil +} + +// An opaque action specific for the service. +type Action struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *Action) Reset() { + *x = Action{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Action) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action) ProtoMessage() {} + +func (x *Action) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action.ProtoReflect.Descriptor instead. +func (*Action) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{6} +} + +func (x *Action) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Action) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +// An opaque result returned after executing an action. +type Result struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *Result) Reset() { + *x = Result{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Result) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Result) ProtoMessage() {} + +func (x *Result) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Result.ProtoReflect.Descriptor instead. +func (*Result) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{7} +} + +func (x *Result) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +// Wrap the result of a getSchema call +type SchemaResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The schema of the dataset in its IPC form: + // + // 4 bytes - an optional IPC_CONTINUATION_TOKEN prefix + // 4 bytes - the byte length of the payload + // a flatbuffer Message whose header is the Schema + Schema []byte `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` +} + +func (x *SchemaResult) Reset() { + *x = SchemaResult{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SchemaResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SchemaResult) ProtoMessage() {} + +func (x *SchemaResult) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SchemaResult.ProtoReflect.Descriptor instead. +func (*SchemaResult) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{8} +} + +func (x *SchemaResult) GetSchema() []byte { + if x != nil { + return x.Schema + } + return nil +} + +// The name or tag for a Flight. May be used as a way to retrieve or generate +// a flight or be used to expose a set of previously defined flights. +type FlightDescriptor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type FlightDescriptor_DescriptorType `protobuf:"varint,1,opt,name=type,proto3,enum=arrow.flight.protocol.FlightDescriptor_DescriptorType" json:"type,omitempty"` + // Opaque value used to express a command. Should only be defined when + // type = CMD. + Cmd []byte `protobuf:"bytes,2,opt,name=cmd,proto3" json:"cmd,omitempty"` + // List of strings identifying a particular dataset. Should only be defined + // when type = PATH. + Path []string `protobuf:"bytes,3,rep,name=path,proto3" json:"path,omitempty"` +} + +func (x *FlightDescriptor) Reset() { + *x = FlightDescriptor{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlightDescriptor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlightDescriptor) ProtoMessage() {} + +func (x *FlightDescriptor) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlightDescriptor.ProtoReflect.Descriptor instead. +func (*FlightDescriptor) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{9} +} + +func (x *FlightDescriptor) GetType() FlightDescriptor_DescriptorType { + if x != nil { + return x.Type + } + return FlightDescriptor_UNKNOWN +} + +func (x *FlightDescriptor) GetCmd() []byte { + if x != nil { + return x.Cmd + } + return nil +} + +func (x *FlightDescriptor) GetPath() []string { + if x != nil { + return x.Path + } + return nil +} + +// The access coordinates for retrieval of a dataset. With a FlightInfo, a +// consumer is able to determine how to retrieve a dataset. +type FlightInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The schema of the dataset in its IPC form: + // + // 4 bytes - an optional IPC_CONTINUATION_TOKEN prefix + // 4 bytes - the byte length of the payload + // a flatbuffer Message whose header is the Schema + Schema []byte `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` + // The descriptor associated with this info. + FlightDescriptor *FlightDescriptor `protobuf:"bytes,2,opt,name=flight_descriptor,json=flightDescriptor,proto3" json:"flight_descriptor,omitempty"` + // A list of endpoints associated with the flight. To consume the + // whole flight, all endpoints (and hence all Tickets) must be + // consumed. Endpoints can be consumed in any order. + // + // In other words, an application can use multiple endpoints to + // represent partitioned data. + // + // If the returned data has an ordering, an application can use + // "FlightInfo.ordered = true" or should return the all data in a + // single endpoint. Otherwise, there is no ordering defined on + // endpoints or the data within. + // + // A client can read ordered data by reading data from returned + // endpoints, in order, from front to back. + // + // Note that a client may ignore "FlightInfo.ordered = true". If an + // ordering is important for an application, an application must + // choose one of them: + // + // - An application requires that all clients must read data in + // returned endpoints order. + // - An application must return the all data in a single endpoint. + Endpoint []*FlightEndpoint `protobuf:"bytes,3,rep,name=endpoint,proto3" json:"endpoint,omitempty"` + // Set these to -1 if unknown. + TotalRecords int64 `protobuf:"varint,4,opt,name=total_records,json=totalRecords,proto3" json:"total_records,omitempty"` + TotalBytes int64 `protobuf:"varint,5,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"` + // FlightEndpoints are in the same order as the data. + Ordered bool `protobuf:"varint,6,opt,name=ordered,proto3" json:"ordered,omitempty"` + // Application-defined metadata. + // + // There is no inherent or required relationship between this + // and the app_metadata fields in the FlightEndpoints or resulting + // FlightData messages. Since this metadata is application-defined, + // a given application could define there to be a relationship, + // but there is none required by the spec. + AppMetadata []byte `protobuf:"bytes,7,opt,name=app_metadata,json=appMetadata,proto3" json:"app_metadata,omitempty"` +} + +func (x *FlightInfo) Reset() { + *x = FlightInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlightInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlightInfo) ProtoMessage() {} + +func (x *FlightInfo) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlightInfo.ProtoReflect.Descriptor instead. +func (*FlightInfo) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{10} +} + +func (x *FlightInfo) GetSchema() []byte { + if x != nil { + return x.Schema + } + return nil +} + +func (x *FlightInfo) GetFlightDescriptor() *FlightDescriptor { + if x != nil { + return x.FlightDescriptor + } + return nil +} + +func (x *FlightInfo) GetEndpoint() []*FlightEndpoint { + if x != nil { + return x.Endpoint + } + return nil +} + +func (x *FlightInfo) GetTotalRecords() int64 { + if x != nil { + return x.TotalRecords + } + return 0 +} + +func (x *FlightInfo) GetTotalBytes() int64 { + if x != nil { + return x.TotalBytes + } + return 0 +} + +func (x *FlightInfo) GetOrdered() bool { + if x != nil { + return x.Ordered + } + return false +} + +func (x *FlightInfo) GetAppMetadata() []byte { + if x != nil { + return x.AppMetadata + } + return nil +} + +// The information to process a long-running query. +type PollInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The currently available results. + // + // If "flight_descriptor" is not specified, the query is complete + // and "info" specifies all results. Otherwise, "info" contains + // partial query results. + // + // Note that each PollInfo response contains a complete + // FlightInfo (not just the delta between the previous and current + // FlightInfo). + // + // Subsequent PollInfo responses may only append new endpoints to + // info. + // + // Clients can begin fetching results via DoGet(Ticket) with the + // ticket in the info before the query is + // completed. FlightInfo.ordered is also valid. + Info *FlightInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + // The descriptor the client should use on the next try. + // If unset, the query is complete. + FlightDescriptor *FlightDescriptor `protobuf:"bytes,2,opt,name=flight_descriptor,json=flightDescriptor,proto3" json:"flight_descriptor,omitempty"` + // Query progress. If known, must be in [0.0, 1.0] but need not be + // monotonic or nondecreasing. If unknown, do not set. + Progress *float64 `protobuf:"fixed64,3,opt,name=progress,proto3,oneof" json:"progress,omitempty"` + // Expiration time for this request. After this passes, the server + // might not accept the retry descriptor anymore (and the query may + // be cancelled). This may be updated on a call to PollFlightInfo. + ExpirationTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` +} + +func (x *PollInfo) Reset() { + *x = PollInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PollInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PollInfo) ProtoMessage() {} + +func (x *PollInfo) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PollInfo.ProtoReflect.Descriptor instead. +func (*PollInfo) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{11} +} + +func (x *PollInfo) GetInfo() *FlightInfo { + if x != nil { + return x.Info + } + return nil +} + +func (x *PollInfo) GetFlightDescriptor() *FlightDescriptor { + if x != nil { + return x.FlightDescriptor + } + return nil +} + +func (x *PollInfo) GetProgress() float64 { + if x != nil && x.Progress != nil { + return *x.Progress + } + return 0 +} + +func (x *PollInfo) GetExpirationTime() *timestamppb.Timestamp { + if x != nil { + return x.ExpirationTime + } + return nil +} + +// The request of the CancelFlightInfo action. +// +// The request should be stored in Action.body. +type CancelFlightInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *FlightInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (x *CancelFlightInfoRequest) Reset() { + *x = CancelFlightInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelFlightInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelFlightInfoRequest) ProtoMessage() {} + +func (x *CancelFlightInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelFlightInfoRequest.ProtoReflect.Descriptor instead. +func (*CancelFlightInfoRequest) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{12} +} + +func (x *CancelFlightInfoRequest) GetInfo() *FlightInfo { + if x != nil { + return x.Info + } + return nil +} + +// The result of the CancelFlightInfo action. +// +// The result should be stored in Result.body. +type CancelFlightInfoResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status CancelStatus `protobuf:"varint,1,opt,name=status,proto3,enum=arrow.flight.protocol.CancelStatus" json:"status,omitempty"` +} + +func (x *CancelFlightInfoResult) Reset() { + *x = CancelFlightInfoResult{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelFlightInfoResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelFlightInfoResult) ProtoMessage() {} + +func (x *CancelFlightInfoResult) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelFlightInfoResult.ProtoReflect.Descriptor instead. +func (*CancelFlightInfoResult) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{13} +} + +func (x *CancelFlightInfoResult) GetStatus() CancelStatus { + if x != nil { + return x.Status + } + return CancelStatus_CANCEL_STATUS_UNSPECIFIED +} + +// An opaque identifier that the service can use to retrieve a particular +// portion of a stream. +// +// Tickets are meant to be single use. It is an error/application-defined +// behavior to reuse a ticket. +type Ticket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ticket []byte `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"` +} + +func (x *Ticket) Reset() { + *x = Ticket{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ticket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ticket) ProtoMessage() {} + +func (x *Ticket) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ticket.ProtoReflect.Descriptor instead. +func (*Ticket) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{14} +} + +func (x *Ticket) GetTicket() []byte { + if x != nil { + return x.Ticket + } + return nil +} + +// A location where a Flight service will accept retrieval of a particular +// stream given a ticket. +type Location struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` +} + +func (x *Location) Reset() { + *x = Location{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Location) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Location) ProtoMessage() {} + +func (x *Location) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Location.ProtoReflect.Descriptor instead. +func (*Location) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{15} +} + +func (x *Location) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +// A particular stream or split associated with a flight. +type FlightEndpoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Token used to retrieve this stream. + Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"` + // A list of URIs where this ticket can be redeemed via DoGet(). + // + // If the list is empty, the expectation is that the ticket can only + // be redeemed on the current service where the ticket was + // generated. + // + // If the list is not empty, the expectation is that the ticket can be + // redeemed at any of the locations, and that the data returned will be + // equivalent. In this case, the ticket may only be redeemed at one of the + // given locations, and not (necessarily) on the current service. If one + // of the given locations is "arrow-flight-reuse-connection://?", the + // client may redeem the ticket on the service where the ticket was + // generated (i.e., the same as above), in addition to the other + // locations. (This URI was chosen to maximize compatibility, as 'scheme:' + // or 'scheme://' are not accepted by Java's java.net.URI.) + // + // In other words, an application can use multiple locations to + // represent redundant and/or load balanced services. + Location []*Location `protobuf:"bytes,2,rep,name=location,proto3" json:"location,omitempty"` + // Expiration time of this stream. If present, clients may assume + // they can retry DoGet requests. Otherwise, it is + // application-defined whether DoGet requests may be retried. + ExpirationTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` + // Application-defined metadata. + // + // There is no inherent or required relationship between this + // and the app_metadata fields in the FlightInfo or resulting + // FlightData messages. Since this metadata is application-defined, + // a given application could define there to be a relationship, + // but there is none required by the spec. + AppMetadata []byte `protobuf:"bytes,4,opt,name=app_metadata,json=appMetadata,proto3" json:"app_metadata,omitempty"` +} + +func (x *FlightEndpoint) Reset() { + *x = FlightEndpoint{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlightEndpoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlightEndpoint) ProtoMessage() {} + +func (x *FlightEndpoint) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlightEndpoint.ProtoReflect.Descriptor instead. +func (*FlightEndpoint) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{16} +} + +func (x *FlightEndpoint) GetTicket() *Ticket { + if x != nil { + return x.Ticket + } + return nil +} + +func (x *FlightEndpoint) GetLocation() []*Location { + if x != nil { + return x.Location + } + return nil +} + +func (x *FlightEndpoint) GetExpirationTime() *timestamppb.Timestamp { + if x != nil { + return x.ExpirationTime + } + return nil +} + +func (x *FlightEndpoint) GetAppMetadata() []byte { + if x != nil { + return x.AppMetadata + } + return nil +} + +// The request of the RenewFlightEndpoint action. +// +// The request should be stored in Action.body. +type RenewFlightEndpointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Endpoint *FlightEndpoint `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` +} + +func (x *RenewFlightEndpointRequest) Reset() { + *x = RenewFlightEndpointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenewFlightEndpointRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenewFlightEndpointRequest) ProtoMessage() {} + +func (x *RenewFlightEndpointRequest) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenewFlightEndpointRequest.ProtoReflect.Descriptor instead. +func (*RenewFlightEndpointRequest) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{17} +} + +func (x *RenewFlightEndpointRequest) GetEndpoint() *FlightEndpoint { + if x != nil { + return x.Endpoint + } + return nil +} + +// A batch of Arrow data as part of a stream of batches. +type FlightData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The descriptor of the data. This is only relevant when a client is + // starting a new DoPut stream. + FlightDescriptor *FlightDescriptor `protobuf:"bytes,1,opt,name=flight_descriptor,json=flightDescriptor,proto3" json:"flight_descriptor,omitempty"` + // Header for message data as described in Message.fbs::Message. + DataHeader []byte `protobuf:"bytes,2,opt,name=data_header,json=dataHeader,proto3" json:"data_header,omitempty"` + // Application-defined metadata. + AppMetadata []byte `protobuf:"bytes,3,opt,name=app_metadata,json=appMetadata,proto3" json:"app_metadata,omitempty"` + // The actual batch of Arrow data. Preferably handled with minimal-copies + // coming last in the definition to help with sidecar patterns (it is + // expected that some implementations will fetch this field off the wire + // with specialized code to avoid extra memory copies). + DataBody []byte `protobuf:"bytes,1000,opt,name=data_body,json=dataBody,proto3" json:"data_body,omitempty"` +} + +func (x *FlightData) Reset() { + *x = FlightData{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlightData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlightData) ProtoMessage() {} + +func (x *FlightData) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlightData.ProtoReflect.Descriptor instead. +func (*FlightData) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{18} +} + +func (x *FlightData) GetFlightDescriptor() *FlightDescriptor { + if x != nil { + return x.FlightDescriptor + } + return nil +} + +func (x *FlightData) GetDataHeader() []byte { + if x != nil { + return x.DataHeader + } + return nil +} + +func (x *FlightData) GetAppMetadata() []byte { + if x != nil { + return x.AppMetadata + } + return nil +} + +func (x *FlightData) GetDataBody() []byte { + if x != nil { + return x.DataBody + } + return nil +} + +// * +// The response message associated with the submission of a DoPut. +type PutResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AppMetadata []byte `protobuf:"bytes,1,opt,name=app_metadata,json=appMetadata,proto3" json:"app_metadata,omitempty"` +} + +func (x *PutResult) Reset() { + *x = PutResult{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutResult) ProtoMessage() {} + +func (x *PutResult) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutResult.ProtoReflect.Descriptor instead. +func (*PutResult) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{19} +} + +func (x *PutResult) GetAppMetadata() []byte { + if x != nil { + return x.AppMetadata + } + return nil +} + +// EXPERIMENTAL: Union of possible value types for a Session Option to be set to. +// +// By convention, an attempt to set a valueless SessionOptionValue should +// attempt to unset or clear the named option value on the server. +type SessionOptionValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to OptionValue: + // + // *SessionOptionValue_StringValue + // *SessionOptionValue_BoolValue + // *SessionOptionValue_Int64Value + // *SessionOptionValue_DoubleValue + // *SessionOptionValue_StringListValue_ + OptionValue isSessionOptionValue_OptionValue `protobuf_oneof:"option_value"` +} + +func (x *SessionOptionValue) Reset() { + *x = SessionOptionValue{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SessionOptionValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionOptionValue) ProtoMessage() {} + +func (x *SessionOptionValue) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionOptionValue.ProtoReflect.Descriptor instead. +func (*SessionOptionValue) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{20} +} + +func (m *SessionOptionValue) GetOptionValue() isSessionOptionValue_OptionValue { + if m != nil { + return m.OptionValue + } + return nil +} + +func (x *SessionOptionValue) GetStringValue() string { + if x, ok := x.GetOptionValue().(*SessionOptionValue_StringValue); ok { + return x.StringValue + } + return "" +} + +func (x *SessionOptionValue) GetBoolValue() bool { + if x, ok := x.GetOptionValue().(*SessionOptionValue_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (x *SessionOptionValue) GetInt64Value() int64 { + if x, ok := x.GetOptionValue().(*SessionOptionValue_Int64Value); ok { + return x.Int64Value + } + return 0 +} + +func (x *SessionOptionValue) GetDoubleValue() float64 { + if x, ok := x.GetOptionValue().(*SessionOptionValue_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +func (x *SessionOptionValue) GetStringListValue() *SessionOptionValue_StringListValue { + if x, ok := x.GetOptionValue().(*SessionOptionValue_StringListValue_); ok { + return x.StringListValue + } + return nil +} + +type isSessionOptionValue_OptionValue interface { + isSessionOptionValue_OptionValue() +} + +type SessionOptionValue_StringValue struct { + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type SessionOptionValue_BoolValue struct { + BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type SessionOptionValue_Int64Value struct { + Int64Value int64 `protobuf:"fixed64,3,opt,name=int64_value,json=int64Value,proto3,oneof"` +} + +type SessionOptionValue_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +type SessionOptionValue_StringListValue_ struct { + StringListValue *SessionOptionValue_StringListValue `protobuf:"bytes,5,opt,name=string_list_value,json=stringListValue,proto3,oneof"` +} + +func (*SessionOptionValue_StringValue) isSessionOptionValue_OptionValue() {} + +func (*SessionOptionValue_BoolValue) isSessionOptionValue_OptionValue() {} + +func (*SessionOptionValue_Int64Value) isSessionOptionValue_OptionValue() {} + +func (*SessionOptionValue_DoubleValue) isSessionOptionValue_OptionValue() {} + +func (*SessionOptionValue_StringListValue_) isSessionOptionValue_OptionValue() {} + +// EXPERIMENTAL: A request to set session options for an existing or new (implicit) +// server session. +// +// Sessions are persisted and referenced via a transport-level state management, typically +// RFC 6265 HTTP cookies when using an HTTP transport. The suggested cookie name or state +// context key is 'arrow_flight_session_id', although implementations may freely choose their +// own name. +// +// Session creation (if one does not already exist) is implied by this RPC request, however +// server implementations may choose to initiate a session that also contains client-provided +// session options at any other time, e.g. on authentication, or when any other call is made +// and the server wishes to use a session to persist any state (or lack thereof). +type SetSessionOptionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionOptions map[string]*SessionOptionValue `protobuf:"bytes,1,rep,name=session_options,json=sessionOptions,proto3" json:"session_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SetSessionOptionsRequest) Reset() { + *x = SetSessionOptionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSessionOptionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSessionOptionsRequest) ProtoMessage() {} + +func (x *SetSessionOptionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSessionOptionsRequest.ProtoReflect.Descriptor instead. +func (*SetSessionOptionsRequest) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{21} +} + +func (x *SetSessionOptionsRequest) GetSessionOptions() map[string]*SessionOptionValue { + if x != nil { + return x.SessionOptions + } + return nil +} + +// EXPERIMENTAL: The results (individually) of setting a set of session options. +// +// Option names should only be present in the response if they were not successfully +// set on the server; that is, a response without an Error for a name provided in the +// SetSessionOptionsRequest implies that the named option value was set successfully. +type SetSessionOptionsResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Errors map[string]*SetSessionOptionsResult_Error `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SetSessionOptionsResult) Reset() { + *x = SetSessionOptionsResult{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSessionOptionsResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSessionOptionsResult) ProtoMessage() {} + +func (x *SetSessionOptionsResult) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSessionOptionsResult.ProtoReflect.Descriptor instead. +func (*SetSessionOptionsResult) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{22} +} + +func (x *SetSessionOptionsResult) GetErrors() map[string]*SetSessionOptionsResult_Error { + if x != nil { + return x.Errors + } + return nil +} + +// EXPERIMENTAL: A request to access the session options for the current server session. +// +// The existing session is referenced via a cookie header or similar (see +// SetSessionOptionsRequest above); it is an error to make this request with a missing, +// invalid, or expired session cookie header or other implementation-defined session +// reference token. +type GetSessionOptionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetSessionOptionsRequest) Reset() { + *x = GetSessionOptionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSessionOptionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionOptionsRequest) ProtoMessage() {} + +func (x *GetSessionOptionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSessionOptionsRequest.ProtoReflect.Descriptor instead. +func (*GetSessionOptionsRequest) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{23} +} + +// EXPERIMENTAL: The result containing the current server session options. +type GetSessionOptionsResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionOptions map[string]*SessionOptionValue `protobuf:"bytes,1,rep,name=session_options,json=sessionOptions,proto3" json:"session_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetSessionOptionsResult) Reset() { + *x = GetSessionOptionsResult{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSessionOptionsResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionOptionsResult) ProtoMessage() {} + +func (x *GetSessionOptionsResult) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSessionOptionsResult.ProtoReflect.Descriptor instead. +func (*GetSessionOptionsResult) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{24} +} + +func (x *GetSessionOptionsResult) GetSessionOptions() map[string]*SessionOptionValue { + if x != nil { + return x.SessionOptions + } + return nil +} + +// Request message for the "Close Session" action. +// +// The exiting session is referenced via a cookie header. +type CloseSessionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CloseSessionRequest) Reset() { + *x = CloseSessionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloseSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseSessionRequest) ProtoMessage() {} + +func (x *CloseSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloseSessionRequest.ProtoReflect.Descriptor instead. +func (*CloseSessionRequest) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{25} +} + +// The result of closing a session. +type CloseSessionResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status CloseSessionResult_Status `protobuf:"varint,1,opt,name=status,proto3,enum=arrow.flight.protocol.CloseSessionResult_Status" json:"status,omitempty"` +} + +func (x *CloseSessionResult) Reset() { + *x = CloseSessionResult{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloseSessionResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseSessionResult) ProtoMessage() {} + +func (x *CloseSessionResult) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloseSessionResult.ProtoReflect.Descriptor instead. +func (*CloseSessionResult) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{26} +} + +func (x *CloseSessionResult) GetStatus() CloseSessionResult_Status { + if x != nil { + return x.Status + } + return CloseSessionResult_UNSPECIFIED +} + +type SessionOptionValue_StringListValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *SessionOptionValue_StringListValue) Reset() { + *x = SessionOptionValue_StringListValue{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SessionOptionValue_StringListValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionOptionValue_StringListValue) ProtoMessage() {} + +func (x *SessionOptionValue_StringListValue) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionOptionValue_StringListValue.ProtoReflect.Descriptor instead. +func (*SessionOptionValue_StringListValue) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{20, 0} +} + +func (x *SessionOptionValue_StringListValue) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + +type SetSessionOptionsResult_Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value SetSessionOptionsResult_ErrorValue `protobuf:"varint,1,opt,name=value,proto3,enum=arrow.flight.protocol.SetSessionOptionsResult_ErrorValue" json:"value,omitempty"` +} + +func (x *SetSessionOptionsResult_Error) Reset() { + *x = SetSessionOptionsResult_Error{} + if protoimpl.UnsafeEnabled { + mi := &file_Flight_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSessionOptionsResult_Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSessionOptionsResult_Error) ProtoMessage() {} + +func (x *SetSessionOptionsResult_Error) ProtoReflect() protoreflect.Message { + mi := &file_Flight_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSessionOptionsResult_Error.ProtoReflect.Descriptor instead. +func (*SetSessionOptionsResult_Error) Descriptor() ([]byte, []int) { + return file_Flight_proto_rawDescGZIP(), []int{22, 0} +} + +func (x *SetSessionOptionsResult_Error) GetValue() SetSessionOptionsResult_ErrorValue { + if x != nil { + return x.Value + } + return SetSessionOptionsResult_UNSPECIFIED +} + +var File_Flight_proto protoreflect.FileDescriptor + +var file_Flight_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, + 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x10, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, + 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, + 0x58, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x43, 0x0a, 0x09, 0x42, 0x61, 0x73, + 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x07, + 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x42, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x08, 0x43, + 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x65, 0x78, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x30, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x1c, 0x0a, 0x06, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x26, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, + 0xb6, 0x01, 0x0a, 0x10, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, + 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x63, + 0x6d, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x30, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x41, 0x54, 0x48, 0x10, 0x01, 0x12, + 0x07, 0x0a, 0x03, 0x43, 0x4d, 0x44, 0x10, 0x02, 0x22, 0xc0, 0x02, 0x0a, 0x0a, 0x46, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, + 0x54, 0x0a, 0x11, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x61, 0x72, 0x72, + 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x52, 0x10, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, + 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, + 0x61, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x8a, 0x02, 0x0a, 0x08, + 0x50, 0x6f, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, + 0x54, 0x0a, 0x11, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x61, 0x72, 0x72, + 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x52, 0x10, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x50, 0x0a, 0x17, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x55, 0x0a, 0x16, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x20, 0x0a, 0x06, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x22, 0x1c, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x69, 0x22, 0xec, 0x01, 0x0a, 0x0e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x61, 0x70, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x5f, 0x0a, 0x1a, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x22, 0xc4, 0x01, 0x0a, 0x0a, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x54, 0x0a, 0x11, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x61, 0x72, + 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x52, 0x10, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x64, 0x61, 0x74, + 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, + 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x2e, 0x0a, 0x09, 0x50, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x70, 0x70, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc6, 0x02, 0x0a, 0x12, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x10, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, + 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, + 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x67, 0x0a, + 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, + 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x29, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0xf6, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6c, + 0x0a, 0x0f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, + 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x53, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6c, 0x0a, 0x13, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x87, 0x03, 0x0a, 0x17, 0x53, + 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x52, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, + 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x1a, 0x58, 0x0a, 0x05, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x6f, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4d, 0x0a, 0x0a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, + 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x10, 0x03, 0x22, 0x1a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0xf4, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x6b, 0x0a, 0x0f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6c, 0x0a, 0x13, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x6c, 0x6f, 0x73, 0x65, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa5, + 0x01, 0x0a, 0x12, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x48, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, + 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, + 0x45, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, + 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4c, 0x4f, 0x53, 0x49, 0x4e, + 0x47, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, + 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x2a, 0x8b, 0x01, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x41, 0x4e, 0x43, 0x45, + 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x41, 0x42, + 0x4c, 0x45, 0x10, 0x03, 0x32, 0x85, 0x07, 0x0a, 0x0d, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x09, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, + 0x61, 0x6b, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x48, 0x61, 0x6e, 0x64, + 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, + 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x55, 0x0a, 0x0b, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x61, 0x72, + 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x1a, 0x21, 0x2e, 0x61, + 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, + 0x00, 0x30, 0x01, 0x12, 0x5d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x1a, 0x21, 0x2e, + 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0e, 0x50, 0x6f, 0x6c, 0x6c, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x1a, 0x1f, 0x2e, + 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x6f, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x00, + 0x12, 0x5b, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x2e, + 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x1a, 0x23, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x4d, 0x0a, + 0x05, 0x44, 0x6f, 0x47, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x30, 0x01, 0x12, 0x52, 0x0a, 0x05, + 0x44, 0x6f, 0x50, 0x75, 0x74, 0x12, 0x21, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x20, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, + 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, + 0x12, 0x58, 0x0a, 0x0a, 0x44, 0x6f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x21, + 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4c, 0x0a, 0x08, 0x44, 0x6f, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1d, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x30, 0x01, 0x12, 0x52, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, + 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x71, 0x0a, 0x1c, + 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, + 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x5a, 0x32, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, + 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2f, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0xaa, 0x02, 0x1c, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x41, 0x72, 0x72, 0x6f, 0x77, 0x2e, + 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_Flight_proto_rawDescOnce sync.Once + file_Flight_proto_rawDescData = file_Flight_proto_rawDesc +) + +func file_Flight_proto_rawDescGZIP() []byte { + file_Flight_proto_rawDescOnce.Do(func() { + file_Flight_proto_rawDescData = protoimpl.X.CompressGZIP(file_Flight_proto_rawDescData) + }) + return file_Flight_proto_rawDescData +} + +var file_Flight_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_Flight_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_Flight_proto_goTypes = []interface{}{ + (CancelStatus)(0), // 0: arrow.flight.protocol.CancelStatus + (FlightDescriptor_DescriptorType)(0), // 1: arrow.flight.protocol.FlightDescriptor.DescriptorType + (SetSessionOptionsResult_ErrorValue)(0), // 2: arrow.flight.protocol.SetSessionOptionsResult.ErrorValue + (CloseSessionResult_Status)(0), // 3: arrow.flight.protocol.CloseSessionResult.Status + (*HandshakeRequest)(nil), // 4: arrow.flight.protocol.HandshakeRequest + (*HandshakeResponse)(nil), // 5: arrow.flight.protocol.HandshakeResponse + (*BasicAuth)(nil), // 6: arrow.flight.protocol.BasicAuth + (*Empty)(nil), // 7: arrow.flight.protocol.Empty + (*ActionType)(nil), // 8: arrow.flight.protocol.ActionType + (*Criteria)(nil), // 9: arrow.flight.protocol.Criteria + (*Action)(nil), // 10: arrow.flight.protocol.Action + (*Result)(nil), // 11: arrow.flight.protocol.Result + (*SchemaResult)(nil), // 12: arrow.flight.protocol.SchemaResult + (*FlightDescriptor)(nil), // 13: arrow.flight.protocol.FlightDescriptor + (*FlightInfo)(nil), // 14: arrow.flight.protocol.FlightInfo + (*PollInfo)(nil), // 15: arrow.flight.protocol.PollInfo + (*CancelFlightInfoRequest)(nil), // 16: arrow.flight.protocol.CancelFlightInfoRequest + (*CancelFlightInfoResult)(nil), // 17: arrow.flight.protocol.CancelFlightInfoResult + (*Ticket)(nil), // 18: arrow.flight.protocol.Ticket + (*Location)(nil), // 19: arrow.flight.protocol.Location + (*FlightEndpoint)(nil), // 20: arrow.flight.protocol.FlightEndpoint + (*RenewFlightEndpointRequest)(nil), // 21: arrow.flight.protocol.RenewFlightEndpointRequest + (*FlightData)(nil), // 22: arrow.flight.protocol.FlightData + (*PutResult)(nil), // 23: arrow.flight.protocol.PutResult + (*SessionOptionValue)(nil), // 24: arrow.flight.protocol.SessionOptionValue + (*SetSessionOptionsRequest)(nil), // 25: arrow.flight.protocol.SetSessionOptionsRequest + (*SetSessionOptionsResult)(nil), // 26: arrow.flight.protocol.SetSessionOptionsResult + (*GetSessionOptionsRequest)(nil), // 27: arrow.flight.protocol.GetSessionOptionsRequest + (*GetSessionOptionsResult)(nil), // 28: arrow.flight.protocol.GetSessionOptionsResult + (*CloseSessionRequest)(nil), // 29: arrow.flight.protocol.CloseSessionRequest + (*CloseSessionResult)(nil), // 30: arrow.flight.protocol.CloseSessionResult + (*SessionOptionValue_StringListValue)(nil), // 31: arrow.flight.protocol.SessionOptionValue.StringListValue + nil, // 32: arrow.flight.protocol.SetSessionOptionsRequest.SessionOptionsEntry + (*SetSessionOptionsResult_Error)(nil), // 33: arrow.flight.protocol.SetSessionOptionsResult.Error + nil, // 34: arrow.flight.protocol.SetSessionOptionsResult.ErrorsEntry + nil, // 35: arrow.flight.protocol.GetSessionOptionsResult.SessionOptionsEntry + (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp +} +var file_Flight_proto_depIdxs = []int32{ + 1, // 0: arrow.flight.protocol.FlightDescriptor.type:type_name -> arrow.flight.protocol.FlightDescriptor.DescriptorType + 13, // 1: arrow.flight.protocol.FlightInfo.flight_descriptor:type_name -> arrow.flight.protocol.FlightDescriptor + 20, // 2: arrow.flight.protocol.FlightInfo.endpoint:type_name -> arrow.flight.protocol.FlightEndpoint + 14, // 3: arrow.flight.protocol.PollInfo.info:type_name -> arrow.flight.protocol.FlightInfo + 13, // 4: arrow.flight.protocol.PollInfo.flight_descriptor:type_name -> arrow.flight.protocol.FlightDescriptor + 36, // 5: arrow.flight.protocol.PollInfo.expiration_time:type_name -> google.protobuf.Timestamp + 14, // 6: arrow.flight.protocol.CancelFlightInfoRequest.info:type_name -> arrow.flight.protocol.FlightInfo + 0, // 7: arrow.flight.protocol.CancelFlightInfoResult.status:type_name -> arrow.flight.protocol.CancelStatus + 18, // 8: arrow.flight.protocol.FlightEndpoint.ticket:type_name -> arrow.flight.protocol.Ticket + 19, // 9: arrow.flight.protocol.FlightEndpoint.location:type_name -> arrow.flight.protocol.Location + 36, // 10: arrow.flight.protocol.FlightEndpoint.expiration_time:type_name -> google.protobuf.Timestamp + 20, // 11: arrow.flight.protocol.RenewFlightEndpointRequest.endpoint:type_name -> arrow.flight.protocol.FlightEndpoint + 13, // 12: arrow.flight.protocol.FlightData.flight_descriptor:type_name -> arrow.flight.protocol.FlightDescriptor + 31, // 13: arrow.flight.protocol.SessionOptionValue.string_list_value:type_name -> arrow.flight.protocol.SessionOptionValue.StringListValue + 32, // 14: arrow.flight.protocol.SetSessionOptionsRequest.session_options:type_name -> arrow.flight.protocol.SetSessionOptionsRequest.SessionOptionsEntry + 34, // 15: arrow.flight.protocol.SetSessionOptionsResult.errors:type_name -> arrow.flight.protocol.SetSessionOptionsResult.ErrorsEntry + 35, // 16: arrow.flight.protocol.GetSessionOptionsResult.session_options:type_name -> arrow.flight.protocol.GetSessionOptionsResult.SessionOptionsEntry + 3, // 17: arrow.flight.protocol.CloseSessionResult.status:type_name -> arrow.flight.protocol.CloseSessionResult.Status + 24, // 18: arrow.flight.protocol.SetSessionOptionsRequest.SessionOptionsEntry.value:type_name -> arrow.flight.protocol.SessionOptionValue + 2, // 19: arrow.flight.protocol.SetSessionOptionsResult.Error.value:type_name -> arrow.flight.protocol.SetSessionOptionsResult.ErrorValue + 33, // 20: arrow.flight.protocol.SetSessionOptionsResult.ErrorsEntry.value:type_name -> arrow.flight.protocol.SetSessionOptionsResult.Error + 24, // 21: arrow.flight.protocol.GetSessionOptionsResult.SessionOptionsEntry.value:type_name -> arrow.flight.protocol.SessionOptionValue + 4, // 22: arrow.flight.protocol.FlightService.Handshake:input_type -> arrow.flight.protocol.HandshakeRequest + 9, // 23: arrow.flight.protocol.FlightService.ListFlights:input_type -> arrow.flight.protocol.Criteria + 13, // 24: arrow.flight.protocol.FlightService.GetFlightInfo:input_type -> arrow.flight.protocol.FlightDescriptor + 13, // 25: arrow.flight.protocol.FlightService.PollFlightInfo:input_type -> arrow.flight.protocol.FlightDescriptor + 13, // 26: arrow.flight.protocol.FlightService.GetSchema:input_type -> arrow.flight.protocol.FlightDescriptor + 18, // 27: arrow.flight.protocol.FlightService.DoGet:input_type -> arrow.flight.protocol.Ticket + 22, // 28: arrow.flight.protocol.FlightService.DoPut:input_type -> arrow.flight.protocol.FlightData + 22, // 29: arrow.flight.protocol.FlightService.DoExchange:input_type -> arrow.flight.protocol.FlightData + 10, // 30: arrow.flight.protocol.FlightService.DoAction:input_type -> arrow.flight.protocol.Action + 7, // 31: arrow.flight.protocol.FlightService.ListActions:input_type -> arrow.flight.protocol.Empty + 5, // 32: arrow.flight.protocol.FlightService.Handshake:output_type -> arrow.flight.protocol.HandshakeResponse + 14, // 33: arrow.flight.protocol.FlightService.ListFlights:output_type -> arrow.flight.protocol.FlightInfo + 14, // 34: arrow.flight.protocol.FlightService.GetFlightInfo:output_type -> arrow.flight.protocol.FlightInfo + 15, // 35: arrow.flight.protocol.FlightService.PollFlightInfo:output_type -> arrow.flight.protocol.PollInfo + 12, // 36: arrow.flight.protocol.FlightService.GetSchema:output_type -> arrow.flight.protocol.SchemaResult + 22, // 37: arrow.flight.protocol.FlightService.DoGet:output_type -> arrow.flight.protocol.FlightData + 23, // 38: arrow.flight.protocol.FlightService.DoPut:output_type -> arrow.flight.protocol.PutResult + 22, // 39: arrow.flight.protocol.FlightService.DoExchange:output_type -> arrow.flight.protocol.FlightData + 11, // 40: arrow.flight.protocol.FlightService.DoAction:output_type -> arrow.flight.protocol.Result + 8, // 41: arrow.flight.protocol.FlightService.ListActions:output_type -> arrow.flight.protocol.ActionType + 32, // [32:42] is the sub-list for method output_type + 22, // [22:32] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_Flight_proto_init() } +func file_Flight_proto_init() { + if File_Flight_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_Flight_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandshakeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandshakeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BasicAuth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Criteria); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Action); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Result); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SchemaResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlightDescriptor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlightInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PollInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelFlightInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelFlightInfoResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ticket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Location); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlightEndpoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenewFlightEndpointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlightData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SessionOptionValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSessionOptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSessionOptionsResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSessionOptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSessionOptionsResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseSessionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseSessionResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SessionOptionValue_StringListValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Flight_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSessionOptionsResult_Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_Flight_proto_msgTypes[11].OneofWrappers = []interface{}{} + file_Flight_proto_msgTypes[20].OneofWrappers = []interface{}{ + (*SessionOptionValue_StringValue)(nil), + (*SessionOptionValue_BoolValue)(nil), + (*SessionOptionValue_Int64Value)(nil), + (*SessionOptionValue_DoubleValue)(nil), + (*SessionOptionValue_StringListValue_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_Flight_proto_rawDesc, + NumEnums: 4, + NumMessages: 32, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_Flight_proto_goTypes, + DependencyIndexes: file_Flight_proto_depIdxs, + EnumInfos: file_Flight_proto_enumTypes, + MessageInfos: file_Flight_proto_msgTypes, + }.Build() + File_Flight_proto = out.File + file_Flight_proto_rawDesc = nil + file_Flight_proto_goTypes = nil + file_Flight_proto_depIdxs = nil +} diff --git a/dev/flight-integration/flight/FlightSql.pb.go b/dev/flight-integration/flight/FlightSql.pb.go new file mode 100644 index 0000000000000..70180b05fa173 --- /dev/null +++ b/dev/flight-integration/flight/FlightSql.pb.go @@ -0,0 +1,6071 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +//

+// http://www.apache.org/licenses/LICENSE-2.0 +//

+// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v4.25.3 +// source: FlightSql.proto + +package flight + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Options for CommandGetSqlInfo. +type SqlInfo int32 + +const ( + // Retrieves a UTF-8 string with the name of the Flight SQL Server. + SqlInfo_FLIGHT_SQL_SERVER_NAME SqlInfo = 0 + // Retrieves a UTF-8 string with the native version of the Flight SQL Server. + SqlInfo_FLIGHT_SQL_SERVER_VERSION SqlInfo = 1 + // Retrieves a UTF-8 string with the Arrow format version of the Flight SQL Server. + SqlInfo_FLIGHT_SQL_SERVER_ARROW_VERSION SqlInfo = 2 + // Retrieves a boolean value indicating whether the Flight SQL Server is read only. + // + // Returns: + // - false: if read-write + // - true: if read only + SqlInfo_FLIGHT_SQL_SERVER_READ_ONLY SqlInfo = 3 + // Retrieves a boolean value indicating whether the Flight SQL Server supports executing + // SQL queries. + // + // Note that the absence of this info (as opposed to a false value) does not necessarily + // mean that SQL is not supported, as this property was not originally defined. + SqlInfo_FLIGHT_SQL_SERVER_SQL SqlInfo = 4 + // Retrieves a boolean value indicating whether the Flight SQL Server supports executing + // Substrait plans. + SqlInfo_FLIGHT_SQL_SERVER_SUBSTRAIT SqlInfo = 5 + // Retrieves a string value indicating the minimum supported Substrait version, or null + // if Substrait is not supported. + SqlInfo_FLIGHT_SQL_SERVER_SUBSTRAIT_MIN_VERSION SqlInfo = 6 + // Retrieves a string value indicating the maximum supported Substrait version, or null + // if Substrait is not supported. + SqlInfo_FLIGHT_SQL_SERVER_SUBSTRAIT_MAX_VERSION SqlInfo = 7 + // Retrieves an int32 indicating whether the Flight SQL Server supports the + // BeginTransaction/EndTransaction/BeginSavepoint/EndSavepoint actions. + // + // Even if this is not supported, the database may still support explicit "BEGIN + // TRANSACTION"/"COMMIT" SQL statements (see SQL_TRANSACTIONS_SUPPORTED); this property + // is only about whether the server implements the Flight SQL API endpoints. + // + // The possible values are listed in `SqlSupportedTransaction`. + SqlInfo_FLIGHT_SQL_SERVER_TRANSACTION SqlInfo = 8 + // Retrieves a boolean value indicating whether the Flight SQL Server supports explicit + // query cancellation (the CancelQuery action). + SqlInfo_FLIGHT_SQL_SERVER_CANCEL SqlInfo = 9 + // Retrieves a boolean value indicating whether the Flight SQL Server supports executing + // bulk ingestion. + SqlInfo_FLIGHT_SQL_SERVER_BULK_INGESTION SqlInfo = 10 + // Retrieves a boolean value indicating whether transactions are supported for bulk ingestion. If not, invoking + // the method commit in the context of a bulk ingestion is a noop, and the isolation level is + // `arrow.flight.protocol.sql.SqlTransactionIsolationLevel.TRANSACTION_NONE`. + // + // Returns: + // - false: if bulk ingestion transactions are unsupported; + // - true: if bulk ingestion transactions are supported. + SqlInfo_FLIGHT_SQL_SERVER_INGEST_TRANSACTIONS_SUPPORTED SqlInfo = 11 + // Retrieves an int32 indicating the timeout (in milliseconds) for prepared statement handles. + // + // If 0, there is no timeout. Servers should reset the timeout when the handle is used in a command. + SqlInfo_FLIGHT_SQL_SERVER_STATEMENT_TIMEOUT SqlInfo = 100 + // Retrieves an int32 indicating the timeout (in milliseconds) for transactions, since transactions are not tied to a connection. + // + // If 0, there is no timeout. Servers should reset the timeout when the handle is used in a command. + SqlInfo_FLIGHT_SQL_SERVER_TRANSACTION_TIMEOUT SqlInfo = 101 + // Retrieves a boolean value indicating whether the Flight SQL Server supports CREATE and DROP of catalogs. + // + // Returns: + // - false: if it doesn't support CREATE and DROP of catalogs. + // - true: if it supports CREATE and DROP of catalogs. + SqlInfo_SQL_DDL_CATALOG SqlInfo = 500 + // Retrieves a boolean value indicating whether the Flight SQL Server supports CREATE and DROP of schemas. + // + // Returns: + // - false: if it doesn't support CREATE and DROP of schemas. + // - true: if it supports CREATE and DROP of schemas. + SqlInfo_SQL_DDL_SCHEMA SqlInfo = 501 + // Indicates whether the Flight SQL Server supports CREATE and DROP of tables. + // + // Returns: + // - false: if it doesn't support CREATE and DROP of tables. + // - true: if it supports CREATE and DROP of tables. + SqlInfo_SQL_DDL_TABLE SqlInfo = 502 + // Retrieves a int32 ordinal representing the case sensitivity of catalog, table, schema and table names. + // + // The possible values are listed in `arrow.flight.protocol.sql.SqlSupportedCaseSensitivity`. + SqlInfo_SQL_IDENTIFIER_CASE SqlInfo = 503 + // Retrieves a UTF-8 string with the supported character(s) used to surround a delimited identifier. + SqlInfo_SQL_IDENTIFIER_QUOTE_CHAR SqlInfo = 504 + // Retrieves a int32 describing the case sensitivity of quoted identifiers. + // + // The possible values are listed in `arrow.flight.protocol.sql.SqlSupportedCaseSensitivity`. + SqlInfo_SQL_QUOTED_IDENTIFIER_CASE SqlInfo = 505 + // Retrieves a boolean value indicating whether all tables are selectable. + // + // Returns: + // - false: if not all tables are selectable or if none are; + // - true: if all tables are selectable. + SqlInfo_SQL_ALL_TABLES_ARE_SELECTABLE SqlInfo = 506 + // Retrieves the null ordering. + // + // Returns a int32 ordinal for the null ordering being used, as described in + // `arrow.flight.protocol.sql.SqlNullOrdering`. + SqlInfo_SQL_NULL_ORDERING SqlInfo = 507 + // Retrieves a UTF-8 string list with values of the supported keywords. + SqlInfo_SQL_KEYWORDS SqlInfo = 508 + // Retrieves a UTF-8 string list with values of the supported numeric functions. + SqlInfo_SQL_NUMERIC_FUNCTIONS SqlInfo = 509 + // Retrieves a UTF-8 string list with values of the supported string functions. + SqlInfo_SQL_STRING_FUNCTIONS SqlInfo = 510 + // Retrieves a UTF-8 string list with values of the supported system functions. + SqlInfo_SQL_SYSTEM_FUNCTIONS SqlInfo = 511 + // Retrieves a UTF-8 string list with values of the supported datetime functions. + SqlInfo_SQL_DATETIME_FUNCTIONS SqlInfo = 512 + // Retrieves the UTF-8 string that can be used to escape wildcard characters. + // This is the string that can be used to escape '_' or '%' in the catalog search parameters that are a pattern + // (and therefore use one of the wildcard characters). + // The '_' character represents any single character; the '%' character represents any sequence of zero or more + // characters. + SqlInfo_SQL_SEARCH_STRING_ESCAPE SqlInfo = 513 + // Retrieves a UTF-8 string with all the "extra" characters that can be used in unquoted identifier names + // (those beyond a-z, A-Z, 0-9 and _). + SqlInfo_SQL_EXTRA_NAME_CHARACTERS SqlInfo = 514 + // Retrieves a boolean value indicating whether column aliasing is supported. + // If so, the SQL AS clause can be used to provide names for computed columns or to provide alias names for columns + // as required. + // + // Returns: + // - false: if column aliasing is unsupported; + // - true: if column aliasing is supported. + SqlInfo_SQL_SUPPORTS_COLUMN_ALIASING SqlInfo = 515 + // Retrieves a boolean value indicating whether concatenations between null and non-null values being + // null are supported. + // + // - Returns: + // - false: if concatenations between null and non-null values being null are unsupported; + // - true: if concatenations between null and non-null values being null are supported. + SqlInfo_SQL_NULL_PLUS_NULL_IS_NULL SqlInfo = 516 + // Retrieves a map where the key is the type to convert from and the value is a list with the types to convert to, + // indicating the supported conversions. Each key and each item on the list value is a value to a predefined type on + // SqlSupportsConvert enum. + // The returned map will be: map> + SqlInfo_SQL_SUPPORTS_CONVERT SqlInfo = 517 + // Retrieves a boolean value indicating whether, when table correlation names are supported, + // they are restricted to being different from the names of the tables. + // + // Returns: + // - false: if table correlation names are unsupported; + // - true: if table correlation names are supported. + SqlInfo_SQL_SUPPORTS_TABLE_CORRELATION_NAMES SqlInfo = 518 + // Retrieves a boolean value indicating whether, when table correlation names are supported, + // they are restricted to being different from the names of the tables. + // + // Returns: + // - false: if different table correlation names are unsupported; + // - true: if different table correlation names are supported + SqlInfo_SQL_SUPPORTS_DIFFERENT_TABLE_CORRELATION_NAMES SqlInfo = 519 + // Retrieves a boolean value indicating whether expressions in ORDER BY lists are supported. + // + // Returns: + // - false: if expressions in ORDER BY are unsupported; + // - true: if expressions in ORDER BY are supported; + SqlInfo_SQL_SUPPORTS_EXPRESSIONS_IN_ORDER_BY SqlInfo = 520 + // Retrieves a boolean value indicating whether using a column that is not in the SELECT statement in a GROUP BY + // clause is supported. + // + // Returns: + // - false: if using a column that is not in the SELECT statement in a GROUP BY clause is unsupported; + // - true: if using a column that is not in the SELECT statement in a GROUP BY clause is supported. + SqlInfo_SQL_SUPPORTS_ORDER_BY_UNRELATED SqlInfo = 521 + // Retrieves the supported GROUP BY commands; + // + // Returns an int32 bitmask value representing the supported commands. + // The returned bitmask should be parsed in order to retrieve the supported commands. + // + // For instance: + // - return 0 (\b0) => [] (GROUP BY is unsupported); + // - return 1 (\b1) => [SQL_GROUP_BY_UNRELATED]; + // - return 2 (\b10) => [SQL_GROUP_BY_BEYOND_SELECT]; + // - return 3 (\b11) => [SQL_GROUP_BY_UNRELATED, SQL_GROUP_BY_BEYOND_SELECT]. + // Valid GROUP BY types are described under `arrow.flight.protocol.sql.SqlSupportedGroupBy`. + SqlInfo_SQL_SUPPORTED_GROUP_BY SqlInfo = 522 + // Retrieves a boolean value indicating whether specifying a LIKE escape clause is supported. + // + // Returns: + // - false: if specifying a LIKE escape clause is unsupported; + // - true: if specifying a LIKE escape clause is supported. + SqlInfo_SQL_SUPPORTS_LIKE_ESCAPE_CLAUSE SqlInfo = 523 + // Retrieves a boolean value indicating whether columns may be defined as non-nullable. + // + // Returns: + // - false: if columns cannot be defined as non-nullable; + // - true: if columns may be defined as non-nullable. + SqlInfo_SQL_SUPPORTS_NON_NULLABLE_COLUMNS SqlInfo = 524 + // Retrieves the supported SQL grammar level as per the ODBC specification. + // + // Returns an int32 bitmask value representing the supported SQL grammar level. + // The returned bitmask should be parsed in order to retrieve the supported grammar levels. + // + // For instance: + // - return 0 (\b0) => [] (SQL grammar is unsupported); + // - return 1 (\b1) => [SQL_MINIMUM_GRAMMAR]; + // - return 2 (\b10) => [SQL_CORE_GRAMMAR]; + // - return 3 (\b11) => [SQL_MINIMUM_GRAMMAR, SQL_CORE_GRAMMAR]; + // - return 4 (\b100) => [SQL_EXTENDED_GRAMMAR]; + // - return 5 (\b101) => [SQL_MINIMUM_GRAMMAR, SQL_EXTENDED_GRAMMAR]; + // - return 6 (\b110) => [SQL_CORE_GRAMMAR, SQL_EXTENDED_GRAMMAR]; + // - return 7 (\b111) => [SQL_MINIMUM_GRAMMAR, SQL_CORE_GRAMMAR, SQL_EXTENDED_GRAMMAR]. + // Valid SQL grammar levels are described under `arrow.flight.protocol.sql.SupportedSqlGrammar`. + SqlInfo_SQL_SUPPORTED_GRAMMAR SqlInfo = 525 + // Retrieves the supported ANSI92 SQL grammar level. + // + // Returns an int32 bitmask value representing the supported ANSI92 SQL grammar level. + // The returned bitmask should be parsed in order to retrieve the supported commands. + // + // For instance: + // - return 0 (\b0) => [] (ANSI92 SQL grammar is unsupported); + // - return 1 (\b1) => [ANSI92_ENTRY_SQL]; + // - return 2 (\b10) => [ANSI92_INTERMEDIATE_SQL]; + // - return 3 (\b11) => [ANSI92_ENTRY_SQL, ANSI92_INTERMEDIATE_SQL]; + // - return 4 (\b100) => [ANSI92_FULL_SQL]; + // - return 5 (\b101) => [ANSI92_ENTRY_SQL, ANSI92_FULL_SQL]; + // - return 6 (\b110) => [ANSI92_INTERMEDIATE_SQL, ANSI92_FULL_SQL]; + // - return 7 (\b111) => [ANSI92_ENTRY_SQL, ANSI92_INTERMEDIATE_SQL, ANSI92_FULL_SQL]. + // Valid ANSI92 SQL grammar levels are described under `arrow.flight.protocol.sql.SupportedAnsi92SqlGrammarLevel`. + SqlInfo_SQL_ANSI92_SUPPORTED_LEVEL SqlInfo = 526 + // Retrieves a boolean value indicating whether the SQL Integrity Enhancement Facility is supported. + // + // Returns: + // - false: if the SQL Integrity Enhancement Facility is supported; + // - true: if the SQL Integrity Enhancement Facility is supported. + SqlInfo_SQL_SUPPORTS_INTEGRITY_ENHANCEMENT_FACILITY SqlInfo = 527 + // Retrieves the support level for SQL OUTER JOINs. + // + // Returns a int32 ordinal for the SQL ordering being used, as described in + // `arrow.flight.protocol.sql.SqlOuterJoinsSupportLevel`. + SqlInfo_SQL_OUTER_JOINS_SUPPORT_LEVEL SqlInfo = 528 + // Retrieves a UTF-8 string with the preferred term for "schema". + SqlInfo_SQL_SCHEMA_TERM SqlInfo = 529 + // Retrieves a UTF-8 string with the preferred term for "procedure". + SqlInfo_SQL_PROCEDURE_TERM SqlInfo = 530 + // Retrieves a UTF-8 string with the preferred term for "catalog". + // If a empty string is returned its assumed that the server does NOT supports catalogs. + SqlInfo_SQL_CATALOG_TERM SqlInfo = 531 + // Retrieves a boolean value indicating whether a catalog appears at the start of a fully qualified table name. + // + // - false: if a catalog does not appear at the start of a fully qualified table name; + // - true: if a catalog appears at the start of a fully qualified table name. + SqlInfo_SQL_CATALOG_AT_START SqlInfo = 532 + // Retrieves the supported actions for a SQL schema. + // + // Returns an int32 bitmask value representing the supported actions for a SQL schema. + // The returned bitmask should be parsed in order to retrieve the supported actions for a SQL schema. + // + // For instance: + // - return 0 (\b0) => [] (no supported actions for SQL schema); + // - return 1 (\b1) => [SQL_ELEMENT_IN_PROCEDURE_CALLS]; + // - return 2 (\b10) => [SQL_ELEMENT_IN_INDEX_DEFINITIONS]; + // - return 3 (\b11) => [SQL_ELEMENT_IN_PROCEDURE_CALLS, SQL_ELEMENT_IN_INDEX_DEFINITIONS]; + // - return 4 (\b100) => [SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS]; + // - return 5 (\b101) => [SQL_ELEMENT_IN_PROCEDURE_CALLS, SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS]; + // - return 6 (\b110) => [SQL_ELEMENT_IN_INDEX_DEFINITIONS, SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS]; + // - return 7 (\b111) => [SQL_ELEMENT_IN_PROCEDURE_CALLS, SQL_ELEMENT_IN_INDEX_DEFINITIONS, SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS]. + // Valid actions for a SQL schema described under `arrow.flight.protocol.sql.SqlSupportedElementActions`. + SqlInfo_SQL_SCHEMAS_SUPPORTED_ACTIONS SqlInfo = 533 + // Retrieves the supported actions for a SQL schema. + // + // Returns an int32 bitmask value representing the supported actions for a SQL catalog. + // The returned bitmask should be parsed in order to retrieve the supported actions for a SQL catalog. + // + // For instance: + // - return 0 (\b0) => [] (no supported actions for SQL catalog); + // - return 1 (\b1) => [SQL_ELEMENT_IN_PROCEDURE_CALLS]; + // - return 2 (\b10) => [SQL_ELEMENT_IN_INDEX_DEFINITIONS]; + // - return 3 (\b11) => [SQL_ELEMENT_IN_PROCEDURE_CALLS, SQL_ELEMENT_IN_INDEX_DEFINITIONS]; + // - return 4 (\b100) => [SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS]; + // - return 5 (\b101) => [SQL_ELEMENT_IN_PROCEDURE_CALLS, SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS]; + // - return 6 (\b110) => [SQL_ELEMENT_IN_INDEX_DEFINITIONS, SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS]; + // - return 7 (\b111) => [SQL_ELEMENT_IN_PROCEDURE_CALLS, SQL_ELEMENT_IN_INDEX_DEFINITIONS, SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS]. + // Valid actions for a SQL catalog are described under `arrow.flight.protocol.sql.SqlSupportedElementActions`. + SqlInfo_SQL_CATALOGS_SUPPORTED_ACTIONS SqlInfo = 534 + // Retrieves the supported SQL positioned commands. + // + // Returns an int32 bitmask value representing the supported SQL positioned commands. + // The returned bitmask should be parsed in order to retrieve the supported SQL positioned commands. + // + // For instance: + // - return 0 (\b0) => [] (no supported SQL positioned commands); + // - return 1 (\b1) => [SQL_POSITIONED_DELETE]; + // - return 2 (\b10) => [SQL_POSITIONED_UPDATE]; + // - return 3 (\b11) => [SQL_POSITIONED_DELETE, SQL_POSITIONED_UPDATE]. + // Valid SQL positioned commands are described under `arrow.flight.protocol.sql.SqlSupportedPositionedCommands`. + SqlInfo_SQL_SUPPORTED_POSITIONED_COMMANDS SqlInfo = 535 + // Retrieves a boolean value indicating whether SELECT FOR UPDATE statements are supported. + // + // Returns: + // - false: if SELECT FOR UPDATE statements are unsupported; + // - true: if SELECT FOR UPDATE statements are supported. + SqlInfo_SQL_SELECT_FOR_UPDATE_SUPPORTED SqlInfo = 536 + // Retrieves a boolean value indicating whether stored procedure calls that use the stored procedure escape syntax + // are supported. + // + // Returns: + // - false: if stored procedure calls that use the stored procedure escape syntax are unsupported; + // - true: if stored procedure calls that use the stored procedure escape syntax are supported. + SqlInfo_SQL_STORED_PROCEDURES_SUPPORTED SqlInfo = 537 + // Retrieves the supported SQL subqueries. + // + // Returns an int32 bitmask value representing the supported SQL subqueries. + // The returned bitmask should be parsed in order to retrieve the supported SQL subqueries. + // + // For instance: + // - return 0 (\b0) => [] (no supported SQL subqueries); + // - return 1 (\b1) => [SQL_SUBQUERIES_IN_COMPARISONS]; + // - return 2 (\b10) => [SQL_SUBQUERIES_IN_EXISTS]; + // - return 3 (\b11) => [SQL_SUBQUERIES_IN_COMPARISONS, SQL_SUBQUERIES_IN_EXISTS]; + // - return 4 (\b100) => [SQL_SUBQUERIES_IN_INS]; + // - return 5 (\b101) => [SQL_SUBQUERIES_IN_COMPARISONS, SQL_SUBQUERIES_IN_INS]; + // - return 6 (\b110) => [SQL_SUBQUERIES_IN_INS, SQL_SUBQUERIES_IN_EXISTS]; + // - return 7 (\b111) => [SQL_SUBQUERIES_IN_COMPARISONS, SQL_SUBQUERIES_IN_EXISTS, SQL_SUBQUERIES_IN_INS]; + // - return 8 (\b1000) => [SQL_SUBQUERIES_IN_QUANTIFIEDS]; + // - return 9 (\b1001) => [SQL_SUBQUERIES_IN_COMPARISONS, SQL_SUBQUERIES_IN_QUANTIFIEDS]; + // - return 10 (\b1010) => [SQL_SUBQUERIES_IN_EXISTS, SQL_SUBQUERIES_IN_QUANTIFIEDS]; + // - return 11 (\b1011) => [SQL_SUBQUERIES_IN_COMPARISONS, SQL_SUBQUERIES_IN_EXISTS, SQL_SUBQUERIES_IN_QUANTIFIEDS]; + // - return 12 (\b1100) => [SQL_SUBQUERIES_IN_INS, SQL_SUBQUERIES_IN_QUANTIFIEDS]; + // - return 13 (\b1101) => [SQL_SUBQUERIES_IN_COMPARISONS, SQL_SUBQUERIES_IN_INS, SQL_SUBQUERIES_IN_QUANTIFIEDS]; + // - return 14 (\b1110) => [SQL_SUBQUERIES_IN_EXISTS, SQL_SUBQUERIES_IN_INS, SQL_SUBQUERIES_IN_QUANTIFIEDS]; + // - return 15 (\b1111) => [SQL_SUBQUERIES_IN_COMPARISONS, SQL_SUBQUERIES_IN_EXISTS, SQL_SUBQUERIES_IN_INS, SQL_SUBQUERIES_IN_QUANTIFIEDS]; + // - ... + // Valid SQL subqueries are described under `arrow.flight.protocol.sql.SqlSupportedSubqueries`. + SqlInfo_SQL_SUPPORTED_SUBQUERIES SqlInfo = 538 + // Retrieves a boolean value indicating whether correlated subqueries are supported. + // + // Returns: + // - false: if correlated subqueries are unsupported; + // - true: if correlated subqueries are supported. + SqlInfo_SQL_CORRELATED_SUBQUERIES_SUPPORTED SqlInfo = 539 + // Retrieves the supported SQL UNIONs. + // + // Returns an int32 bitmask value representing the supported SQL UNIONs. + // The returned bitmask should be parsed in order to retrieve the supported SQL UNIONs. + // + // For instance: + // - return 0 (\b0) => [] (no supported SQL positioned commands); + // - return 1 (\b1) => [SQL_UNION]; + // - return 2 (\b10) => [SQL_UNION_ALL]; + // - return 3 (\b11) => [SQL_UNION, SQL_UNION_ALL]. + // Valid SQL positioned commands are described under `arrow.flight.protocol.sql.SqlSupportedUnions`. + SqlInfo_SQL_SUPPORTED_UNIONS SqlInfo = 540 + // Retrieves a int64 value representing the maximum number of hex characters allowed in an inline binary literal. + SqlInfo_SQL_MAX_BINARY_LITERAL_LENGTH SqlInfo = 541 + // Retrieves a int64 value representing the maximum number of characters allowed for a character literal. + SqlInfo_SQL_MAX_CHAR_LITERAL_LENGTH SqlInfo = 542 + // Retrieves a int64 value representing the maximum number of characters allowed for a column name. + SqlInfo_SQL_MAX_COLUMN_NAME_LENGTH SqlInfo = 543 + // Retrieves a int64 value representing the maximum number of columns allowed in a GROUP BY clause. + SqlInfo_SQL_MAX_COLUMNS_IN_GROUP_BY SqlInfo = 544 + // Retrieves a int64 value representing the maximum number of columns allowed in an index. + SqlInfo_SQL_MAX_COLUMNS_IN_INDEX SqlInfo = 545 + // Retrieves a int64 value representing the maximum number of columns allowed in an ORDER BY clause. + SqlInfo_SQL_MAX_COLUMNS_IN_ORDER_BY SqlInfo = 546 + // Retrieves a int64 value representing the maximum number of columns allowed in a SELECT list. + SqlInfo_SQL_MAX_COLUMNS_IN_SELECT SqlInfo = 547 + // Retrieves a int64 value representing the maximum number of columns allowed in a table. + SqlInfo_SQL_MAX_COLUMNS_IN_TABLE SqlInfo = 548 + // Retrieves a int64 value representing the maximum number of concurrent connections possible. + SqlInfo_SQL_MAX_CONNECTIONS SqlInfo = 549 + // Retrieves a int64 value the maximum number of characters allowed in a cursor name. + SqlInfo_SQL_MAX_CURSOR_NAME_LENGTH SqlInfo = 550 + // Retrieves a int64 value representing the maximum number of bytes allowed for an index, + // including all of the parts of the index. + SqlInfo_SQL_MAX_INDEX_LENGTH SqlInfo = 551 + // Retrieves a int64 value representing the maximum number of characters allowed in a schema name. + SqlInfo_SQL_DB_SCHEMA_NAME_LENGTH SqlInfo = 552 + // Retrieves a int64 value representing the maximum number of characters allowed in a procedure name. + SqlInfo_SQL_MAX_PROCEDURE_NAME_LENGTH SqlInfo = 553 + // Retrieves a int64 value representing the maximum number of characters allowed in a catalog name. + SqlInfo_SQL_MAX_CATALOG_NAME_LENGTH SqlInfo = 554 + // Retrieves a int64 value representing the maximum number of bytes allowed in a single row. + SqlInfo_SQL_MAX_ROW_SIZE SqlInfo = 555 + // Retrieves a boolean indicating whether the return value for the JDBC method getMaxRowSize includes the SQL + // data types LONGVARCHAR and LONGVARBINARY. + // + // Returns: + // - false: if return value for the JDBC method getMaxRowSize does + // not include the SQL data types LONGVARCHAR and LONGVARBINARY; + // - true: if return value for the JDBC method getMaxRowSize includes + // the SQL data types LONGVARCHAR and LONGVARBINARY. + SqlInfo_SQL_MAX_ROW_SIZE_INCLUDES_BLOBS SqlInfo = 556 + // Retrieves a int64 value representing the maximum number of characters allowed for an SQL statement; + // a result of 0 (zero) means that there is no limit or the limit is not known. + SqlInfo_SQL_MAX_STATEMENT_LENGTH SqlInfo = 557 + // Retrieves a int64 value representing the maximum number of active statements that can be open at the same time. + SqlInfo_SQL_MAX_STATEMENTS SqlInfo = 558 + // Retrieves a int64 value representing the maximum number of characters allowed in a table name. + SqlInfo_SQL_MAX_TABLE_NAME_LENGTH SqlInfo = 559 + // Retrieves a int64 value representing the maximum number of tables allowed in a SELECT statement. + SqlInfo_SQL_MAX_TABLES_IN_SELECT SqlInfo = 560 + // Retrieves a int64 value representing the maximum number of characters allowed in a user name. + SqlInfo_SQL_MAX_USERNAME_LENGTH SqlInfo = 561 + // Retrieves this database's default transaction isolation level as described in + // `arrow.flight.protocol.sql.SqlTransactionIsolationLevel`. + // + // Returns a int32 ordinal for the SQL transaction isolation level. + SqlInfo_SQL_DEFAULT_TRANSACTION_ISOLATION SqlInfo = 562 + // Retrieves a boolean value indicating whether transactions are supported. If not, invoking the method commit is a + // noop, and the isolation level is `arrow.flight.protocol.sql.SqlTransactionIsolationLevel.TRANSACTION_NONE`. + // + // Returns: + // - false: if transactions are unsupported; + // - true: if transactions are supported. + SqlInfo_SQL_TRANSACTIONS_SUPPORTED SqlInfo = 563 + // Retrieves the supported transactions isolation levels. + // + // Returns an int32 bitmask value representing the supported transactions isolation levels. + // The returned bitmask should be parsed in order to retrieve the supported transactions isolation levels. + // + // For instance: + // - return 0 (\b0) => [] (no supported SQL transactions isolation levels); + // - return 1 (\b1) => [SQL_TRANSACTION_NONE]; + // - return 2 (\b10) => [SQL_TRANSACTION_READ_UNCOMMITTED]; + // - return 3 (\b11) => [SQL_TRANSACTION_NONE, SQL_TRANSACTION_READ_UNCOMMITTED]; + // - return 4 (\b100) => [SQL_TRANSACTION_REPEATABLE_READ]; + // - return 5 (\b101) => [SQL_TRANSACTION_NONE, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 6 (\b110) => [SQL_TRANSACTION_READ_UNCOMMITTED, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 7 (\b111) => [SQL_TRANSACTION_NONE, SQL_TRANSACTION_READ_UNCOMMITTED, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 8 (\b1000) => [SQL_TRANSACTION_REPEATABLE_READ]; + // - return 9 (\b1001) => [SQL_TRANSACTION_NONE, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 10 (\b1010) => [SQL_TRANSACTION_READ_UNCOMMITTED, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 11 (\b1011) => [SQL_TRANSACTION_NONE, SQL_TRANSACTION_READ_UNCOMMITTED, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 12 (\b1100) => [SQL_TRANSACTION_REPEATABLE_READ, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 13 (\b1101) => [SQL_TRANSACTION_NONE, SQL_TRANSACTION_REPEATABLE_READ, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 14 (\b1110) => [SQL_TRANSACTION_READ_UNCOMMITTED, SQL_TRANSACTION_REPEATABLE_READ, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 15 (\b1111) => [SQL_TRANSACTION_NONE, SQL_TRANSACTION_READ_UNCOMMITTED, SQL_TRANSACTION_REPEATABLE_READ, SQL_TRANSACTION_REPEATABLE_READ]; + // - return 16 (\b10000) => [SQL_TRANSACTION_SERIALIZABLE]; + // - ... + // Valid SQL positioned commands are described under `arrow.flight.protocol.sql.SqlTransactionIsolationLevel`. + SqlInfo_SQL_SUPPORTED_TRANSACTIONS_ISOLATION_LEVELS SqlInfo = 564 + // Retrieves a boolean value indicating whether a data definition statement within a transaction forces + // the transaction to commit. + // + // Returns: + // - false: if a data definition statement within a transaction does not force the transaction to commit; + // - true: if a data definition statement within a transaction forces the transaction to commit. + SqlInfo_SQL_DATA_DEFINITION_CAUSES_TRANSACTION_COMMIT SqlInfo = 565 + // Retrieves a boolean value indicating whether a data definition statement within a transaction is ignored. + // + // Returns: + // - false: if a data definition statement within a transaction is taken into account; + // - true: a data definition statement within a transaction is ignored. + SqlInfo_SQL_DATA_DEFINITIONS_IN_TRANSACTIONS_IGNORED SqlInfo = 566 + // Retrieves an int32 bitmask value representing the supported result set types. + // The returned bitmask should be parsed in order to retrieve the supported result set types. + // + // For instance: + // - return 0 (\b0) => [] (no supported result set types); + // - return 1 (\b1) => [SQL_RESULT_SET_TYPE_UNSPECIFIED]; + // - return 2 (\b10) => [SQL_RESULT_SET_TYPE_FORWARD_ONLY]; + // - return 3 (\b11) => [SQL_RESULT_SET_TYPE_UNSPECIFIED, SQL_RESULT_SET_TYPE_FORWARD_ONLY]; + // - return 4 (\b100) => [SQL_RESULT_SET_TYPE_SCROLL_INSENSITIVE]; + // - return 5 (\b101) => [SQL_RESULT_SET_TYPE_UNSPECIFIED, SQL_RESULT_SET_TYPE_SCROLL_INSENSITIVE]; + // - return 6 (\b110) => [SQL_RESULT_SET_TYPE_FORWARD_ONLY, SQL_RESULT_SET_TYPE_SCROLL_INSENSITIVE]; + // - return 7 (\b111) => [SQL_RESULT_SET_TYPE_UNSPECIFIED, SQL_RESULT_SET_TYPE_FORWARD_ONLY, SQL_RESULT_SET_TYPE_SCROLL_INSENSITIVE]; + // - return 8 (\b1000) => [SQL_RESULT_SET_TYPE_SCROLL_SENSITIVE]; + // - ... + // Valid result set types are described under `arrow.flight.protocol.sql.SqlSupportedResultSetType`. + SqlInfo_SQL_SUPPORTED_RESULT_SET_TYPES SqlInfo = 567 + // Returns an int32 bitmask value concurrency types supported for + // `arrow.flight.protocol.sql.SqlSupportedResultSetType.SQL_RESULT_SET_TYPE_UNSPECIFIED`. + // + // For instance: + // - return 0 (\b0) => [] (no supported concurrency types for this result set type) + // - return 1 (\b1) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED] + // - return 2 (\b10) => [SQL_RESULT_SET_CONCURRENCY_READ_ONLY] + // - return 3 (\b11) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_READ_ONLY] + // - return 4 (\b100) => [SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 5 (\b101) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 6 (\b110) => [SQL_RESULT_SET_CONCURRENCY_READ_ONLY, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 7 (\b111) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_READ_ONLY, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // Valid result set types are described under `arrow.flight.protocol.sql.SqlSupportedResultSetConcurrency`. + SqlInfo_SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_UNSPECIFIED SqlInfo = 568 + // Returns an int32 bitmask value concurrency types supported for + // `arrow.flight.protocol.sql.SqlSupportedResultSetType.SQL_RESULT_SET_TYPE_FORWARD_ONLY`. + // + // For instance: + // - return 0 (\b0) => [] (no supported concurrency types for this result set type) + // - return 1 (\b1) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED] + // - return 2 (\b10) => [SQL_RESULT_SET_CONCURRENCY_READ_ONLY] + // - return 3 (\b11) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_READ_ONLY] + // - return 4 (\b100) => [SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 5 (\b101) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 6 (\b110) => [SQL_RESULT_SET_CONCURRENCY_READ_ONLY, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 7 (\b111) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_READ_ONLY, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // Valid result set types are described under `arrow.flight.protocol.sql.SqlSupportedResultSetConcurrency`. + SqlInfo_SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_FORWARD_ONLY SqlInfo = 569 + // Returns an int32 bitmask value concurrency types supported for + // `arrow.flight.protocol.sql.SqlSupportedResultSetType.SQL_RESULT_SET_TYPE_SCROLL_SENSITIVE`. + // + // For instance: + // - return 0 (\b0) => [] (no supported concurrency types for this result set type) + // - return 1 (\b1) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED] + // - return 2 (\b10) => [SQL_RESULT_SET_CONCURRENCY_READ_ONLY] + // - return 3 (\b11) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_READ_ONLY] + // - return 4 (\b100) => [SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 5 (\b101) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 6 (\b110) => [SQL_RESULT_SET_CONCURRENCY_READ_ONLY, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 7 (\b111) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_READ_ONLY, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // Valid result set types are described under `arrow.flight.protocol.sql.SqlSupportedResultSetConcurrency`. + SqlInfo_SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_SCROLL_SENSITIVE SqlInfo = 570 + // Returns an int32 bitmask value concurrency types supported for + // `arrow.flight.protocol.sql.SqlSupportedResultSetType.SQL_RESULT_SET_TYPE_SCROLL_INSENSITIVE`. + // + // For instance: + // - return 0 (\b0) => [] (no supported concurrency types for this result set type) + // - return 1 (\b1) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED] + // - return 2 (\b10) => [SQL_RESULT_SET_CONCURRENCY_READ_ONLY] + // - return 3 (\b11) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_READ_ONLY] + // - return 4 (\b100) => [SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 5 (\b101) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 6 (\b110) => [SQL_RESULT_SET_CONCURRENCY_READ_ONLY, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // - return 7 (\b111) => [SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED, SQL_RESULT_SET_CONCURRENCY_READ_ONLY, SQL_RESULT_SET_CONCURRENCY_UPDATABLE] + // Valid result set types are described under `arrow.flight.protocol.sql.SqlSupportedResultSetConcurrency`. + SqlInfo_SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_SCROLL_INSENSITIVE SqlInfo = 571 + // Retrieves a boolean value indicating whether this database supports batch updates. + // + // - false: if this database does not support batch updates; + // - true: if this database supports batch updates. + SqlInfo_SQL_BATCH_UPDATES_SUPPORTED SqlInfo = 572 + // Retrieves a boolean value indicating whether this database supports savepoints. + // + // Returns: + // - false: if this database does not support savepoints; + // - true: if this database supports savepoints. + SqlInfo_SQL_SAVEPOINTS_SUPPORTED SqlInfo = 573 + // Retrieves a boolean value indicating whether named parameters are supported in callable statements. + // + // Returns: + // - false: if named parameters in callable statements are unsupported; + // - true: if named parameters in callable statements are supported. + SqlInfo_SQL_NAMED_PARAMETERS_SUPPORTED SqlInfo = 574 + // Retrieves a boolean value indicating whether updates made to a LOB are made on a copy or directly to the LOB. + // + // Returns: + // - false: if updates made to a LOB are made directly to the LOB; + // - true: if updates made to a LOB are made on a copy. + SqlInfo_SQL_LOCATORS_UPDATE_COPY SqlInfo = 575 + // Retrieves a boolean value indicating whether invoking user-defined or vendor functions + // using the stored procedure escape syntax is supported. + // + // Returns: + // - false: if invoking user-defined or vendor functions using the stored procedure escape syntax is unsupported; + // - true: if invoking user-defined or vendor functions using the stored procedure escape syntax is supported. + SqlInfo_SQL_STORED_FUNCTIONS_USING_CALL_SYNTAX_SUPPORTED SqlInfo = 576 +) + +// Enum value maps for SqlInfo. +var ( + SqlInfo_name = map[int32]string{ + 0: "FLIGHT_SQL_SERVER_NAME", + 1: "FLIGHT_SQL_SERVER_VERSION", + 2: "FLIGHT_SQL_SERVER_ARROW_VERSION", + 3: "FLIGHT_SQL_SERVER_READ_ONLY", + 4: "FLIGHT_SQL_SERVER_SQL", + 5: "FLIGHT_SQL_SERVER_SUBSTRAIT", + 6: "FLIGHT_SQL_SERVER_SUBSTRAIT_MIN_VERSION", + 7: "FLIGHT_SQL_SERVER_SUBSTRAIT_MAX_VERSION", + 8: "FLIGHT_SQL_SERVER_TRANSACTION", + 9: "FLIGHT_SQL_SERVER_CANCEL", + 10: "FLIGHT_SQL_SERVER_BULK_INGESTION", + 11: "FLIGHT_SQL_SERVER_INGEST_TRANSACTIONS_SUPPORTED", + 100: "FLIGHT_SQL_SERVER_STATEMENT_TIMEOUT", + 101: "FLIGHT_SQL_SERVER_TRANSACTION_TIMEOUT", + 500: "SQL_DDL_CATALOG", + 501: "SQL_DDL_SCHEMA", + 502: "SQL_DDL_TABLE", + 503: "SQL_IDENTIFIER_CASE", + 504: "SQL_IDENTIFIER_QUOTE_CHAR", + 505: "SQL_QUOTED_IDENTIFIER_CASE", + 506: "SQL_ALL_TABLES_ARE_SELECTABLE", + 507: "SQL_NULL_ORDERING", + 508: "SQL_KEYWORDS", + 509: "SQL_NUMERIC_FUNCTIONS", + 510: "SQL_STRING_FUNCTIONS", + 511: "SQL_SYSTEM_FUNCTIONS", + 512: "SQL_DATETIME_FUNCTIONS", + 513: "SQL_SEARCH_STRING_ESCAPE", + 514: "SQL_EXTRA_NAME_CHARACTERS", + 515: "SQL_SUPPORTS_COLUMN_ALIASING", + 516: "SQL_NULL_PLUS_NULL_IS_NULL", + 517: "SQL_SUPPORTS_CONVERT", + 518: "SQL_SUPPORTS_TABLE_CORRELATION_NAMES", + 519: "SQL_SUPPORTS_DIFFERENT_TABLE_CORRELATION_NAMES", + 520: "SQL_SUPPORTS_EXPRESSIONS_IN_ORDER_BY", + 521: "SQL_SUPPORTS_ORDER_BY_UNRELATED", + 522: "SQL_SUPPORTED_GROUP_BY", + 523: "SQL_SUPPORTS_LIKE_ESCAPE_CLAUSE", + 524: "SQL_SUPPORTS_NON_NULLABLE_COLUMNS", + 525: "SQL_SUPPORTED_GRAMMAR", + 526: "SQL_ANSI92_SUPPORTED_LEVEL", + 527: "SQL_SUPPORTS_INTEGRITY_ENHANCEMENT_FACILITY", + 528: "SQL_OUTER_JOINS_SUPPORT_LEVEL", + 529: "SQL_SCHEMA_TERM", + 530: "SQL_PROCEDURE_TERM", + 531: "SQL_CATALOG_TERM", + 532: "SQL_CATALOG_AT_START", + 533: "SQL_SCHEMAS_SUPPORTED_ACTIONS", + 534: "SQL_CATALOGS_SUPPORTED_ACTIONS", + 535: "SQL_SUPPORTED_POSITIONED_COMMANDS", + 536: "SQL_SELECT_FOR_UPDATE_SUPPORTED", + 537: "SQL_STORED_PROCEDURES_SUPPORTED", + 538: "SQL_SUPPORTED_SUBQUERIES", + 539: "SQL_CORRELATED_SUBQUERIES_SUPPORTED", + 540: "SQL_SUPPORTED_UNIONS", + 541: "SQL_MAX_BINARY_LITERAL_LENGTH", + 542: "SQL_MAX_CHAR_LITERAL_LENGTH", + 543: "SQL_MAX_COLUMN_NAME_LENGTH", + 544: "SQL_MAX_COLUMNS_IN_GROUP_BY", + 545: "SQL_MAX_COLUMNS_IN_INDEX", + 546: "SQL_MAX_COLUMNS_IN_ORDER_BY", + 547: "SQL_MAX_COLUMNS_IN_SELECT", + 548: "SQL_MAX_COLUMNS_IN_TABLE", + 549: "SQL_MAX_CONNECTIONS", + 550: "SQL_MAX_CURSOR_NAME_LENGTH", + 551: "SQL_MAX_INDEX_LENGTH", + 552: "SQL_DB_SCHEMA_NAME_LENGTH", + 553: "SQL_MAX_PROCEDURE_NAME_LENGTH", + 554: "SQL_MAX_CATALOG_NAME_LENGTH", + 555: "SQL_MAX_ROW_SIZE", + 556: "SQL_MAX_ROW_SIZE_INCLUDES_BLOBS", + 557: "SQL_MAX_STATEMENT_LENGTH", + 558: "SQL_MAX_STATEMENTS", + 559: "SQL_MAX_TABLE_NAME_LENGTH", + 560: "SQL_MAX_TABLES_IN_SELECT", + 561: "SQL_MAX_USERNAME_LENGTH", + 562: "SQL_DEFAULT_TRANSACTION_ISOLATION", + 563: "SQL_TRANSACTIONS_SUPPORTED", + 564: "SQL_SUPPORTED_TRANSACTIONS_ISOLATION_LEVELS", + 565: "SQL_DATA_DEFINITION_CAUSES_TRANSACTION_COMMIT", + 566: "SQL_DATA_DEFINITIONS_IN_TRANSACTIONS_IGNORED", + 567: "SQL_SUPPORTED_RESULT_SET_TYPES", + 568: "SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_UNSPECIFIED", + 569: "SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_FORWARD_ONLY", + 570: "SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_SCROLL_SENSITIVE", + 571: "SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_SCROLL_INSENSITIVE", + 572: "SQL_BATCH_UPDATES_SUPPORTED", + 573: "SQL_SAVEPOINTS_SUPPORTED", + 574: "SQL_NAMED_PARAMETERS_SUPPORTED", + 575: "SQL_LOCATORS_UPDATE_COPY", + 576: "SQL_STORED_FUNCTIONS_USING_CALL_SYNTAX_SUPPORTED", + } + SqlInfo_value = map[string]int32{ + "FLIGHT_SQL_SERVER_NAME": 0, + "FLIGHT_SQL_SERVER_VERSION": 1, + "FLIGHT_SQL_SERVER_ARROW_VERSION": 2, + "FLIGHT_SQL_SERVER_READ_ONLY": 3, + "FLIGHT_SQL_SERVER_SQL": 4, + "FLIGHT_SQL_SERVER_SUBSTRAIT": 5, + "FLIGHT_SQL_SERVER_SUBSTRAIT_MIN_VERSION": 6, + "FLIGHT_SQL_SERVER_SUBSTRAIT_MAX_VERSION": 7, + "FLIGHT_SQL_SERVER_TRANSACTION": 8, + "FLIGHT_SQL_SERVER_CANCEL": 9, + "FLIGHT_SQL_SERVER_BULK_INGESTION": 10, + "FLIGHT_SQL_SERVER_INGEST_TRANSACTIONS_SUPPORTED": 11, + "FLIGHT_SQL_SERVER_STATEMENT_TIMEOUT": 100, + "FLIGHT_SQL_SERVER_TRANSACTION_TIMEOUT": 101, + "SQL_DDL_CATALOG": 500, + "SQL_DDL_SCHEMA": 501, + "SQL_DDL_TABLE": 502, + "SQL_IDENTIFIER_CASE": 503, + "SQL_IDENTIFIER_QUOTE_CHAR": 504, + "SQL_QUOTED_IDENTIFIER_CASE": 505, + "SQL_ALL_TABLES_ARE_SELECTABLE": 506, + "SQL_NULL_ORDERING": 507, + "SQL_KEYWORDS": 508, + "SQL_NUMERIC_FUNCTIONS": 509, + "SQL_STRING_FUNCTIONS": 510, + "SQL_SYSTEM_FUNCTIONS": 511, + "SQL_DATETIME_FUNCTIONS": 512, + "SQL_SEARCH_STRING_ESCAPE": 513, + "SQL_EXTRA_NAME_CHARACTERS": 514, + "SQL_SUPPORTS_COLUMN_ALIASING": 515, + "SQL_NULL_PLUS_NULL_IS_NULL": 516, + "SQL_SUPPORTS_CONVERT": 517, + "SQL_SUPPORTS_TABLE_CORRELATION_NAMES": 518, + "SQL_SUPPORTS_DIFFERENT_TABLE_CORRELATION_NAMES": 519, + "SQL_SUPPORTS_EXPRESSIONS_IN_ORDER_BY": 520, + "SQL_SUPPORTS_ORDER_BY_UNRELATED": 521, + "SQL_SUPPORTED_GROUP_BY": 522, + "SQL_SUPPORTS_LIKE_ESCAPE_CLAUSE": 523, + "SQL_SUPPORTS_NON_NULLABLE_COLUMNS": 524, + "SQL_SUPPORTED_GRAMMAR": 525, + "SQL_ANSI92_SUPPORTED_LEVEL": 526, + "SQL_SUPPORTS_INTEGRITY_ENHANCEMENT_FACILITY": 527, + "SQL_OUTER_JOINS_SUPPORT_LEVEL": 528, + "SQL_SCHEMA_TERM": 529, + "SQL_PROCEDURE_TERM": 530, + "SQL_CATALOG_TERM": 531, + "SQL_CATALOG_AT_START": 532, + "SQL_SCHEMAS_SUPPORTED_ACTIONS": 533, + "SQL_CATALOGS_SUPPORTED_ACTIONS": 534, + "SQL_SUPPORTED_POSITIONED_COMMANDS": 535, + "SQL_SELECT_FOR_UPDATE_SUPPORTED": 536, + "SQL_STORED_PROCEDURES_SUPPORTED": 537, + "SQL_SUPPORTED_SUBQUERIES": 538, + "SQL_CORRELATED_SUBQUERIES_SUPPORTED": 539, + "SQL_SUPPORTED_UNIONS": 540, + "SQL_MAX_BINARY_LITERAL_LENGTH": 541, + "SQL_MAX_CHAR_LITERAL_LENGTH": 542, + "SQL_MAX_COLUMN_NAME_LENGTH": 543, + "SQL_MAX_COLUMNS_IN_GROUP_BY": 544, + "SQL_MAX_COLUMNS_IN_INDEX": 545, + "SQL_MAX_COLUMNS_IN_ORDER_BY": 546, + "SQL_MAX_COLUMNS_IN_SELECT": 547, + "SQL_MAX_COLUMNS_IN_TABLE": 548, + "SQL_MAX_CONNECTIONS": 549, + "SQL_MAX_CURSOR_NAME_LENGTH": 550, + "SQL_MAX_INDEX_LENGTH": 551, + "SQL_DB_SCHEMA_NAME_LENGTH": 552, + "SQL_MAX_PROCEDURE_NAME_LENGTH": 553, + "SQL_MAX_CATALOG_NAME_LENGTH": 554, + "SQL_MAX_ROW_SIZE": 555, + "SQL_MAX_ROW_SIZE_INCLUDES_BLOBS": 556, + "SQL_MAX_STATEMENT_LENGTH": 557, + "SQL_MAX_STATEMENTS": 558, + "SQL_MAX_TABLE_NAME_LENGTH": 559, + "SQL_MAX_TABLES_IN_SELECT": 560, + "SQL_MAX_USERNAME_LENGTH": 561, + "SQL_DEFAULT_TRANSACTION_ISOLATION": 562, + "SQL_TRANSACTIONS_SUPPORTED": 563, + "SQL_SUPPORTED_TRANSACTIONS_ISOLATION_LEVELS": 564, + "SQL_DATA_DEFINITION_CAUSES_TRANSACTION_COMMIT": 565, + "SQL_DATA_DEFINITIONS_IN_TRANSACTIONS_IGNORED": 566, + "SQL_SUPPORTED_RESULT_SET_TYPES": 567, + "SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_UNSPECIFIED": 568, + "SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_FORWARD_ONLY": 569, + "SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_SCROLL_SENSITIVE": 570, + "SQL_SUPPORTED_CONCURRENCIES_FOR_RESULT_SET_SCROLL_INSENSITIVE": 571, + "SQL_BATCH_UPDATES_SUPPORTED": 572, + "SQL_SAVEPOINTS_SUPPORTED": 573, + "SQL_NAMED_PARAMETERS_SUPPORTED": 574, + "SQL_LOCATORS_UPDATE_COPY": 575, + "SQL_STORED_FUNCTIONS_USING_CALL_SYNTAX_SUPPORTED": 576, + } +) + +func (x SqlInfo) Enum() *SqlInfo { + p := new(SqlInfo) + *p = x + return p +} + +func (x SqlInfo) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlInfo) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[0].Descriptor() +} + +func (SqlInfo) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[0] +} + +func (x SqlInfo) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlInfo.Descriptor instead. +func (SqlInfo) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{0} +} + +// The level of support for Flight SQL transaction RPCs. +type SqlSupportedTransaction int32 + +const ( + // Unknown/not indicated/no support + SqlSupportedTransaction_SQL_SUPPORTED_TRANSACTION_NONE SqlSupportedTransaction = 0 + // Transactions, but not savepoints. + // A savepoint is a mark within a transaction that can be individually + // rolled back to. Not all databases support savepoints. + SqlSupportedTransaction_SQL_SUPPORTED_TRANSACTION_TRANSACTION SqlSupportedTransaction = 1 + // Transactions and savepoints + SqlSupportedTransaction_SQL_SUPPORTED_TRANSACTION_SAVEPOINT SqlSupportedTransaction = 2 +) + +// Enum value maps for SqlSupportedTransaction. +var ( + SqlSupportedTransaction_name = map[int32]string{ + 0: "SQL_SUPPORTED_TRANSACTION_NONE", + 1: "SQL_SUPPORTED_TRANSACTION_TRANSACTION", + 2: "SQL_SUPPORTED_TRANSACTION_SAVEPOINT", + } + SqlSupportedTransaction_value = map[string]int32{ + "SQL_SUPPORTED_TRANSACTION_NONE": 0, + "SQL_SUPPORTED_TRANSACTION_TRANSACTION": 1, + "SQL_SUPPORTED_TRANSACTION_SAVEPOINT": 2, + } +) + +func (x SqlSupportedTransaction) Enum() *SqlSupportedTransaction { + p := new(SqlSupportedTransaction) + *p = x + return p +} + +func (x SqlSupportedTransaction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedTransaction) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[1].Descriptor() +} + +func (SqlSupportedTransaction) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[1] +} + +func (x SqlSupportedTransaction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedTransaction.Descriptor instead. +func (SqlSupportedTransaction) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{1} +} + +type SqlSupportedCaseSensitivity int32 + +const ( + SqlSupportedCaseSensitivity_SQL_CASE_SENSITIVITY_UNKNOWN SqlSupportedCaseSensitivity = 0 + SqlSupportedCaseSensitivity_SQL_CASE_SENSITIVITY_CASE_INSENSITIVE SqlSupportedCaseSensitivity = 1 + SqlSupportedCaseSensitivity_SQL_CASE_SENSITIVITY_UPPERCASE SqlSupportedCaseSensitivity = 2 + SqlSupportedCaseSensitivity_SQL_CASE_SENSITIVITY_LOWERCASE SqlSupportedCaseSensitivity = 3 +) + +// Enum value maps for SqlSupportedCaseSensitivity. +var ( + SqlSupportedCaseSensitivity_name = map[int32]string{ + 0: "SQL_CASE_SENSITIVITY_UNKNOWN", + 1: "SQL_CASE_SENSITIVITY_CASE_INSENSITIVE", + 2: "SQL_CASE_SENSITIVITY_UPPERCASE", + 3: "SQL_CASE_SENSITIVITY_LOWERCASE", + } + SqlSupportedCaseSensitivity_value = map[string]int32{ + "SQL_CASE_SENSITIVITY_UNKNOWN": 0, + "SQL_CASE_SENSITIVITY_CASE_INSENSITIVE": 1, + "SQL_CASE_SENSITIVITY_UPPERCASE": 2, + "SQL_CASE_SENSITIVITY_LOWERCASE": 3, + } +) + +func (x SqlSupportedCaseSensitivity) Enum() *SqlSupportedCaseSensitivity { + p := new(SqlSupportedCaseSensitivity) + *p = x + return p +} + +func (x SqlSupportedCaseSensitivity) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedCaseSensitivity) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[2].Descriptor() +} + +func (SqlSupportedCaseSensitivity) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[2] +} + +func (x SqlSupportedCaseSensitivity) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedCaseSensitivity.Descriptor instead. +func (SqlSupportedCaseSensitivity) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{2} +} + +type SqlNullOrdering int32 + +const ( + SqlNullOrdering_SQL_NULLS_SORTED_HIGH SqlNullOrdering = 0 + SqlNullOrdering_SQL_NULLS_SORTED_LOW SqlNullOrdering = 1 + SqlNullOrdering_SQL_NULLS_SORTED_AT_START SqlNullOrdering = 2 + SqlNullOrdering_SQL_NULLS_SORTED_AT_END SqlNullOrdering = 3 +) + +// Enum value maps for SqlNullOrdering. +var ( + SqlNullOrdering_name = map[int32]string{ + 0: "SQL_NULLS_SORTED_HIGH", + 1: "SQL_NULLS_SORTED_LOW", + 2: "SQL_NULLS_SORTED_AT_START", + 3: "SQL_NULLS_SORTED_AT_END", + } + SqlNullOrdering_value = map[string]int32{ + "SQL_NULLS_SORTED_HIGH": 0, + "SQL_NULLS_SORTED_LOW": 1, + "SQL_NULLS_SORTED_AT_START": 2, + "SQL_NULLS_SORTED_AT_END": 3, + } +) + +func (x SqlNullOrdering) Enum() *SqlNullOrdering { + p := new(SqlNullOrdering) + *p = x + return p +} + +func (x SqlNullOrdering) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlNullOrdering) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[3].Descriptor() +} + +func (SqlNullOrdering) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[3] +} + +func (x SqlNullOrdering) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlNullOrdering.Descriptor instead. +func (SqlNullOrdering) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{3} +} + +type SupportedSqlGrammar int32 + +const ( + SupportedSqlGrammar_SQL_MINIMUM_GRAMMAR SupportedSqlGrammar = 0 + SupportedSqlGrammar_SQL_CORE_GRAMMAR SupportedSqlGrammar = 1 + SupportedSqlGrammar_SQL_EXTENDED_GRAMMAR SupportedSqlGrammar = 2 +) + +// Enum value maps for SupportedSqlGrammar. +var ( + SupportedSqlGrammar_name = map[int32]string{ + 0: "SQL_MINIMUM_GRAMMAR", + 1: "SQL_CORE_GRAMMAR", + 2: "SQL_EXTENDED_GRAMMAR", + } + SupportedSqlGrammar_value = map[string]int32{ + "SQL_MINIMUM_GRAMMAR": 0, + "SQL_CORE_GRAMMAR": 1, + "SQL_EXTENDED_GRAMMAR": 2, + } +) + +func (x SupportedSqlGrammar) Enum() *SupportedSqlGrammar { + p := new(SupportedSqlGrammar) + *p = x + return p +} + +func (x SupportedSqlGrammar) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SupportedSqlGrammar) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[4].Descriptor() +} + +func (SupportedSqlGrammar) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[4] +} + +func (x SupportedSqlGrammar) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SupportedSqlGrammar.Descriptor instead. +func (SupportedSqlGrammar) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{4} +} + +type SupportedAnsi92SqlGrammarLevel int32 + +const ( + SupportedAnsi92SqlGrammarLevel_ANSI92_ENTRY_SQL SupportedAnsi92SqlGrammarLevel = 0 + SupportedAnsi92SqlGrammarLevel_ANSI92_INTERMEDIATE_SQL SupportedAnsi92SqlGrammarLevel = 1 + SupportedAnsi92SqlGrammarLevel_ANSI92_FULL_SQL SupportedAnsi92SqlGrammarLevel = 2 +) + +// Enum value maps for SupportedAnsi92SqlGrammarLevel. +var ( + SupportedAnsi92SqlGrammarLevel_name = map[int32]string{ + 0: "ANSI92_ENTRY_SQL", + 1: "ANSI92_INTERMEDIATE_SQL", + 2: "ANSI92_FULL_SQL", + } + SupportedAnsi92SqlGrammarLevel_value = map[string]int32{ + "ANSI92_ENTRY_SQL": 0, + "ANSI92_INTERMEDIATE_SQL": 1, + "ANSI92_FULL_SQL": 2, + } +) + +func (x SupportedAnsi92SqlGrammarLevel) Enum() *SupportedAnsi92SqlGrammarLevel { + p := new(SupportedAnsi92SqlGrammarLevel) + *p = x + return p +} + +func (x SupportedAnsi92SqlGrammarLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SupportedAnsi92SqlGrammarLevel) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[5].Descriptor() +} + +func (SupportedAnsi92SqlGrammarLevel) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[5] +} + +func (x SupportedAnsi92SqlGrammarLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SupportedAnsi92SqlGrammarLevel.Descriptor instead. +func (SupportedAnsi92SqlGrammarLevel) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{5} +} + +type SqlOuterJoinsSupportLevel int32 + +const ( + SqlOuterJoinsSupportLevel_SQL_JOINS_UNSUPPORTED SqlOuterJoinsSupportLevel = 0 + SqlOuterJoinsSupportLevel_SQL_LIMITED_OUTER_JOINS SqlOuterJoinsSupportLevel = 1 + SqlOuterJoinsSupportLevel_SQL_FULL_OUTER_JOINS SqlOuterJoinsSupportLevel = 2 +) + +// Enum value maps for SqlOuterJoinsSupportLevel. +var ( + SqlOuterJoinsSupportLevel_name = map[int32]string{ + 0: "SQL_JOINS_UNSUPPORTED", + 1: "SQL_LIMITED_OUTER_JOINS", + 2: "SQL_FULL_OUTER_JOINS", + } + SqlOuterJoinsSupportLevel_value = map[string]int32{ + "SQL_JOINS_UNSUPPORTED": 0, + "SQL_LIMITED_OUTER_JOINS": 1, + "SQL_FULL_OUTER_JOINS": 2, + } +) + +func (x SqlOuterJoinsSupportLevel) Enum() *SqlOuterJoinsSupportLevel { + p := new(SqlOuterJoinsSupportLevel) + *p = x + return p +} + +func (x SqlOuterJoinsSupportLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlOuterJoinsSupportLevel) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[6].Descriptor() +} + +func (SqlOuterJoinsSupportLevel) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[6] +} + +func (x SqlOuterJoinsSupportLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlOuterJoinsSupportLevel.Descriptor instead. +func (SqlOuterJoinsSupportLevel) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{6} +} + +type SqlSupportedGroupBy int32 + +const ( + SqlSupportedGroupBy_SQL_GROUP_BY_UNRELATED SqlSupportedGroupBy = 0 + SqlSupportedGroupBy_SQL_GROUP_BY_BEYOND_SELECT SqlSupportedGroupBy = 1 +) + +// Enum value maps for SqlSupportedGroupBy. +var ( + SqlSupportedGroupBy_name = map[int32]string{ + 0: "SQL_GROUP_BY_UNRELATED", + 1: "SQL_GROUP_BY_BEYOND_SELECT", + } + SqlSupportedGroupBy_value = map[string]int32{ + "SQL_GROUP_BY_UNRELATED": 0, + "SQL_GROUP_BY_BEYOND_SELECT": 1, + } +) + +func (x SqlSupportedGroupBy) Enum() *SqlSupportedGroupBy { + p := new(SqlSupportedGroupBy) + *p = x + return p +} + +func (x SqlSupportedGroupBy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedGroupBy) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[7].Descriptor() +} + +func (SqlSupportedGroupBy) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[7] +} + +func (x SqlSupportedGroupBy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedGroupBy.Descriptor instead. +func (SqlSupportedGroupBy) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{7} +} + +type SqlSupportedElementActions int32 + +const ( + SqlSupportedElementActions_SQL_ELEMENT_IN_PROCEDURE_CALLS SqlSupportedElementActions = 0 + SqlSupportedElementActions_SQL_ELEMENT_IN_INDEX_DEFINITIONS SqlSupportedElementActions = 1 + SqlSupportedElementActions_SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS SqlSupportedElementActions = 2 +) + +// Enum value maps for SqlSupportedElementActions. +var ( + SqlSupportedElementActions_name = map[int32]string{ + 0: "SQL_ELEMENT_IN_PROCEDURE_CALLS", + 1: "SQL_ELEMENT_IN_INDEX_DEFINITIONS", + 2: "SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS", + } + SqlSupportedElementActions_value = map[string]int32{ + "SQL_ELEMENT_IN_PROCEDURE_CALLS": 0, + "SQL_ELEMENT_IN_INDEX_DEFINITIONS": 1, + "SQL_ELEMENT_IN_PRIVILEGE_DEFINITIONS": 2, + } +) + +func (x SqlSupportedElementActions) Enum() *SqlSupportedElementActions { + p := new(SqlSupportedElementActions) + *p = x + return p +} + +func (x SqlSupportedElementActions) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedElementActions) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[8].Descriptor() +} + +func (SqlSupportedElementActions) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[8] +} + +func (x SqlSupportedElementActions) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedElementActions.Descriptor instead. +func (SqlSupportedElementActions) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{8} +} + +type SqlSupportedPositionedCommands int32 + +const ( + SqlSupportedPositionedCommands_SQL_POSITIONED_DELETE SqlSupportedPositionedCommands = 0 + SqlSupportedPositionedCommands_SQL_POSITIONED_UPDATE SqlSupportedPositionedCommands = 1 +) + +// Enum value maps for SqlSupportedPositionedCommands. +var ( + SqlSupportedPositionedCommands_name = map[int32]string{ + 0: "SQL_POSITIONED_DELETE", + 1: "SQL_POSITIONED_UPDATE", + } + SqlSupportedPositionedCommands_value = map[string]int32{ + "SQL_POSITIONED_DELETE": 0, + "SQL_POSITIONED_UPDATE": 1, + } +) + +func (x SqlSupportedPositionedCommands) Enum() *SqlSupportedPositionedCommands { + p := new(SqlSupportedPositionedCommands) + *p = x + return p +} + +func (x SqlSupportedPositionedCommands) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedPositionedCommands) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[9].Descriptor() +} + +func (SqlSupportedPositionedCommands) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[9] +} + +func (x SqlSupportedPositionedCommands) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedPositionedCommands.Descriptor instead. +func (SqlSupportedPositionedCommands) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{9} +} + +type SqlSupportedSubqueries int32 + +const ( + SqlSupportedSubqueries_SQL_SUBQUERIES_IN_COMPARISONS SqlSupportedSubqueries = 0 + SqlSupportedSubqueries_SQL_SUBQUERIES_IN_EXISTS SqlSupportedSubqueries = 1 + SqlSupportedSubqueries_SQL_SUBQUERIES_IN_INS SqlSupportedSubqueries = 2 + SqlSupportedSubqueries_SQL_SUBQUERIES_IN_QUANTIFIEDS SqlSupportedSubqueries = 3 +) + +// Enum value maps for SqlSupportedSubqueries. +var ( + SqlSupportedSubqueries_name = map[int32]string{ + 0: "SQL_SUBQUERIES_IN_COMPARISONS", + 1: "SQL_SUBQUERIES_IN_EXISTS", + 2: "SQL_SUBQUERIES_IN_INS", + 3: "SQL_SUBQUERIES_IN_QUANTIFIEDS", + } + SqlSupportedSubqueries_value = map[string]int32{ + "SQL_SUBQUERIES_IN_COMPARISONS": 0, + "SQL_SUBQUERIES_IN_EXISTS": 1, + "SQL_SUBQUERIES_IN_INS": 2, + "SQL_SUBQUERIES_IN_QUANTIFIEDS": 3, + } +) + +func (x SqlSupportedSubqueries) Enum() *SqlSupportedSubqueries { + p := new(SqlSupportedSubqueries) + *p = x + return p +} + +func (x SqlSupportedSubqueries) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedSubqueries) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[10].Descriptor() +} + +func (SqlSupportedSubqueries) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[10] +} + +func (x SqlSupportedSubqueries) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedSubqueries.Descriptor instead. +func (SqlSupportedSubqueries) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{10} +} + +type SqlSupportedUnions int32 + +const ( + SqlSupportedUnions_SQL_UNION SqlSupportedUnions = 0 + SqlSupportedUnions_SQL_UNION_ALL SqlSupportedUnions = 1 +) + +// Enum value maps for SqlSupportedUnions. +var ( + SqlSupportedUnions_name = map[int32]string{ + 0: "SQL_UNION", + 1: "SQL_UNION_ALL", + } + SqlSupportedUnions_value = map[string]int32{ + "SQL_UNION": 0, + "SQL_UNION_ALL": 1, + } +) + +func (x SqlSupportedUnions) Enum() *SqlSupportedUnions { + p := new(SqlSupportedUnions) + *p = x + return p +} + +func (x SqlSupportedUnions) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedUnions) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[11].Descriptor() +} + +func (SqlSupportedUnions) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[11] +} + +func (x SqlSupportedUnions) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedUnions.Descriptor instead. +func (SqlSupportedUnions) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{11} +} + +type SqlTransactionIsolationLevel int32 + +const ( + SqlTransactionIsolationLevel_SQL_TRANSACTION_NONE SqlTransactionIsolationLevel = 0 + SqlTransactionIsolationLevel_SQL_TRANSACTION_READ_UNCOMMITTED SqlTransactionIsolationLevel = 1 + SqlTransactionIsolationLevel_SQL_TRANSACTION_READ_COMMITTED SqlTransactionIsolationLevel = 2 + SqlTransactionIsolationLevel_SQL_TRANSACTION_REPEATABLE_READ SqlTransactionIsolationLevel = 3 + SqlTransactionIsolationLevel_SQL_TRANSACTION_SERIALIZABLE SqlTransactionIsolationLevel = 4 +) + +// Enum value maps for SqlTransactionIsolationLevel. +var ( + SqlTransactionIsolationLevel_name = map[int32]string{ + 0: "SQL_TRANSACTION_NONE", + 1: "SQL_TRANSACTION_READ_UNCOMMITTED", + 2: "SQL_TRANSACTION_READ_COMMITTED", + 3: "SQL_TRANSACTION_REPEATABLE_READ", + 4: "SQL_TRANSACTION_SERIALIZABLE", + } + SqlTransactionIsolationLevel_value = map[string]int32{ + "SQL_TRANSACTION_NONE": 0, + "SQL_TRANSACTION_READ_UNCOMMITTED": 1, + "SQL_TRANSACTION_READ_COMMITTED": 2, + "SQL_TRANSACTION_REPEATABLE_READ": 3, + "SQL_TRANSACTION_SERIALIZABLE": 4, + } +) + +func (x SqlTransactionIsolationLevel) Enum() *SqlTransactionIsolationLevel { + p := new(SqlTransactionIsolationLevel) + *p = x + return p +} + +func (x SqlTransactionIsolationLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlTransactionIsolationLevel) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[12].Descriptor() +} + +func (SqlTransactionIsolationLevel) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[12] +} + +func (x SqlTransactionIsolationLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlTransactionIsolationLevel.Descriptor instead. +func (SqlTransactionIsolationLevel) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{12} +} + +type SqlSupportedTransactions int32 + +const ( + SqlSupportedTransactions_SQL_TRANSACTION_UNSPECIFIED SqlSupportedTransactions = 0 + SqlSupportedTransactions_SQL_DATA_DEFINITION_TRANSACTIONS SqlSupportedTransactions = 1 + SqlSupportedTransactions_SQL_DATA_MANIPULATION_TRANSACTIONS SqlSupportedTransactions = 2 +) + +// Enum value maps for SqlSupportedTransactions. +var ( + SqlSupportedTransactions_name = map[int32]string{ + 0: "SQL_TRANSACTION_UNSPECIFIED", + 1: "SQL_DATA_DEFINITION_TRANSACTIONS", + 2: "SQL_DATA_MANIPULATION_TRANSACTIONS", + } + SqlSupportedTransactions_value = map[string]int32{ + "SQL_TRANSACTION_UNSPECIFIED": 0, + "SQL_DATA_DEFINITION_TRANSACTIONS": 1, + "SQL_DATA_MANIPULATION_TRANSACTIONS": 2, + } +) + +func (x SqlSupportedTransactions) Enum() *SqlSupportedTransactions { + p := new(SqlSupportedTransactions) + *p = x + return p +} + +func (x SqlSupportedTransactions) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedTransactions) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[13].Descriptor() +} + +func (SqlSupportedTransactions) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[13] +} + +func (x SqlSupportedTransactions) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedTransactions.Descriptor instead. +func (SqlSupportedTransactions) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{13} +} + +type SqlSupportedResultSetType int32 + +const ( + SqlSupportedResultSetType_SQL_RESULT_SET_TYPE_UNSPECIFIED SqlSupportedResultSetType = 0 + SqlSupportedResultSetType_SQL_RESULT_SET_TYPE_FORWARD_ONLY SqlSupportedResultSetType = 1 + SqlSupportedResultSetType_SQL_RESULT_SET_TYPE_SCROLL_INSENSITIVE SqlSupportedResultSetType = 2 + SqlSupportedResultSetType_SQL_RESULT_SET_TYPE_SCROLL_SENSITIVE SqlSupportedResultSetType = 3 +) + +// Enum value maps for SqlSupportedResultSetType. +var ( + SqlSupportedResultSetType_name = map[int32]string{ + 0: "SQL_RESULT_SET_TYPE_UNSPECIFIED", + 1: "SQL_RESULT_SET_TYPE_FORWARD_ONLY", + 2: "SQL_RESULT_SET_TYPE_SCROLL_INSENSITIVE", + 3: "SQL_RESULT_SET_TYPE_SCROLL_SENSITIVE", + } + SqlSupportedResultSetType_value = map[string]int32{ + "SQL_RESULT_SET_TYPE_UNSPECIFIED": 0, + "SQL_RESULT_SET_TYPE_FORWARD_ONLY": 1, + "SQL_RESULT_SET_TYPE_SCROLL_INSENSITIVE": 2, + "SQL_RESULT_SET_TYPE_SCROLL_SENSITIVE": 3, + } +) + +func (x SqlSupportedResultSetType) Enum() *SqlSupportedResultSetType { + p := new(SqlSupportedResultSetType) + *p = x + return p +} + +func (x SqlSupportedResultSetType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedResultSetType) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[14].Descriptor() +} + +func (SqlSupportedResultSetType) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[14] +} + +func (x SqlSupportedResultSetType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedResultSetType.Descriptor instead. +func (SqlSupportedResultSetType) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{14} +} + +type SqlSupportedResultSetConcurrency int32 + +const ( + SqlSupportedResultSetConcurrency_SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED SqlSupportedResultSetConcurrency = 0 + SqlSupportedResultSetConcurrency_SQL_RESULT_SET_CONCURRENCY_READ_ONLY SqlSupportedResultSetConcurrency = 1 + SqlSupportedResultSetConcurrency_SQL_RESULT_SET_CONCURRENCY_UPDATABLE SqlSupportedResultSetConcurrency = 2 +) + +// Enum value maps for SqlSupportedResultSetConcurrency. +var ( + SqlSupportedResultSetConcurrency_name = map[int32]string{ + 0: "SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED", + 1: "SQL_RESULT_SET_CONCURRENCY_READ_ONLY", + 2: "SQL_RESULT_SET_CONCURRENCY_UPDATABLE", + } + SqlSupportedResultSetConcurrency_value = map[string]int32{ + "SQL_RESULT_SET_CONCURRENCY_UNSPECIFIED": 0, + "SQL_RESULT_SET_CONCURRENCY_READ_ONLY": 1, + "SQL_RESULT_SET_CONCURRENCY_UPDATABLE": 2, + } +) + +func (x SqlSupportedResultSetConcurrency) Enum() *SqlSupportedResultSetConcurrency { + p := new(SqlSupportedResultSetConcurrency) + *p = x + return p +} + +func (x SqlSupportedResultSetConcurrency) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportedResultSetConcurrency) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[15].Descriptor() +} + +func (SqlSupportedResultSetConcurrency) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[15] +} + +func (x SqlSupportedResultSetConcurrency) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportedResultSetConcurrency.Descriptor instead. +func (SqlSupportedResultSetConcurrency) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{15} +} + +type SqlSupportsConvert int32 + +const ( + SqlSupportsConvert_SQL_CONVERT_BIGINT SqlSupportsConvert = 0 + SqlSupportsConvert_SQL_CONVERT_BINARY SqlSupportsConvert = 1 + SqlSupportsConvert_SQL_CONVERT_BIT SqlSupportsConvert = 2 + SqlSupportsConvert_SQL_CONVERT_CHAR SqlSupportsConvert = 3 + SqlSupportsConvert_SQL_CONVERT_DATE SqlSupportsConvert = 4 + SqlSupportsConvert_SQL_CONVERT_DECIMAL SqlSupportsConvert = 5 + SqlSupportsConvert_SQL_CONVERT_FLOAT SqlSupportsConvert = 6 + SqlSupportsConvert_SQL_CONVERT_INTEGER SqlSupportsConvert = 7 + SqlSupportsConvert_SQL_CONVERT_INTERVAL_DAY_TIME SqlSupportsConvert = 8 + SqlSupportsConvert_SQL_CONVERT_INTERVAL_YEAR_MONTH SqlSupportsConvert = 9 + SqlSupportsConvert_SQL_CONVERT_LONGVARBINARY SqlSupportsConvert = 10 + SqlSupportsConvert_SQL_CONVERT_LONGVARCHAR SqlSupportsConvert = 11 + SqlSupportsConvert_SQL_CONVERT_NUMERIC SqlSupportsConvert = 12 + SqlSupportsConvert_SQL_CONVERT_REAL SqlSupportsConvert = 13 + SqlSupportsConvert_SQL_CONVERT_SMALLINT SqlSupportsConvert = 14 + SqlSupportsConvert_SQL_CONVERT_TIME SqlSupportsConvert = 15 + SqlSupportsConvert_SQL_CONVERT_TIMESTAMP SqlSupportsConvert = 16 + SqlSupportsConvert_SQL_CONVERT_TINYINT SqlSupportsConvert = 17 + SqlSupportsConvert_SQL_CONVERT_VARBINARY SqlSupportsConvert = 18 + SqlSupportsConvert_SQL_CONVERT_VARCHAR SqlSupportsConvert = 19 +) + +// Enum value maps for SqlSupportsConvert. +var ( + SqlSupportsConvert_name = map[int32]string{ + 0: "SQL_CONVERT_BIGINT", + 1: "SQL_CONVERT_BINARY", + 2: "SQL_CONVERT_BIT", + 3: "SQL_CONVERT_CHAR", + 4: "SQL_CONVERT_DATE", + 5: "SQL_CONVERT_DECIMAL", + 6: "SQL_CONVERT_FLOAT", + 7: "SQL_CONVERT_INTEGER", + 8: "SQL_CONVERT_INTERVAL_DAY_TIME", + 9: "SQL_CONVERT_INTERVAL_YEAR_MONTH", + 10: "SQL_CONVERT_LONGVARBINARY", + 11: "SQL_CONVERT_LONGVARCHAR", + 12: "SQL_CONVERT_NUMERIC", + 13: "SQL_CONVERT_REAL", + 14: "SQL_CONVERT_SMALLINT", + 15: "SQL_CONVERT_TIME", + 16: "SQL_CONVERT_TIMESTAMP", + 17: "SQL_CONVERT_TINYINT", + 18: "SQL_CONVERT_VARBINARY", + 19: "SQL_CONVERT_VARCHAR", + } + SqlSupportsConvert_value = map[string]int32{ + "SQL_CONVERT_BIGINT": 0, + "SQL_CONVERT_BINARY": 1, + "SQL_CONVERT_BIT": 2, + "SQL_CONVERT_CHAR": 3, + "SQL_CONVERT_DATE": 4, + "SQL_CONVERT_DECIMAL": 5, + "SQL_CONVERT_FLOAT": 6, + "SQL_CONVERT_INTEGER": 7, + "SQL_CONVERT_INTERVAL_DAY_TIME": 8, + "SQL_CONVERT_INTERVAL_YEAR_MONTH": 9, + "SQL_CONVERT_LONGVARBINARY": 10, + "SQL_CONVERT_LONGVARCHAR": 11, + "SQL_CONVERT_NUMERIC": 12, + "SQL_CONVERT_REAL": 13, + "SQL_CONVERT_SMALLINT": 14, + "SQL_CONVERT_TIME": 15, + "SQL_CONVERT_TIMESTAMP": 16, + "SQL_CONVERT_TINYINT": 17, + "SQL_CONVERT_VARBINARY": 18, + "SQL_CONVERT_VARCHAR": 19, + } +) + +func (x SqlSupportsConvert) Enum() *SqlSupportsConvert { + p := new(SqlSupportsConvert) + *p = x + return p +} + +func (x SqlSupportsConvert) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SqlSupportsConvert) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[16].Descriptor() +} + +func (SqlSupportsConvert) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[16] +} + +func (x SqlSupportsConvert) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SqlSupportsConvert.Descriptor instead. +func (SqlSupportsConvert) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{16} +} + +// * +// The JDBC/ODBC-defined type of any object. +// All the values here are the same as in the JDBC and ODBC specs. +type XdbcDataType int32 + +const ( + XdbcDataType_XDBC_UNKNOWN_TYPE XdbcDataType = 0 + XdbcDataType_XDBC_CHAR XdbcDataType = 1 + XdbcDataType_XDBC_NUMERIC XdbcDataType = 2 + XdbcDataType_XDBC_DECIMAL XdbcDataType = 3 + XdbcDataType_XDBC_INTEGER XdbcDataType = 4 + XdbcDataType_XDBC_SMALLINT XdbcDataType = 5 + XdbcDataType_XDBC_FLOAT XdbcDataType = 6 + XdbcDataType_XDBC_REAL XdbcDataType = 7 + XdbcDataType_XDBC_DOUBLE XdbcDataType = 8 + XdbcDataType_XDBC_DATETIME XdbcDataType = 9 + XdbcDataType_XDBC_INTERVAL XdbcDataType = 10 + XdbcDataType_XDBC_VARCHAR XdbcDataType = 12 + XdbcDataType_XDBC_DATE XdbcDataType = 91 + XdbcDataType_XDBC_TIME XdbcDataType = 92 + XdbcDataType_XDBC_TIMESTAMP XdbcDataType = 93 + XdbcDataType_XDBC_LONGVARCHAR XdbcDataType = -1 + XdbcDataType_XDBC_BINARY XdbcDataType = -2 + XdbcDataType_XDBC_VARBINARY XdbcDataType = -3 + XdbcDataType_XDBC_LONGVARBINARY XdbcDataType = -4 + XdbcDataType_XDBC_BIGINT XdbcDataType = -5 + XdbcDataType_XDBC_TINYINT XdbcDataType = -6 + XdbcDataType_XDBC_BIT XdbcDataType = -7 + XdbcDataType_XDBC_WCHAR XdbcDataType = -8 + XdbcDataType_XDBC_WVARCHAR XdbcDataType = -9 +) + +// Enum value maps for XdbcDataType. +var ( + XdbcDataType_name = map[int32]string{ + 0: "XDBC_UNKNOWN_TYPE", + 1: "XDBC_CHAR", + 2: "XDBC_NUMERIC", + 3: "XDBC_DECIMAL", + 4: "XDBC_INTEGER", + 5: "XDBC_SMALLINT", + 6: "XDBC_FLOAT", + 7: "XDBC_REAL", + 8: "XDBC_DOUBLE", + 9: "XDBC_DATETIME", + 10: "XDBC_INTERVAL", + 12: "XDBC_VARCHAR", + 91: "XDBC_DATE", + 92: "XDBC_TIME", + 93: "XDBC_TIMESTAMP", + -1: "XDBC_LONGVARCHAR", + -2: "XDBC_BINARY", + -3: "XDBC_VARBINARY", + -4: "XDBC_LONGVARBINARY", + -5: "XDBC_BIGINT", + -6: "XDBC_TINYINT", + -7: "XDBC_BIT", + -8: "XDBC_WCHAR", + -9: "XDBC_WVARCHAR", + } + XdbcDataType_value = map[string]int32{ + "XDBC_UNKNOWN_TYPE": 0, + "XDBC_CHAR": 1, + "XDBC_NUMERIC": 2, + "XDBC_DECIMAL": 3, + "XDBC_INTEGER": 4, + "XDBC_SMALLINT": 5, + "XDBC_FLOAT": 6, + "XDBC_REAL": 7, + "XDBC_DOUBLE": 8, + "XDBC_DATETIME": 9, + "XDBC_INTERVAL": 10, + "XDBC_VARCHAR": 12, + "XDBC_DATE": 91, + "XDBC_TIME": 92, + "XDBC_TIMESTAMP": 93, + "XDBC_LONGVARCHAR": -1, + "XDBC_BINARY": -2, + "XDBC_VARBINARY": -3, + "XDBC_LONGVARBINARY": -4, + "XDBC_BIGINT": -5, + "XDBC_TINYINT": -6, + "XDBC_BIT": -7, + "XDBC_WCHAR": -8, + "XDBC_WVARCHAR": -9, + } +) + +func (x XdbcDataType) Enum() *XdbcDataType { + p := new(XdbcDataType) + *p = x + return p +} + +func (x XdbcDataType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (XdbcDataType) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[17].Descriptor() +} + +func (XdbcDataType) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[17] +} + +func (x XdbcDataType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use XdbcDataType.Descriptor instead. +func (XdbcDataType) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{17} +} + +// * +// Detailed subtype information for XDBC_TYPE_DATETIME and XDBC_TYPE_INTERVAL. +type XdbcDatetimeSubcode int32 + +const ( + XdbcDatetimeSubcode_XDBC_SUBCODE_UNKNOWN XdbcDatetimeSubcode = 0 + XdbcDatetimeSubcode_XDBC_SUBCODE_YEAR XdbcDatetimeSubcode = 1 + XdbcDatetimeSubcode_XDBC_SUBCODE_DATE XdbcDatetimeSubcode = 1 + XdbcDatetimeSubcode_XDBC_SUBCODE_TIME XdbcDatetimeSubcode = 2 + XdbcDatetimeSubcode_XDBC_SUBCODE_MONTH XdbcDatetimeSubcode = 2 + XdbcDatetimeSubcode_XDBC_SUBCODE_TIMESTAMP XdbcDatetimeSubcode = 3 + XdbcDatetimeSubcode_XDBC_SUBCODE_DAY XdbcDatetimeSubcode = 3 + XdbcDatetimeSubcode_XDBC_SUBCODE_TIME_WITH_TIMEZONE XdbcDatetimeSubcode = 4 + XdbcDatetimeSubcode_XDBC_SUBCODE_HOUR XdbcDatetimeSubcode = 4 + XdbcDatetimeSubcode_XDBC_SUBCODE_TIMESTAMP_WITH_TIMEZONE XdbcDatetimeSubcode = 5 + XdbcDatetimeSubcode_XDBC_SUBCODE_MINUTE XdbcDatetimeSubcode = 5 + XdbcDatetimeSubcode_XDBC_SUBCODE_SECOND XdbcDatetimeSubcode = 6 + XdbcDatetimeSubcode_XDBC_SUBCODE_YEAR_TO_MONTH XdbcDatetimeSubcode = 7 + XdbcDatetimeSubcode_XDBC_SUBCODE_DAY_TO_HOUR XdbcDatetimeSubcode = 8 + XdbcDatetimeSubcode_XDBC_SUBCODE_DAY_TO_MINUTE XdbcDatetimeSubcode = 9 + XdbcDatetimeSubcode_XDBC_SUBCODE_DAY_TO_SECOND XdbcDatetimeSubcode = 10 + XdbcDatetimeSubcode_XDBC_SUBCODE_HOUR_TO_MINUTE XdbcDatetimeSubcode = 11 + XdbcDatetimeSubcode_XDBC_SUBCODE_HOUR_TO_SECOND XdbcDatetimeSubcode = 12 + XdbcDatetimeSubcode_XDBC_SUBCODE_MINUTE_TO_SECOND XdbcDatetimeSubcode = 13 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_YEAR XdbcDatetimeSubcode = 101 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_MONTH XdbcDatetimeSubcode = 102 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_DAY XdbcDatetimeSubcode = 103 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_HOUR XdbcDatetimeSubcode = 104 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_MINUTE XdbcDatetimeSubcode = 105 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_SECOND XdbcDatetimeSubcode = 106 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_YEAR_TO_MONTH XdbcDatetimeSubcode = 107 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_DAY_TO_HOUR XdbcDatetimeSubcode = 108 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_DAY_TO_MINUTE XdbcDatetimeSubcode = 109 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_DAY_TO_SECOND XdbcDatetimeSubcode = 110 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_HOUR_TO_MINUTE XdbcDatetimeSubcode = 111 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_HOUR_TO_SECOND XdbcDatetimeSubcode = 112 + XdbcDatetimeSubcode_XDBC_SUBCODE_INTERVAL_MINUTE_TO_SECOND XdbcDatetimeSubcode = 113 +) + +// Enum value maps for XdbcDatetimeSubcode. +var ( + XdbcDatetimeSubcode_name = map[int32]string{ + 0: "XDBC_SUBCODE_UNKNOWN", + 1: "XDBC_SUBCODE_YEAR", + // Duplicate value: 1: "XDBC_SUBCODE_DATE", + 2: "XDBC_SUBCODE_TIME", + // Duplicate value: 2: "XDBC_SUBCODE_MONTH", + 3: "XDBC_SUBCODE_TIMESTAMP", + // Duplicate value: 3: "XDBC_SUBCODE_DAY", + 4: "XDBC_SUBCODE_TIME_WITH_TIMEZONE", + // Duplicate value: 4: "XDBC_SUBCODE_HOUR", + 5: "XDBC_SUBCODE_TIMESTAMP_WITH_TIMEZONE", + // Duplicate value: 5: "XDBC_SUBCODE_MINUTE", + 6: "XDBC_SUBCODE_SECOND", + 7: "XDBC_SUBCODE_YEAR_TO_MONTH", + 8: "XDBC_SUBCODE_DAY_TO_HOUR", + 9: "XDBC_SUBCODE_DAY_TO_MINUTE", + 10: "XDBC_SUBCODE_DAY_TO_SECOND", + 11: "XDBC_SUBCODE_HOUR_TO_MINUTE", + 12: "XDBC_SUBCODE_HOUR_TO_SECOND", + 13: "XDBC_SUBCODE_MINUTE_TO_SECOND", + 101: "XDBC_SUBCODE_INTERVAL_YEAR", + 102: "XDBC_SUBCODE_INTERVAL_MONTH", + 103: "XDBC_SUBCODE_INTERVAL_DAY", + 104: "XDBC_SUBCODE_INTERVAL_HOUR", + 105: "XDBC_SUBCODE_INTERVAL_MINUTE", + 106: "XDBC_SUBCODE_INTERVAL_SECOND", + 107: "XDBC_SUBCODE_INTERVAL_YEAR_TO_MONTH", + 108: "XDBC_SUBCODE_INTERVAL_DAY_TO_HOUR", + 109: "XDBC_SUBCODE_INTERVAL_DAY_TO_MINUTE", + 110: "XDBC_SUBCODE_INTERVAL_DAY_TO_SECOND", + 111: "XDBC_SUBCODE_INTERVAL_HOUR_TO_MINUTE", + 112: "XDBC_SUBCODE_INTERVAL_HOUR_TO_SECOND", + 113: "XDBC_SUBCODE_INTERVAL_MINUTE_TO_SECOND", + } + XdbcDatetimeSubcode_value = map[string]int32{ + "XDBC_SUBCODE_UNKNOWN": 0, + "XDBC_SUBCODE_YEAR": 1, + "XDBC_SUBCODE_DATE": 1, + "XDBC_SUBCODE_TIME": 2, + "XDBC_SUBCODE_MONTH": 2, + "XDBC_SUBCODE_TIMESTAMP": 3, + "XDBC_SUBCODE_DAY": 3, + "XDBC_SUBCODE_TIME_WITH_TIMEZONE": 4, + "XDBC_SUBCODE_HOUR": 4, + "XDBC_SUBCODE_TIMESTAMP_WITH_TIMEZONE": 5, + "XDBC_SUBCODE_MINUTE": 5, + "XDBC_SUBCODE_SECOND": 6, + "XDBC_SUBCODE_YEAR_TO_MONTH": 7, + "XDBC_SUBCODE_DAY_TO_HOUR": 8, + "XDBC_SUBCODE_DAY_TO_MINUTE": 9, + "XDBC_SUBCODE_DAY_TO_SECOND": 10, + "XDBC_SUBCODE_HOUR_TO_MINUTE": 11, + "XDBC_SUBCODE_HOUR_TO_SECOND": 12, + "XDBC_SUBCODE_MINUTE_TO_SECOND": 13, + "XDBC_SUBCODE_INTERVAL_YEAR": 101, + "XDBC_SUBCODE_INTERVAL_MONTH": 102, + "XDBC_SUBCODE_INTERVAL_DAY": 103, + "XDBC_SUBCODE_INTERVAL_HOUR": 104, + "XDBC_SUBCODE_INTERVAL_MINUTE": 105, + "XDBC_SUBCODE_INTERVAL_SECOND": 106, + "XDBC_SUBCODE_INTERVAL_YEAR_TO_MONTH": 107, + "XDBC_SUBCODE_INTERVAL_DAY_TO_HOUR": 108, + "XDBC_SUBCODE_INTERVAL_DAY_TO_MINUTE": 109, + "XDBC_SUBCODE_INTERVAL_DAY_TO_SECOND": 110, + "XDBC_SUBCODE_INTERVAL_HOUR_TO_MINUTE": 111, + "XDBC_SUBCODE_INTERVAL_HOUR_TO_SECOND": 112, + "XDBC_SUBCODE_INTERVAL_MINUTE_TO_SECOND": 113, + } +) + +func (x XdbcDatetimeSubcode) Enum() *XdbcDatetimeSubcode { + p := new(XdbcDatetimeSubcode) + *p = x + return p +} + +func (x XdbcDatetimeSubcode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (XdbcDatetimeSubcode) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[18].Descriptor() +} + +func (XdbcDatetimeSubcode) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[18] +} + +func (x XdbcDatetimeSubcode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use XdbcDatetimeSubcode.Descriptor instead. +func (XdbcDatetimeSubcode) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{18} +} + +type Nullable int32 + +const ( + // * + // Indicates that the fields does not allow the use of null values. + Nullable_NULLABILITY_NO_NULLS Nullable = 0 + // * + // Indicates that the fields allow the use of null values. + Nullable_NULLABILITY_NULLABLE Nullable = 1 + // * + // Indicates that nullability of the fields cannot be determined. + Nullable_NULLABILITY_UNKNOWN Nullable = 2 +) + +// Enum value maps for Nullable. +var ( + Nullable_name = map[int32]string{ + 0: "NULLABILITY_NO_NULLS", + 1: "NULLABILITY_NULLABLE", + 2: "NULLABILITY_UNKNOWN", + } + Nullable_value = map[string]int32{ + "NULLABILITY_NO_NULLS": 0, + "NULLABILITY_NULLABLE": 1, + "NULLABILITY_UNKNOWN": 2, + } +) + +func (x Nullable) Enum() *Nullable { + p := new(Nullable) + *p = x + return p +} + +func (x Nullable) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Nullable) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[19].Descriptor() +} + +func (Nullable) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[19] +} + +func (x Nullable) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Nullable.Descriptor instead. +func (Nullable) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{19} +} + +type Searchable int32 + +const ( + // * + // Indicates that column cannot be used in a WHERE clause. + Searchable_SEARCHABLE_NONE Searchable = 0 + // * + // Indicates that the column can be used in a WHERE clause if it is using a + // LIKE operator. + Searchable_SEARCHABLE_CHAR Searchable = 1 + // * + // Indicates that the column can be used In a WHERE clause with any + // operator other than LIKE. + // + // - Allowed operators: comparison, quantified comparison, BETWEEN, + // DISTINCT, IN, MATCH, and UNIQUE. + Searchable_SEARCHABLE_BASIC Searchable = 2 + // * + // Indicates that the column can be used in a WHERE clause using any operator. + Searchable_SEARCHABLE_FULL Searchable = 3 +) + +// Enum value maps for Searchable. +var ( + Searchable_name = map[int32]string{ + 0: "SEARCHABLE_NONE", + 1: "SEARCHABLE_CHAR", + 2: "SEARCHABLE_BASIC", + 3: "SEARCHABLE_FULL", + } + Searchable_value = map[string]int32{ + "SEARCHABLE_NONE": 0, + "SEARCHABLE_CHAR": 1, + "SEARCHABLE_BASIC": 2, + "SEARCHABLE_FULL": 3, + } +) + +func (x Searchable) Enum() *Searchable { + p := new(Searchable) + *p = x + return p +} + +func (x Searchable) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Searchable) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[20].Descriptor() +} + +func (Searchable) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[20] +} + +func (x Searchable) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Searchable.Descriptor instead. +func (Searchable) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{20} +} + +type UpdateDeleteRules int32 + +const ( + UpdateDeleteRules_CASCADE UpdateDeleteRules = 0 + UpdateDeleteRules_RESTRICT UpdateDeleteRules = 1 + UpdateDeleteRules_SET_NULL UpdateDeleteRules = 2 + UpdateDeleteRules_NO_ACTION UpdateDeleteRules = 3 + UpdateDeleteRules_SET_DEFAULT UpdateDeleteRules = 4 +) + +// Enum value maps for UpdateDeleteRules. +var ( + UpdateDeleteRules_name = map[int32]string{ + 0: "CASCADE", + 1: "RESTRICT", + 2: "SET_NULL", + 3: "NO_ACTION", + 4: "SET_DEFAULT", + } + UpdateDeleteRules_value = map[string]int32{ + "CASCADE": 0, + "RESTRICT": 1, + "SET_NULL": 2, + "NO_ACTION": 3, + "SET_DEFAULT": 4, + } +) + +func (x UpdateDeleteRules) Enum() *UpdateDeleteRules { + p := new(UpdateDeleteRules) + *p = x + return p +} + +func (x UpdateDeleteRules) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UpdateDeleteRules) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[21].Descriptor() +} + +func (UpdateDeleteRules) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[21] +} + +func (x UpdateDeleteRules) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UpdateDeleteRules.Descriptor instead. +func (UpdateDeleteRules) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{21} +} + +type ActionEndTransactionRequest_EndTransaction int32 + +const ( + ActionEndTransactionRequest_END_TRANSACTION_UNSPECIFIED ActionEndTransactionRequest_EndTransaction = 0 + // Commit the transaction. + ActionEndTransactionRequest_END_TRANSACTION_COMMIT ActionEndTransactionRequest_EndTransaction = 1 + // Roll back the transaction. + ActionEndTransactionRequest_END_TRANSACTION_ROLLBACK ActionEndTransactionRequest_EndTransaction = 2 +) + +// Enum value maps for ActionEndTransactionRequest_EndTransaction. +var ( + ActionEndTransactionRequest_EndTransaction_name = map[int32]string{ + 0: "END_TRANSACTION_UNSPECIFIED", + 1: "END_TRANSACTION_COMMIT", + 2: "END_TRANSACTION_ROLLBACK", + } + ActionEndTransactionRequest_EndTransaction_value = map[string]int32{ + "END_TRANSACTION_UNSPECIFIED": 0, + "END_TRANSACTION_COMMIT": 1, + "END_TRANSACTION_ROLLBACK": 2, + } +) + +func (x ActionEndTransactionRequest_EndTransaction) Enum() *ActionEndTransactionRequest_EndTransaction { + p := new(ActionEndTransactionRequest_EndTransaction) + *p = x + return p +} + +func (x ActionEndTransactionRequest_EndTransaction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ActionEndTransactionRequest_EndTransaction) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[22].Descriptor() +} + +func (ActionEndTransactionRequest_EndTransaction) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[22] +} + +func (x ActionEndTransactionRequest_EndTransaction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ActionEndTransactionRequest_EndTransaction.Descriptor instead. +func (ActionEndTransactionRequest_EndTransaction) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{19, 0} +} + +type ActionEndSavepointRequest_EndSavepoint int32 + +const ( + ActionEndSavepointRequest_END_SAVEPOINT_UNSPECIFIED ActionEndSavepointRequest_EndSavepoint = 0 + // Release the savepoint. + ActionEndSavepointRequest_END_SAVEPOINT_RELEASE ActionEndSavepointRequest_EndSavepoint = 1 + // Roll back to a savepoint. + ActionEndSavepointRequest_END_SAVEPOINT_ROLLBACK ActionEndSavepointRequest_EndSavepoint = 2 +) + +// Enum value maps for ActionEndSavepointRequest_EndSavepoint. +var ( + ActionEndSavepointRequest_EndSavepoint_name = map[int32]string{ + 0: "END_SAVEPOINT_UNSPECIFIED", + 1: "END_SAVEPOINT_RELEASE", + 2: "END_SAVEPOINT_ROLLBACK", + } + ActionEndSavepointRequest_EndSavepoint_value = map[string]int32{ + "END_SAVEPOINT_UNSPECIFIED": 0, + "END_SAVEPOINT_RELEASE": 1, + "END_SAVEPOINT_ROLLBACK": 2, + } +) + +func (x ActionEndSavepointRequest_EndSavepoint) Enum() *ActionEndSavepointRequest_EndSavepoint { + p := new(ActionEndSavepointRequest_EndSavepoint) + *p = x + return p +} + +func (x ActionEndSavepointRequest_EndSavepoint) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ActionEndSavepointRequest_EndSavepoint) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[23].Descriptor() +} + +func (ActionEndSavepointRequest_EndSavepoint) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[23] +} + +func (x ActionEndSavepointRequest_EndSavepoint) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ActionEndSavepointRequest_EndSavepoint.Descriptor instead. +func (ActionEndSavepointRequest_EndSavepoint) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{20, 0} +} + +// The action to take if the target table does not exist +type CommandStatementIngest_TableDefinitionOptions_TableNotExistOption int32 + +const ( + // Do not use. Servers should error if this is specified by a client. + CommandStatementIngest_TableDefinitionOptions_TABLE_NOT_EXIST_OPTION_UNSPECIFIED CommandStatementIngest_TableDefinitionOptions_TableNotExistOption = 0 + // Create the table if it does not exist + CommandStatementIngest_TableDefinitionOptions_TABLE_NOT_EXIST_OPTION_CREATE CommandStatementIngest_TableDefinitionOptions_TableNotExistOption = 1 + // Fail if the table does not exist + CommandStatementIngest_TableDefinitionOptions_TABLE_NOT_EXIST_OPTION_FAIL CommandStatementIngest_TableDefinitionOptions_TableNotExistOption = 2 +) + +// Enum value maps for CommandStatementIngest_TableDefinitionOptions_TableNotExistOption. +var ( + CommandStatementIngest_TableDefinitionOptions_TableNotExistOption_name = map[int32]string{ + 0: "TABLE_NOT_EXIST_OPTION_UNSPECIFIED", + 1: "TABLE_NOT_EXIST_OPTION_CREATE", + 2: "TABLE_NOT_EXIST_OPTION_FAIL", + } + CommandStatementIngest_TableDefinitionOptions_TableNotExistOption_value = map[string]int32{ + "TABLE_NOT_EXIST_OPTION_UNSPECIFIED": 0, + "TABLE_NOT_EXIST_OPTION_CREATE": 1, + "TABLE_NOT_EXIST_OPTION_FAIL": 2, + } +) + +func (x CommandStatementIngest_TableDefinitionOptions_TableNotExistOption) Enum() *CommandStatementIngest_TableDefinitionOptions_TableNotExistOption { + p := new(CommandStatementIngest_TableDefinitionOptions_TableNotExistOption) + *p = x + return p +} + +func (x CommandStatementIngest_TableDefinitionOptions_TableNotExistOption) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommandStatementIngest_TableDefinitionOptions_TableNotExistOption) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[24].Descriptor() +} + +func (CommandStatementIngest_TableDefinitionOptions_TableNotExistOption) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[24] +} + +func (x CommandStatementIngest_TableDefinitionOptions_TableNotExistOption) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommandStatementIngest_TableDefinitionOptions_TableNotExistOption.Descriptor instead. +func (CommandStatementIngest_TableDefinitionOptions_TableNotExistOption) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{27, 0, 0} +} + +// The action to take if the target table already exists +type CommandStatementIngest_TableDefinitionOptions_TableExistsOption int32 + +const ( + // Do not use. Servers should error if this is specified by a client. + CommandStatementIngest_TableDefinitionOptions_TABLE_EXISTS_OPTION_UNSPECIFIED CommandStatementIngest_TableDefinitionOptions_TableExistsOption = 0 + // Fail if the table already exists + CommandStatementIngest_TableDefinitionOptions_TABLE_EXISTS_OPTION_FAIL CommandStatementIngest_TableDefinitionOptions_TableExistsOption = 1 + // Append to the table if it already exists + CommandStatementIngest_TableDefinitionOptions_TABLE_EXISTS_OPTION_APPEND CommandStatementIngest_TableDefinitionOptions_TableExistsOption = 2 + // Drop and recreate the table if it already exists + CommandStatementIngest_TableDefinitionOptions_TABLE_EXISTS_OPTION_REPLACE CommandStatementIngest_TableDefinitionOptions_TableExistsOption = 3 +) + +// Enum value maps for CommandStatementIngest_TableDefinitionOptions_TableExistsOption. +var ( + CommandStatementIngest_TableDefinitionOptions_TableExistsOption_name = map[int32]string{ + 0: "TABLE_EXISTS_OPTION_UNSPECIFIED", + 1: "TABLE_EXISTS_OPTION_FAIL", + 2: "TABLE_EXISTS_OPTION_APPEND", + 3: "TABLE_EXISTS_OPTION_REPLACE", + } + CommandStatementIngest_TableDefinitionOptions_TableExistsOption_value = map[string]int32{ + "TABLE_EXISTS_OPTION_UNSPECIFIED": 0, + "TABLE_EXISTS_OPTION_FAIL": 1, + "TABLE_EXISTS_OPTION_APPEND": 2, + "TABLE_EXISTS_OPTION_REPLACE": 3, + } +) + +func (x CommandStatementIngest_TableDefinitionOptions_TableExistsOption) Enum() *CommandStatementIngest_TableDefinitionOptions_TableExistsOption { + p := new(CommandStatementIngest_TableDefinitionOptions_TableExistsOption) + *p = x + return p +} + +func (x CommandStatementIngest_TableDefinitionOptions_TableExistsOption) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommandStatementIngest_TableDefinitionOptions_TableExistsOption) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[25].Descriptor() +} + +func (CommandStatementIngest_TableDefinitionOptions_TableExistsOption) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[25] +} + +func (x CommandStatementIngest_TableDefinitionOptions_TableExistsOption) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommandStatementIngest_TableDefinitionOptions_TableExistsOption.Descriptor instead. +func (CommandStatementIngest_TableDefinitionOptions_TableExistsOption) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{27, 0, 1} +} + +type ActionCancelQueryResult_CancelResult int32 + +const ( + // The cancellation status is unknown. Servers should avoid using + // this value (send a NOT_FOUND error if the requested query is + // not known). Clients can retry the request. + ActionCancelQueryResult_CANCEL_RESULT_UNSPECIFIED ActionCancelQueryResult_CancelResult = 0 + // The cancellation request is complete. Subsequent requests with + // the same payload may return CANCELLED or a NOT_FOUND error. + ActionCancelQueryResult_CANCEL_RESULT_CANCELLED ActionCancelQueryResult_CancelResult = 1 + // The cancellation request is in progress. The client may retry + // the cancellation request. + ActionCancelQueryResult_CANCEL_RESULT_CANCELLING ActionCancelQueryResult_CancelResult = 2 + // The query is not cancellable. The client should not retry the + // cancellation request. + ActionCancelQueryResult_CANCEL_RESULT_NOT_CANCELLABLE ActionCancelQueryResult_CancelResult = 3 +) + +// Enum value maps for ActionCancelQueryResult_CancelResult. +var ( + ActionCancelQueryResult_CancelResult_name = map[int32]string{ + 0: "CANCEL_RESULT_UNSPECIFIED", + 1: "CANCEL_RESULT_CANCELLED", + 2: "CANCEL_RESULT_CANCELLING", + 3: "CANCEL_RESULT_NOT_CANCELLABLE", + } + ActionCancelQueryResult_CancelResult_value = map[string]int32{ + "CANCEL_RESULT_UNSPECIFIED": 0, + "CANCEL_RESULT_CANCELLED": 1, + "CANCEL_RESULT_CANCELLING": 2, + "CANCEL_RESULT_NOT_CANCELLABLE": 3, + } +) + +func (x ActionCancelQueryResult_CancelResult) Enum() *ActionCancelQueryResult_CancelResult { + p := new(ActionCancelQueryResult_CancelResult) + *p = x + return p +} + +func (x ActionCancelQueryResult_CancelResult) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ActionCancelQueryResult_CancelResult) Descriptor() protoreflect.EnumDescriptor { + return file_FlightSql_proto_enumTypes[26].Descriptor() +} + +func (ActionCancelQueryResult_CancelResult) Type() protoreflect.EnumType { + return &file_FlightSql_proto_enumTypes[26] +} + +func (x ActionCancelQueryResult_CancelResult) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ActionCancelQueryResult_CancelResult.Descriptor instead. +func (ActionCancelQueryResult_CancelResult) EnumDescriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{31, 0} +} + +// Represents a metadata request. Used in the command member of FlightDescriptor +// for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// - GetFlightInfo: execute the metadata request. +// +// The returned Arrow schema will be: +// < +// +// info_name: uint32 not null, +// value: dense_union< +// string_value: utf8, +// bool_value: bool, +// bigint_value: int64, +// int32_bitmask: int32, +// string_list: list +// int32_to_int32_list_map: map> +// +// > +// where there is one row per requested piece of metadata information. +type CommandGetSqlInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Values are modelled after ODBC's SQLGetInfo() function. This information is intended to provide + // Flight SQL clients with basic, SQL syntax and SQL functions related information. + // More information types can be added in future releases. + // E.g. more SQL syntax support types, scalar functions support, type conversion support etc. + // + // Note that the set of metadata may expand. + // + // Initially, Flight SQL will support the following information types: + // - Server Information - Range [0-500) + // - Syntax Information - Range [500-1000) + // Range [0-10,000) is reserved for defaults (see SqlInfo enum for default options). + // Custom options should start at 10,000. + // + // If omitted, then all metadata will be retrieved. + // Flight SQL Servers may choose to include additional metadata above and beyond the specified set, however they must + // at least return the specified set. IDs ranging from 0 to 10,000 (exclusive) are reserved for future use. + // If additional metadata is included, the metadata IDs should start from 10,000. + Info []uint32 `protobuf:"varint,1,rep,packed,name=info,proto3" json:"info,omitempty"` +} + +func (x *CommandGetSqlInfo) Reset() { + *x = CommandGetSqlInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetSqlInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetSqlInfo) ProtoMessage() {} + +func (x *CommandGetSqlInfo) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetSqlInfo.ProtoReflect.Descriptor instead. +func (*CommandGetSqlInfo) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{0} +} + +func (x *CommandGetSqlInfo) GetInfo() []uint32 { + if x != nil { + return x.Info + } + return nil +} + +// Represents a request to retrieve information about data type supported on a Flight SQL enabled backend. +// Used in the command member of FlightDescriptor for the following RPC calls: +// - GetSchema: return the schema of the query. +// - GetFlightInfo: execute the catalog metadata request. +// +// The returned schema will be: +// < +// +// type_name: utf8 not null (The name of the data type, for example: VARCHAR, INTEGER, etc), +// data_type: int32 not null (The SQL data type), +// column_size: int32 (The maximum size supported by that column. +// In case of exact numeric types, this represents the maximum precision. +// In case of string types, this represents the character length. +// In case of datetime data types, this represents the length in characters of the string representation. +// NULL is returned for data types where column size is not applicable.), +// literal_prefix: utf8 (Character or characters used to prefix a literal, NULL is returned for +// data types where a literal prefix is not applicable.), +// literal_suffix: utf8 (Character or characters used to terminate a literal, +// NULL is returned for data types where a literal suffix is not applicable.), +// create_params: list +// (A list of keywords corresponding to which parameters can be used when creating +// a column for that specific type. +// NULL is returned if there are no parameters for the data type definition.), +// nullable: int32 not null (Shows if the data type accepts a NULL value. The possible values can be seen in the +// Nullable enum.), +// case_sensitive: bool not null (Shows if a character data type is case-sensitive in collations and comparisons), +// searchable: int32 not null (Shows how the data type is used in a WHERE clause. The possible values can be seen in the +// Searchable enum.), +// unsigned_attribute: bool (Shows if the data type is unsigned. NULL is returned if the attribute is +// not applicable to the data type or the data type is not numeric.), +// fixed_prec_scale: bool not null (Shows if the data type has predefined fixed precision and scale.), +// auto_increment: bool (Shows if the data type is auto incremental. NULL is returned if the attribute +// is not applicable to the data type or the data type is not numeric.), +// local_type_name: utf8 (Localized version of the data source-dependent name of the data type. NULL +// is returned if a localized name is not supported by the data source), +// minimum_scale: int32 (The minimum scale of the data type on the data source. +// If a data type has a fixed scale, the MINIMUM_SCALE and MAXIMUM_SCALE +// columns both contain this value. NULL is returned if scale is not applicable.), +// maximum_scale: int32 (The maximum scale of the data type on the data source. +// NULL is returned if scale is not applicable.), +// sql_data_type: int32 not null (The value of the SQL DATA TYPE which has the same values +// as data_type value. Except for interval and datetime, which +// uses generic values. More info about those types can be +// obtained through datetime_subcode. The possible values can be seen +// in the XdbcDataType enum.), +// datetime_subcode: int32 (Only used when the SQL DATA TYPE is interval or datetime. It contains +// its sub types. For type different from interval and datetime, this value +// is NULL. The possible values can be seen in the XdbcDatetimeSubcode enum.), +// num_prec_radix: int32 (If the data type is an approximate numeric type, this column contains +// the value 2 to indicate that COLUMN_SIZE specifies a number of bits. For +// exact numeric types, this column contains the value 10 to indicate that +// column size specifies a number of decimal digits. Otherwise, this column is NULL.), +// interval_precision: int32 (If the data type is an interval data type, then this column contains the value +// of the interval leading precision. Otherwise, this column is NULL. This fields +// is only relevant to be used by ODBC). +// +// > +// The returned data should be ordered by data_type and then by type_name. +type CommandGetXdbcTypeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the data type to search for the info. + DataType *int32 `protobuf:"varint,1,opt,name=data_type,json=dataType,proto3,oneof" json:"data_type,omitempty"` +} + +func (x *CommandGetXdbcTypeInfo) Reset() { + *x = CommandGetXdbcTypeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetXdbcTypeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetXdbcTypeInfo) ProtoMessage() {} + +func (x *CommandGetXdbcTypeInfo) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetXdbcTypeInfo.ProtoReflect.Descriptor instead. +func (*CommandGetXdbcTypeInfo) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{1} +} + +func (x *CommandGetXdbcTypeInfo) GetDataType() int32 { + if x != nil && x.DataType != nil { + return *x.DataType + } + return 0 +} + +// Represents a request to retrieve the list of catalogs on a Flight SQL enabled backend. +// The definition of a catalog depends on vendor/implementation. It is usually the database itself +// Used in the command member of FlightDescriptor for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// - GetFlightInfo: execute the catalog metadata request. +// +// The returned Arrow schema will be: +// < +// +// catalog_name: utf8 not null +// +// > +// The returned data should be ordered by catalog_name. +type CommandGetCatalogs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CommandGetCatalogs) Reset() { + *x = CommandGetCatalogs{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetCatalogs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetCatalogs) ProtoMessage() {} + +func (x *CommandGetCatalogs) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetCatalogs.ProtoReflect.Descriptor instead. +func (*CommandGetCatalogs) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{2} +} + +// Represents a request to retrieve the list of database schemas on a Flight SQL enabled backend. +// The definition of a database schema depends on vendor/implementation. It is usually a collection of tables. +// Used in the command member of FlightDescriptor for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// - GetFlightInfo: execute the catalog metadata request. +// +// The returned Arrow schema will be: +// < +// +// catalog_name: utf8, +// db_schema_name: utf8 not null +// +// > +// The returned data should be ordered by catalog_name, then db_schema_name. +type CommandGetDbSchemas struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the Catalog to search for the tables. + // An empty string retrieves those without a catalog. + // If omitted the catalog name should not be used to narrow the search. + Catalog *string `protobuf:"bytes,1,opt,name=catalog,proto3,oneof" json:"catalog,omitempty"` + // Specifies a filter pattern for schemas to search for. + // When no db_schema_filter_pattern is provided, the pattern will not be used to narrow the search. + // In the pattern string, two special characters can be used to denote matching rules: + // - "%" means to match any substring with 0 or more characters. + // - "_" means to match any one character. + DbSchemaFilterPattern *string `protobuf:"bytes,2,opt,name=db_schema_filter_pattern,json=dbSchemaFilterPattern,proto3,oneof" json:"db_schema_filter_pattern,omitempty"` +} + +func (x *CommandGetDbSchemas) Reset() { + *x = CommandGetDbSchemas{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetDbSchemas) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetDbSchemas) ProtoMessage() {} + +func (x *CommandGetDbSchemas) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetDbSchemas.ProtoReflect.Descriptor instead. +func (*CommandGetDbSchemas) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{3} +} + +func (x *CommandGetDbSchemas) GetCatalog() string { + if x != nil && x.Catalog != nil { + return *x.Catalog + } + return "" +} + +func (x *CommandGetDbSchemas) GetDbSchemaFilterPattern() string { + if x != nil && x.DbSchemaFilterPattern != nil { + return *x.DbSchemaFilterPattern + } + return "" +} + +// Represents a request to retrieve the list of tables, and optionally their schemas, on a Flight SQL enabled backend. +// Used in the command member of FlightDescriptor for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// - GetFlightInfo: execute the catalog metadata request. +// +// The returned Arrow schema will be: +// < +// +// catalog_name: utf8, +// db_schema_name: utf8, +// table_name: utf8 not null, +// table_type: utf8 not null, +// [optional] table_schema: bytes not null (schema of the table as described in Schema.fbs::Schema, +// it is serialized as an IPC message.) +// +// > +// Fields on table_schema may contain the following metadata: +// - ARROW:FLIGHT:SQL:CATALOG_NAME - Table's catalog name +// - ARROW:FLIGHT:SQL:DB_SCHEMA_NAME - Database schema name +// - ARROW:FLIGHT:SQL:TABLE_NAME - Table name +// - ARROW:FLIGHT:SQL:TYPE_NAME - The data source-specific name for the data type of the column. +// - ARROW:FLIGHT:SQL:PRECISION - Column precision/size +// - ARROW:FLIGHT:SQL:SCALE - Column scale/decimal digits if applicable +// - ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT - "1" indicates if the column is auto incremented, "0" otherwise. +// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case-sensitive, "0" otherwise. +// - ARROW:FLIGHT:SQL:IS_READ_ONLY - "1" indicates if the column is read only, "0" otherwise. +// - ARROW:FLIGHT:SQL:IS_SEARCHABLE - "1" indicates if the column is searchable via WHERE clause, "0" otherwise. +// +// The returned data should be ordered by catalog_name, db_schema_name, table_name, then table_type, followed by table_schema if requested. +type CommandGetTables struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the Catalog to search for the tables. + // An empty string retrieves those without a catalog. + // If omitted the catalog name should not be used to narrow the search. + Catalog *string `protobuf:"bytes,1,opt,name=catalog,proto3,oneof" json:"catalog,omitempty"` + // Specifies a filter pattern for schemas to search for. + // When no db_schema_filter_pattern is provided, all schemas matching other filters are searched. + // In the pattern string, two special characters can be used to denote matching rules: + // - "%" means to match any substring with 0 or more characters. + // - "_" means to match any one character. + DbSchemaFilterPattern *string `protobuf:"bytes,2,opt,name=db_schema_filter_pattern,json=dbSchemaFilterPattern,proto3,oneof" json:"db_schema_filter_pattern,omitempty"` + // Specifies a filter pattern for tables to search for. + // When no table_name_filter_pattern is provided, all tables matching other filters are searched. + // In the pattern string, two special characters can be used to denote matching rules: + // - "%" means to match any substring with 0 or more characters. + // - "_" means to match any one character. + TableNameFilterPattern *string `protobuf:"bytes,3,opt,name=table_name_filter_pattern,json=tableNameFilterPattern,proto3,oneof" json:"table_name_filter_pattern,omitempty"` + // Specifies a filter of table types which must match. + // The table types depend on vendor/implementation. It is usually used to separate tables from views or system tables. + // TABLE, VIEW, and SYSTEM TABLE are commonly supported. + TableTypes []string `protobuf:"bytes,4,rep,name=table_types,json=tableTypes,proto3" json:"table_types,omitempty"` + // Specifies if the Arrow schema should be returned for found tables. + IncludeSchema bool `protobuf:"varint,5,opt,name=include_schema,json=includeSchema,proto3" json:"include_schema,omitempty"` +} + +func (x *CommandGetTables) Reset() { + *x = CommandGetTables{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetTables) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetTables) ProtoMessage() {} + +func (x *CommandGetTables) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetTables.ProtoReflect.Descriptor instead. +func (*CommandGetTables) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{4} +} + +func (x *CommandGetTables) GetCatalog() string { + if x != nil && x.Catalog != nil { + return *x.Catalog + } + return "" +} + +func (x *CommandGetTables) GetDbSchemaFilterPattern() string { + if x != nil && x.DbSchemaFilterPattern != nil { + return *x.DbSchemaFilterPattern + } + return "" +} + +func (x *CommandGetTables) GetTableNameFilterPattern() string { + if x != nil && x.TableNameFilterPattern != nil { + return *x.TableNameFilterPattern + } + return "" +} + +func (x *CommandGetTables) GetTableTypes() []string { + if x != nil { + return x.TableTypes + } + return nil +} + +func (x *CommandGetTables) GetIncludeSchema() bool { + if x != nil { + return x.IncludeSchema + } + return false +} + +// Represents a request to retrieve the list of table types on a Flight SQL enabled backend. +// The table types depend on vendor/implementation. It is usually used to separate tables from views or system tables. +// TABLE, VIEW, and SYSTEM TABLE are commonly supported. +// Used in the command member of FlightDescriptor for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// - GetFlightInfo: execute the catalog metadata request. +// +// The returned Arrow schema will be: +// < +// +// table_type: utf8 not null +// +// > +// The returned data should be ordered by table_type. +type CommandGetTableTypes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CommandGetTableTypes) Reset() { + *x = CommandGetTableTypes{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetTableTypes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetTableTypes) ProtoMessage() {} + +func (x *CommandGetTableTypes) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetTableTypes.ProtoReflect.Descriptor instead. +func (*CommandGetTableTypes) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{5} +} + +// Represents a request to retrieve the primary keys of a table on a Flight SQL enabled backend. +// Used in the command member of FlightDescriptor for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// - GetFlightInfo: execute the catalog metadata request. +// +// The returned Arrow schema will be: +// < +// +// catalog_name: utf8, +// db_schema_name: utf8, +// table_name: utf8 not null, +// column_name: utf8 not null, +// key_name: utf8, +// key_sequence: int32 not null +// +// > +// The returned data should be ordered by catalog_name, db_schema_name, table_name, key_name, then key_sequence. +type CommandGetPrimaryKeys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the catalog to search for the table. + // An empty string retrieves those without a catalog. + // If omitted the catalog name should not be used to narrow the search. + Catalog *string `protobuf:"bytes,1,opt,name=catalog,proto3,oneof" json:"catalog,omitempty"` + // Specifies the schema to search for the table. + // An empty string retrieves those without a schema. + // If omitted the schema name should not be used to narrow the search. + DbSchema *string `protobuf:"bytes,2,opt,name=db_schema,json=dbSchema,proto3,oneof" json:"db_schema,omitempty"` + // Specifies the table to get the primary keys for. + Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` +} + +func (x *CommandGetPrimaryKeys) Reset() { + *x = CommandGetPrimaryKeys{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetPrimaryKeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetPrimaryKeys) ProtoMessage() {} + +func (x *CommandGetPrimaryKeys) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetPrimaryKeys.ProtoReflect.Descriptor instead. +func (*CommandGetPrimaryKeys) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{6} +} + +func (x *CommandGetPrimaryKeys) GetCatalog() string { + if x != nil && x.Catalog != nil { + return *x.Catalog + } + return "" +} + +func (x *CommandGetPrimaryKeys) GetDbSchema() string { + if x != nil && x.DbSchema != nil { + return *x.DbSchema + } + return "" +} + +func (x *CommandGetPrimaryKeys) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +// Represents a request to retrieve a description of the foreign key columns that reference the given table's +// primary key columns (the foreign keys exported by a table) of a table on a Flight SQL enabled backend. +// Used in the command member of FlightDescriptor for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// - GetFlightInfo: execute the catalog metadata request. +// +// The returned Arrow schema will be: +// < +// +// pk_catalog_name: utf8, +// pk_db_schema_name: utf8, +// pk_table_name: utf8 not null, +// pk_column_name: utf8 not null, +// fk_catalog_name: utf8, +// fk_db_schema_name: utf8, +// fk_table_name: utf8 not null, +// fk_column_name: utf8 not null, +// key_sequence: int32 not null, +// fk_key_name: utf8, +// pk_key_name: utf8, +// update_rule: uint8 not null, +// delete_rule: uint8 not null +// +// > +// The returned data should be ordered by fk_catalog_name, fk_db_schema_name, fk_table_name, fk_key_name, then key_sequence. +// update_rule and delete_rule returns a byte that is equivalent to actions declared on UpdateDeleteRules enum. +type CommandGetExportedKeys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the catalog to search for the foreign key table. + // An empty string retrieves those without a catalog. + // If omitted the catalog name should not be used to narrow the search. + Catalog *string `protobuf:"bytes,1,opt,name=catalog,proto3,oneof" json:"catalog,omitempty"` + // Specifies the schema to search for the foreign key table. + // An empty string retrieves those without a schema. + // If omitted the schema name should not be used to narrow the search. + DbSchema *string `protobuf:"bytes,2,opt,name=db_schema,json=dbSchema,proto3,oneof" json:"db_schema,omitempty"` + // Specifies the foreign key table to get the foreign keys for. + Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` +} + +func (x *CommandGetExportedKeys) Reset() { + *x = CommandGetExportedKeys{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetExportedKeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetExportedKeys) ProtoMessage() {} + +func (x *CommandGetExportedKeys) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetExportedKeys.ProtoReflect.Descriptor instead. +func (*CommandGetExportedKeys) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{7} +} + +func (x *CommandGetExportedKeys) GetCatalog() string { + if x != nil && x.Catalog != nil { + return *x.Catalog + } + return "" +} + +func (x *CommandGetExportedKeys) GetDbSchema() string { + if x != nil && x.DbSchema != nil { + return *x.DbSchema + } + return "" +} + +func (x *CommandGetExportedKeys) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +// Represents a request to retrieve the foreign keys of a table on a Flight SQL enabled backend. +// Used in the command member of FlightDescriptor for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// - GetFlightInfo: execute the catalog metadata request. +// +// The returned Arrow schema will be: +// < +// +// pk_catalog_name: utf8, +// pk_db_schema_name: utf8, +// pk_table_name: utf8 not null, +// pk_column_name: utf8 not null, +// fk_catalog_name: utf8, +// fk_db_schema_name: utf8, +// fk_table_name: utf8 not null, +// fk_column_name: utf8 not null, +// key_sequence: int32 not null, +// fk_key_name: utf8, +// pk_key_name: utf8, +// update_rule: uint8 not null, +// delete_rule: uint8 not null +// +// > +// The returned data should be ordered by pk_catalog_name, pk_db_schema_name, pk_table_name, pk_key_name, then key_sequence. +// update_rule and delete_rule returns a byte that is equivalent to actions: +// - 0 = CASCADE +// - 1 = RESTRICT +// - 2 = SET NULL +// - 3 = NO ACTION +// - 4 = SET DEFAULT +type CommandGetImportedKeys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the catalog to search for the primary key table. + // An empty string retrieves those without a catalog. + // If omitted the catalog name should not be used to narrow the search. + Catalog *string `protobuf:"bytes,1,opt,name=catalog,proto3,oneof" json:"catalog,omitempty"` + // Specifies the schema to search for the primary key table. + // An empty string retrieves those without a schema. + // If omitted the schema name should not be used to narrow the search. + DbSchema *string `protobuf:"bytes,2,opt,name=db_schema,json=dbSchema,proto3,oneof" json:"db_schema,omitempty"` + // Specifies the primary key table to get the foreign keys for. + Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` +} + +func (x *CommandGetImportedKeys) Reset() { + *x = CommandGetImportedKeys{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetImportedKeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetImportedKeys) ProtoMessage() {} + +func (x *CommandGetImportedKeys) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetImportedKeys.ProtoReflect.Descriptor instead. +func (*CommandGetImportedKeys) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{8} +} + +func (x *CommandGetImportedKeys) GetCatalog() string { + if x != nil && x.Catalog != nil { + return *x.Catalog + } + return "" +} + +func (x *CommandGetImportedKeys) GetDbSchema() string { + if x != nil && x.DbSchema != nil { + return *x.DbSchema + } + return "" +} + +func (x *CommandGetImportedKeys) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +// Represents a request to retrieve a description of the foreign key columns in the given foreign key table that +// reference the primary key or the columns representing a unique constraint of the parent table (could be the same +// or a different table) on a Flight SQL enabled backend. +// Used in the command member of FlightDescriptor for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// - GetFlightInfo: execute the catalog metadata request. +// +// The returned Arrow schema will be: +// < +// +// pk_catalog_name: utf8, +// pk_db_schema_name: utf8, +// pk_table_name: utf8 not null, +// pk_column_name: utf8 not null, +// fk_catalog_name: utf8, +// fk_db_schema_name: utf8, +// fk_table_name: utf8 not null, +// fk_column_name: utf8 not null, +// key_sequence: int32 not null, +// fk_key_name: utf8, +// pk_key_name: utf8, +// update_rule: uint8 not null, +// delete_rule: uint8 not null +// +// > +// The returned data should be ordered by pk_catalog_name, pk_db_schema_name, pk_table_name, pk_key_name, then key_sequence. +// update_rule and delete_rule returns a byte that is equivalent to actions: +// - 0 = CASCADE +// - 1 = RESTRICT +// - 2 = SET NULL +// - 3 = NO ACTION +// - 4 = SET DEFAULT +type CommandGetCrossReference struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // * + // The catalog name where the parent table is. + // An empty string retrieves those without a catalog. + // If omitted the catalog name should not be used to narrow the search. + PkCatalog *string `protobuf:"bytes,1,opt,name=pk_catalog,json=pkCatalog,proto3,oneof" json:"pk_catalog,omitempty"` + // * + // The Schema name where the parent table is. + // An empty string retrieves those without a schema. + // If omitted the schema name should not be used to narrow the search. + PkDbSchema *string `protobuf:"bytes,2,opt,name=pk_db_schema,json=pkDbSchema,proto3,oneof" json:"pk_db_schema,omitempty"` + // * + // The parent table name. It cannot be null. + PkTable string `protobuf:"bytes,3,opt,name=pk_table,json=pkTable,proto3" json:"pk_table,omitempty"` + // * + // The catalog name where the foreign table is. + // An empty string retrieves those without a catalog. + // If omitted the catalog name should not be used to narrow the search. + FkCatalog *string `protobuf:"bytes,4,opt,name=fk_catalog,json=fkCatalog,proto3,oneof" json:"fk_catalog,omitempty"` + // * + // The schema name where the foreign table is. + // An empty string retrieves those without a schema. + // If omitted the schema name should not be used to narrow the search. + FkDbSchema *string `protobuf:"bytes,5,opt,name=fk_db_schema,json=fkDbSchema,proto3,oneof" json:"fk_db_schema,omitempty"` + // * + // The foreign table name. It cannot be null. + FkTable string `protobuf:"bytes,6,opt,name=fk_table,json=fkTable,proto3" json:"fk_table,omitempty"` +} + +func (x *CommandGetCrossReference) Reset() { + *x = CommandGetCrossReference{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandGetCrossReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandGetCrossReference) ProtoMessage() {} + +func (x *CommandGetCrossReference) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandGetCrossReference.ProtoReflect.Descriptor instead. +func (*CommandGetCrossReference) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{9} +} + +func (x *CommandGetCrossReference) GetPkCatalog() string { + if x != nil && x.PkCatalog != nil { + return *x.PkCatalog + } + return "" +} + +func (x *CommandGetCrossReference) GetPkDbSchema() string { + if x != nil && x.PkDbSchema != nil { + return *x.PkDbSchema + } + return "" +} + +func (x *CommandGetCrossReference) GetPkTable() string { + if x != nil { + return x.PkTable + } + return "" +} + +func (x *CommandGetCrossReference) GetFkCatalog() string { + if x != nil && x.FkCatalog != nil { + return *x.FkCatalog + } + return "" +} + +func (x *CommandGetCrossReference) GetFkDbSchema() string { + if x != nil && x.FkDbSchema != nil { + return *x.FkDbSchema + } + return "" +} + +func (x *CommandGetCrossReference) GetFkTable() string { + if x != nil { + return x.FkTable + } + return "" +} + +// Request message for the "CreatePreparedStatement" action on a Flight SQL enabled backend. +type ActionCreatePreparedStatementRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The valid SQL string to create a prepared statement for. + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + // Create/execute the prepared statement as part of this transaction (if + // unset, executions of the prepared statement will be auto-committed). + TransactionId []byte `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"` +} + +func (x *ActionCreatePreparedStatementRequest) Reset() { + *x = ActionCreatePreparedStatementRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionCreatePreparedStatementRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionCreatePreparedStatementRequest) ProtoMessage() {} + +func (x *ActionCreatePreparedStatementRequest) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionCreatePreparedStatementRequest.ProtoReflect.Descriptor instead. +func (*ActionCreatePreparedStatementRequest) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{10} +} + +func (x *ActionCreatePreparedStatementRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *ActionCreatePreparedStatementRequest) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +// An embedded message describing a Substrait plan to execute. +type SubstraitPlan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The serialized substrait.Plan to create a prepared statement for. + // XXX(ARROW-16902): this is bytes instead of an embedded message + // because Protobuf does not really support one DLL using Protobuf + // definitions from another DLL. + Plan []byte `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"` + // The Substrait release, e.g. "0.12.0". This information is not + // tracked in the plan itself, so this is the only way for consumers + // to potentially know if they can handle the plan. + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *SubstraitPlan) Reset() { + *x = SubstraitPlan{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubstraitPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubstraitPlan) ProtoMessage() {} + +func (x *SubstraitPlan) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubstraitPlan.ProtoReflect.Descriptor instead. +func (*SubstraitPlan) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{11} +} + +func (x *SubstraitPlan) GetPlan() []byte { + if x != nil { + return x.Plan + } + return nil +} + +func (x *SubstraitPlan) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +// Request message for the "CreatePreparedSubstraitPlan" action on a Flight SQL enabled backend. +type ActionCreatePreparedSubstraitPlanRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The serialized substrait.Plan to create a prepared statement for. + Plan *SubstraitPlan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"` + // Create/execute the prepared statement as part of this transaction (if + // unset, executions of the prepared statement will be auto-committed). + TransactionId []byte `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"` +} + +func (x *ActionCreatePreparedSubstraitPlanRequest) Reset() { + *x = ActionCreatePreparedSubstraitPlanRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionCreatePreparedSubstraitPlanRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionCreatePreparedSubstraitPlanRequest) ProtoMessage() {} + +func (x *ActionCreatePreparedSubstraitPlanRequest) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionCreatePreparedSubstraitPlanRequest.ProtoReflect.Descriptor instead. +func (*ActionCreatePreparedSubstraitPlanRequest) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{12} +} + +func (x *ActionCreatePreparedSubstraitPlanRequest) GetPlan() *SubstraitPlan { + if x != nil { + return x.Plan + } + return nil +} + +func (x *ActionCreatePreparedSubstraitPlanRequest) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +// Wrap the result of a "CreatePreparedStatement" or "CreatePreparedSubstraitPlan" action. +// +// The resultant PreparedStatement can be closed either: +// - Manually, through the "ClosePreparedStatement" action; +// - Automatically, by a server timeout. +// +// The result should be wrapped in a google.protobuf.Any message. +type ActionCreatePreparedStatementResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque handle for the prepared statement on the server. + PreparedStatementHandle []byte `protobuf:"bytes,1,opt,name=prepared_statement_handle,json=preparedStatementHandle,proto3" json:"prepared_statement_handle,omitempty"` + // If a result set generating query was provided, dataset_schema contains the + // schema of the result set. It should be an IPC-encapsulated Schema, as described in Schema.fbs. + // For some queries, the schema of the results may depend on the schema of the parameters. The server + // should provide its best guess as to the schema at this point. Clients must not assume that this + // schema, if provided, will be accurate. + DatasetSchema []byte `protobuf:"bytes,2,opt,name=dataset_schema,json=datasetSchema,proto3" json:"dataset_schema,omitempty"` + // If the query provided contained parameters, parameter_schema contains the + // schema of the expected parameters. It should be an IPC-encapsulated Schema, as described in Schema.fbs. + ParameterSchema []byte `protobuf:"bytes,3,opt,name=parameter_schema,json=parameterSchema,proto3" json:"parameter_schema,omitempty"` +} + +func (x *ActionCreatePreparedStatementResult) Reset() { + *x = ActionCreatePreparedStatementResult{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionCreatePreparedStatementResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionCreatePreparedStatementResult) ProtoMessage() {} + +func (x *ActionCreatePreparedStatementResult) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionCreatePreparedStatementResult.ProtoReflect.Descriptor instead. +func (*ActionCreatePreparedStatementResult) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{13} +} + +func (x *ActionCreatePreparedStatementResult) GetPreparedStatementHandle() []byte { + if x != nil { + return x.PreparedStatementHandle + } + return nil +} + +func (x *ActionCreatePreparedStatementResult) GetDatasetSchema() []byte { + if x != nil { + return x.DatasetSchema + } + return nil +} + +func (x *ActionCreatePreparedStatementResult) GetParameterSchema() []byte { + if x != nil { + return x.ParameterSchema + } + return nil +} + +// Request message for the "ClosePreparedStatement" action on a Flight SQL enabled backend. +// Closes server resources associated with the prepared statement handle. +type ActionClosePreparedStatementRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque handle for the prepared statement on the server. + PreparedStatementHandle []byte `protobuf:"bytes,1,opt,name=prepared_statement_handle,json=preparedStatementHandle,proto3" json:"prepared_statement_handle,omitempty"` +} + +func (x *ActionClosePreparedStatementRequest) Reset() { + *x = ActionClosePreparedStatementRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionClosePreparedStatementRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionClosePreparedStatementRequest) ProtoMessage() {} + +func (x *ActionClosePreparedStatementRequest) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionClosePreparedStatementRequest.ProtoReflect.Descriptor instead. +func (*ActionClosePreparedStatementRequest) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{14} +} + +func (x *ActionClosePreparedStatementRequest) GetPreparedStatementHandle() []byte { + if x != nil { + return x.PreparedStatementHandle + } + return nil +} + +// Request message for the "BeginTransaction" action. +// Begins a transaction. +type ActionBeginTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ActionBeginTransactionRequest) Reset() { + *x = ActionBeginTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionBeginTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionBeginTransactionRequest) ProtoMessage() {} + +func (x *ActionBeginTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionBeginTransactionRequest.ProtoReflect.Descriptor instead. +func (*ActionBeginTransactionRequest) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{15} +} + +// Request message for the "BeginSavepoint" action. +// Creates a savepoint within a transaction. +// +// Only supported if FLIGHT_SQL_TRANSACTION is +// FLIGHT_SQL_TRANSACTION_SUPPORT_SAVEPOINT. +type ActionBeginSavepointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The transaction to which a savepoint belongs. + TransactionId []byte `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + // Name for the savepoint. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ActionBeginSavepointRequest) Reset() { + *x = ActionBeginSavepointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionBeginSavepointRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionBeginSavepointRequest) ProtoMessage() {} + +func (x *ActionBeginSavepointRequest) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionBeginSavepointRequest.ProtoReflect.Descriptor instead. +func (*ActionBeginSavepointRequest) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{16} +} + +func (x *ActionBeginSavepointRequest) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +func (x *ActionBeginSavepointRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The result of a "BeginTransaction" action. +// +// The transaction can be manipulated with the "EndTransaction" action, or +// automatically via server timeout. If the transaction times out, then it is +// automatically rolled back. +// +// The result should be wrapped in a google.protobuf.Any message. +type ActionBeginTransactionResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque handle for the transaction on the server. + TransactionId []byte `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` +} + +func (x *ActionBeginTransactionResult) Reset() { + *x = ActionBeginTransactionResult{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionBeginTransactionResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionBeginTransactionResult) ProtoMessage() {} + +func (x *ActionBeginTransactionResult) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionBeginTransactionResult.ProtoReflect.Descriptor instead. +func (*ActionBeginTransactionResult) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{17} +} + +func (x *ActionBeginTransactionResult) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +// The result of a "BeginSavepoint" action. +// +// The transaction can be manipulated with the "EndSavepoint" action. +// If the associated transaction is committed, rolled back, or times +// out, then the savepoint is also invalidated. +// +// The result should be wrapped in a google.protobuf.Any message. +type ActionBeginSavepointResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque handle for the savepoint on the server. + SavepointId []byte `protobuf:"bytes,1,opt,name=savepoint_id,json=savepointId,proto3" json:"savepoint_id,omitempty"` +} + +func (x *ActionBeginSavepointResult) Reset() { + *x = ActionBeginSavepointResult{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionBeginSavepointResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionBeginSavepointResult) ProtoMessage() {} + +func (x *ActionBeginSavepointResult) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionBeginSavepointResult.ProtoReflect.Descriptor instead. +func (*ActionBeginSavepointResult) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{18} +} + +func (x *ActionBeginSavepointResult) GetSavepointId() []byte { + if x != nil { + return x.SavepointId + } + return nil +} + +// Request message for the "EndTransaction" action. +// +// Commit (COMMIT) or rollback (ROLLBACK) the transaction. +// +// If the action completes successfully, the transaction handle is +// invalidated, as are all associated savepoints. +type ActionEndTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque handle for the transaction on the server. + TransactionId []byte `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + // Whether to commit/rollback the given transaction. + Action ActionEndTransactionRequest_EndTransaction `protobuf:"varint,2,opt,name=action,proto3,enum=arrow.flight.protocol.sql.ActionEndTransactionRequest_EndTransaction" json:"action,omitempty"` +} + +func (x *ActionEndTransactionRequest) Reset() { + *x = ActionEndTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionEndTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionEndTransactionRequest) ProtoMessage() {} + +func (x *ActionEndTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionEndTransactionRequest.ProtoReflect.Descriptor instead. +func (*ActionEndTransactionRequest) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{19} +} + +func (x *ActionEndTransactionRequest) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +func (x *ActionEndTransactionRequest) GetAction() ActionEndTransactionRequest_EndTransaction { + if x != nil { + return x.Action + } + return ActionEndTransactionRequest_END_TRANSACTION_UNSPECIFIED +} + +// Request message for the "EndSavepoint" action. +// +// Release (RELEASE) the savepoint or rollback (ROLLBACK) to the +// savepoint. +// +// Releasing a savepoint invalidates that savepoint. Rolling back to +// a savepoint does not invalidate the savepoint, but invalidates all +// savepoints created after the current savepoint. +type ActionEndSavepointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque handle for the savepoint on the server. + SavepointId []byte `protobuf:"bytes,1,opt,name=savepoint_id,json=savepointId,proto3" json:"savepoint_id,omitempty"` + // Whether to rollback/release the given savepoint. + Action ActionEndSavepointRequest_EndSavepoint `protobuf:"varint,2,opt,name=action,proto3,enum=arrow.flight.protocol.sql.ActionEndSavepointRequest_EndSavepoint" json:"action,omitempty"` +} + +func (x *ActionEndSavepointRequest) Reset() { + *x = ActionEndSavepointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionEndSavepointRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionEndSavepointRequest) ProtoMessage() {} + +func (x *ActionEndSavepointRequest) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionEndSavepointRequest.ProtoReflect.Descriptor instead. +func (*ActionEndSavepointRequest) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{20} +} + +func (x *ActionEndSavepointRequest) GetSavepointId() []byte { + if x != nil { + return x.SavepointId + } + return nil +} + +func (x *ActionEndSavepointRequest) GetAction() ActionEndSavepointRequest_EndSavepoint { + if x != nil { + return x.Action + } + return ActionEndSavepointRequest_END_SAVEPOINT_UNSPECIFIED +} + +// Represents a SQL query. Used in the command member of FlightDescriptor +// for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// Fields on this schema may contain the following metadata: +// - ARROW:FLIGHT:SQL:CATALOG_NAME - Table's catalog name +// - ARROW:FLIGHT:SQL:DB_SCHEMA_NAME - Database schema name +// - ARROW:FLIGHT:SQL:TABLE_NAME - Table name +// - ARROW:FLIGHT:SQL:TYPE_NAME - The data source-specific name for the data type of the column. +// - ARROW:FLIGHT:SQL:PRECISION - Column precision/size +// - ARROW:FLIGHT:SQL:SCALE - Column scale/decimal digits if applicable +// - ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT - "1" indicates if the column is auto incremented, "0" otherwise. +// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case-sensitive, "0" otherwise. +// - ARROW:FLIGHT:SQL:IS_READ_ONLY - "1" indicates if the column is read only, "0" otherwise. +// - ARROW:FLIGHT:SQL:IS_SEARCHABLE - "1" indicates if the column is searchable via WHERE clause, "0" otherwise. +// - GetFlightInfo: execute the query. +type CommandStatementQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The SQL syntax. + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + // Include the query as part of this transaction (if unset, the query is auto-committed). + TransactionId []byte `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"` +} + +func (x *CommandStatementQuery) Reset() { + *x = CommandStatementQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandStatementQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandStatementQuery) ProtoMessage() {} + +func (x *CommandStatementQuery) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandStatementQuery.ProtoReflect.Descriptor instead. +func (*CommandStatementQuery) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{21} +} + +func (x *CommandStatementQuery) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *CommandStatementQuery) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +// Represents a Substrait plan. Used in the command member of FlightDescriptor +// for the following RPC calls: +// - GetSchema: return the Arrow schema of the query. +// Fields on this schema may contain the following metadata: +// - ARROW:FLIGHT:SQL:CATALOG_NAME - Table's catalog name +// - ARROW:FLIGHT:SQL:DB_SCHEMA_NAME - Database schema name +// - ARROW:FLIGHT:SQL:TABLE_NAME - Table name +// - ARROW:FLIGHT:SQL:TYPE_NAME - The data source-specific name for the data type of the column. +// - ARROW:FLIGHT:SQL:PRECISION - Column precision/size +// - ARROW:FLIGHT:SQL:SCALE - Column scale/decimal digits if applicable +// - ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT - "1" indicates if the column is auto incremented, "0" otherwise. +// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case-sensitive, "0" otherwise. +// - ARROW:FLIGHT:SQL:IS_READ_ONLY - "1" indicates if the column is read only, "0" otherwise. +// - ARROW:FLIGHT:SQL:IS_SEARCHABLE - "1" indicates if the column is searchable via WHERE clause, "0" otherwise. +// - GetFlightInfo: execute the query. +// - DoPut: execute the query. +type CommandStatementSubstraitPlan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A serialized substrait.Plan + Plan *SubstraitPlan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"` + // Include the query as part of this transaction (if unset, the query is auto-committed). + TransactionId []byte `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"` +} + +func (x *CommandStatementSubstraitPlan) Reset() { + *x = CommandStatementSubstraitPlan{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandStatementSubstraitPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandStatementSubstraitPlan) ProtoMessage() {} + +func (x *CommandStatementSubstraitPlan) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandStatementSubstraitPlan.ProtoReflect.Descriptor instead. +func (*CommandStatementSubstraitPlan) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{22} +} + +func (x *CommandStatementSubstraitPlan) GetPlan() *SubstraitPlan { + if x != nil { + return x.Plan + } + return nil +} + +func (x *CommandStatementSubstraitPlan) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +// * +// Represents a ticket resulting from GetFlightInfo with a CommandStatementQuery. +// This should be used only once and treated as an opaque value, that is, clients should not attempt to parse this. +type TicketStatementQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique identifier for the instance of the statement to execute. + StatementHandle []byte `protobuf:"bytes,1,opt,name=statement_handle,json=statementHandle,proto3" json:"statement_handle,omitempty"` +} + +func (x *TicketStatementQuery) Reset() { + *x = TicketStatementQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TicketStatementQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TicketStatementQuery) ProtoMessage() {} + +func (x *TicketStatementQuery) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TicketStatementQuery.ProtoReflect.Descriptor instead. +func (*TicketStatementQuery) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{23} +} + +func (x *TicketStatementQuery) GetStatementHandle() []byte { + if x != nil { + return x.StatementHandle + } + return nil +} + +// Represents an instance of executing a prepared statement. Used in the command member of FlightDescriptor for +// the following RPC calls: +// +// - GetSchema: return the Arrow schema of the query. +// Fields on this schema may contain the following metadata: +// +// - ARROW:FLIGHT:SQL:CATALOG_NAME - Table's catalog name +// +// - ARROW:FLIGHT:SQL:DB_SCHEMA_NAME - Database schema name +// +// - ARROW:FLIGHT:SQL:TABLE_NAME - Table name +// +// - ARROW:FLIGHT:SQL:TYPE_NAME - The data source-specific name for the data type of the column. +// +// - ARROW:FLIGHT:SQL:PRECISION - Column precision/size +// +// - ARROW:FLIGHT:SQL:SCALE - Column scale/decimal digits if applicable +// +// - ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT - "1" indicates if the column is auto incremented, "0" otherwise. +// +// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case-sensitive, "0" otherwise. +// +// - ARROW:FLIGHT:SQL:IS_READ_ONLY - "1" indicates if the column is read only, "0" otherwise. +// +// - ARROW:FLIGHT:SQL:IS_SEARCHABLE - "1" indicates if the column is searchable via WHERE clause, "0" otherwise. +// +// If the schema is retrieved after parameter values have been bound with DoPut, then the server should account +// for the parameters when determining the schema. +// +// - DoPut: bind parameter values. All of the bound parameter sets will be executed as a single atomic execution. +// +// - GetFlightInfo: execute the prepared statement instance. +type CommandPreparedStatementQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque handle for the prepared statement on the server. + PreparedStatementHandle []byte `protobuf:"bytes,1,opt,name=prepared_statement_handle,json=preparedStatementHandle,proto3" json:"prepared_statement_handle,omitempty"` +} + +func (x *CommandPreparedStatementQuery) Reset() { + *x = CommandPreparedStatementQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandPreparedStatementQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandPreparedStatementQuery) ProtoMessage() {} + +func (x *CommandPreparedStatementQuery) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandPreparedStatementQuery.ProtoReflect.Descriptor instead. +func (*CommandPreparedStatementQuery) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{24} +} + +func (x *CommandPreparedStatementQuery) GetPreparedStatementHandle() []byte { + if x != nil { + return x.PreparedStatementHandle + } + return nil +} + +// Represents a SQL update query. Used in the command member of FlightDescriptor +// for the RPC call DoPut to cause the server to execute the included SQL update. +type CommandStatementUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The SQL syntax. + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + // Include the query as part of this transaction (if unset, the query is auto-committed). + TransactionId []byte `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"` +} + +func (x *CommandStatementUpdate) Reset() { + *x = CommandStatementUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandStatementUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandStatementUpdate) ProtoMessage() {} + +func (x *CommandStatementUpdate) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandStatementUpdate.ProtoReflect.Descriptor instead. +func (*CommandStatementUpdate) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{25} +} + +func (x *CommandStatementUpdate) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *CommandStatementUpdate) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +// Represents a SQL update query. Used in the command member of FlightDescriptor +// for the RPC call DoPut to cause the server to execute the included +// prepared statement handle as an update. +type CommandPreparedStatementUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque handle for the prepared statement on the server. + PreparedStatementHandle []byte `protobuf:"bytes,1,opt,name=prepared_statement_handle,json=preparedStatementHandle,proto3" json:"prepared_statement_handle,omitempty"` +} + +func (x *CommandPreparedStatementUpdate) Reset() { + *x = CommandPreparedStatementUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandPreparedStatementUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandPreparedStatementUpdate) ProtoMessage() {} + +func (x *CommandPreparedStatementUpdate) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandPreparedStatementUpdate.ProtoReflect.Descriptor instead. +func (*CommandPreparedStatementUpdate) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{26} +} + +func (x *CommandPreparedStatementUpdate) GetPreparedStatementHandle() []byte { + if x != nil { + return x.PreparedStatementHandle + } + return nil +} + +// Represents a bulk ingestion request. Used in the command member of FlightDescriptor +// for the the RPC call DoPut to cause the server load the contents of the stream's +// FlightData into the target destination. +type CommandStatementIngest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The behavior for handling the table definition. + TableDefinitionOptions *CommandStatementIngest_TableDefinitionOptions `protobuf:"bytes,1,opt,name=table_definition_options,json=tableDefinitionOptions,proto3" json:"table_definition_options,omitempty"` + // The table to load data into. + Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` + // The db_schema of the destination table to load data into. If unset, a backend-specific default may be used. + Schema *string `protobuf:"bytes,3,opt,name=schema,proto3,oneof" json:"schema,omitempty"` + // The catalog of the destination table to load data into. If unset, a backend-specific default may be used. + Catalog *string `protobuf:"bytes,4,opt,name=catalog,proto3,oneof" json:"catalog,omitempty"` + // Store ingested data in a temporary table. + // The effect of setting temporary is to place the table in a backend-defined namespace, and to drop the table at the end of the session. + // The namespacing may make use of a backend-specific schema and/or catalog. + // The server should return an error if an explicit choice of schema or catalog is incompatible with the server's namespacing decision. + Temporary bool `protobuf:"varint,5,opt,name=temporary,proto3" json:"temporary,omitempty"` + // Perform the ingestion as part of this transaction. If specified, results should not be committed in the event of an error/cancellation. + TransactionId []byte `protobuf:"bytes,6,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"` + // Backend-specific options. + Options map[string]string `protobuf:"bytes,1000,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *CommandStatementIngest) Reset() { + *x = CommandStatementIngest{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandStatementIngest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandStatementIngest) ProtoMessage() {} + +func (x *CommandStatementIngest) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandStatementIngest.ProtoReflect.Descriptor instead. +func (*CommandStatementIngest) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{27} +} + +func (x *CommandStatementIngest) GetTableDefinitionOptions() *CommandStatementIngest_TableDefinitionOptions { + if x != nil { + return x.TableDefinitionOptions + } + return nil +} + +func (x *CommandStatementIngest) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +func (x *CommandStatementIngest) GetSchema() string { + if x != nil && x.Schema != nil { + return *x.Schema + } + return "" +} + +func (x *CommandStatementIngest) GetCatalog() string { + if x != nil && x.Catalog != nil { + return *x.Catalog + } + return "" +} + +func (x *CommandStatementIngest) GetTemporary() bool { + if x != nil { + return x.Temporary + } + return false +} + +func (x *CommandStatementIngest) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +func (x *CommandStatementIngest) GetOptions() map[string]string { + if x != nil { + return x.Options + } + return nil +} + +// Returned from the RPC call DoPut when a CommandStatementUpdate, +// CommandPreparedStatementUpdate, or CommandStatementIngest was +// in the request, containing results from the update. +type DoPutUpdateResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of records updated. A return value of -1 represents + // an unknown updated record count. + RecordCount int64 `protobuf:"varint,1,opt,name=record_count,json=recordCount,proto3" json:"record_count,omitempty"` +} + +func (x *DoPutUpdateResult) Reset() { + *x = DoPutUpdateResult{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoPutUpdateResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoPutUpdateResult) ProtoMessage() {} + +func (x *DoPutUpdateResult) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoPutUpdateResult.ProtoReflect.Descriptor instead. +func (*DoPutUpdateResult) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{28} +} + +func (x *DoPutUpdateResult) GetRecordCount() int64 { + if x != nil { + return x.RecordCount + } + return 0 +} + +// An *optional* response returned when `DoPut` is called with `CommandPreparedStatementQuery`. +// +// *Note on legacy behavior*: previous versions of the protocol did not return any result for +// this command, and that behavior should still be supported by clients. In that case, the client +// can continue as though the fields in this message were not provided or set to sensible default values. +type DoPutPreparedStatementResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents a (potentially updated) opaque handle for the prepared statement on the server. + // Because the handle could potentially be updated, any previous handles for this prepared + // statement should be considered invalid, and all subsequent requests for this prepared + // statement must use this new handle. + // The updated handle allows implementing query parameters with stateless services. + // + // When an updated handle is not provided by the server, clients should contiue + // using the previous handle provided by `ActionCreatePreparedStatementResonse`. + PreparedStatementHandle []byte `protobuf:"bytes,1,opt,name=prepared_statement_handle,json=preparedStatementHandle,proto3,oneof" json:"prepared_statement_handle,omitempty"` +} + +func (x *DoPutPreparedStatementResult) Reset() { + *x = DoPutPreparedStatementResult{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoPutPreparedStatementResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoPutPreparedStatementResult) ProtoMessage() {} + +func (x *DoPutPreparedStatementResult) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoPutPreparedStatementResult.ProtoReflect.Descriptor instead. +func (*DoPutPreparedStatementResult) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{29} +} + +func (x *DoPutPreparedStatementResult) GetPreparedStatementHandle() []byte { + if x != nil { + return x.PreparedStatementHandle + } + return nil +} + +// Request message for the "CancelQuery" action. +// +// Explicitly cancel a running query. +// +// This lets a single client explicitly cancel work, no matter how many clients +// are involved/whether the query is distributed or not, given server support. +// The transaction/statement is not rolled back; it is the application's job to +// commit or rollback as appropriate. This only indicates the client no longer +// wishes to read the remainder of the query results or continue submitting +// data. +// +// This command is idempotent. +// +// This command is deprecated since 13.0.0. Use the "CancelFlightInfo" +// action with DoAction instead. +// +// Deprecated: Marked as deprecated in FlightSql.proto. +type ActionCancelQueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The result of the GetFlightInfo RPC that initiated the query. + // XXX(ARROW-16902): this must be a serialized FlightInfo, but is + // rendered as bytes because Protobuf does not really support one + // DLL using Protobuf definitions from another DLL. + Info []byte `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (x *ActionCancelQueryRequest) Reset() { + *x = ActionCancelQueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionCancelQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionCancelQueryRequest) ProtoMessage() {} + +func (x *ActionCancelQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionCancelQueryRequest.ProtoReflect.Descriptor instead. +func (*ActionCancelQueryRequest) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{30} +} + +func (x *ActionCancelQueryRequest) GetInfo() []byte { + if x != nil { + return x.Info + } + return nil +} + +// The result of cancelling a query. +// +// The result should be wrapped in a google.protobuf.Any message. +// +// This command is deprecated since 13.0.0. Use the "CancelFlightInfo" +// action with DoAction instead. +// +// Deprecated: Marked as deprecated in FlightSql.proto. +type ActionCancelQueryResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result ActionCancelQueryResult_CancelResult `protobuf:"varint,1,opt,name=result,proto3,enum=arrow.flight.protocol.sql.ActionCancelQueryResult_CancelResult" json:"result,omitempty"` +} + +func (x *ActionCancelQueryResult) Reset() { + *x = ActionCancelQueryResult{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionCancelQueryResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionCancelQueryResult) ProtoMessage() {} + +func (x *ActionCancelQueryResult) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionCancelQueryResult.ProtoReflect.Descriptor instead. +func (*ActionCancelQueryResult) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{31} +} + +func (x *ActionCancelQueryResult) GetResult() ActionCancelQueryResult_CancelResult { + if x != nil { + return x.Result + } + return ActionCancelQueryResult_CANCEL_RESULT_UNSPECIFIED +} + +// Options for table definition behavior +type CommandStatementIngest_TableDefinitionOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IfNotExist CommandStatementIngest_TableDefinitionOptions_TableNotExistOption `protobuf:"varint,1,opt,name=if_not_exist,json=ifNotExist,proto3,enum=arrow.flight.protocol.sql.CommandStatementIngest_TableDefinitionOptions_TableNotExistOption" json:"if_not_exist,omitempty"` + IfExists CommandStatementIngest_TableDefinitionOptions_TableExistsOption `protobuf:"varint,2,opt,name=if_exists,json=ifExists,proto3,enum=arrow.flight.protocol.sql.CommandStatementIngest_TableDefinitionOptions_TableExistsOption" json:"if_exists,omitempty"` +} + +func (x *CommandStatementIngest_TableDefinitionOptions) Reset() { + *x = CommandStatementIngest_TableDefinitionOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_FlightSql_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandStatementIngest_TableDefinitionOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandStatementIngest_TableDefinitionOptions) ProtoMessage() {} + +func (x *CommandStatementIngest_TableDefinitionOptions) ProtoReflect() protoreflect.Message { + mi := &file_FlightSql_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandStatementIngest_TableDefinitionOptions.ProtoReflect.Descriptor instead. +func (*CommandStatementIngest_TableDefinitionOptions) Descriptor() ([]byte, []int) { + return file_FlightSql_proto_rawDescGZIP(), []int{27, 0} +} + +func (x *CommandStatementIngest_TableDefinitionOptions) GetIfNotExist() CommandStatementIngest_TableDefinitionOptions_TableNotExistOption { + if x != nil { + return x.IfNotExist + } + return CommandStatementIngest_TableDefinitionOptions_TABLE_NOT_EXIST_OPTION_UNSPECIFIED +} + +func (x *CommandStatementIngest_TableDefinitionOptions) GetIfExists() CommandStatementIngest_TableDefinitionOptions_TableExistsOption { + if x != nil { + return x.IfExists + } + return CommandStatementIngest_TableDefinitionOptions_TABLE_EXISTS_OPTION_UNSPECIFIED +} + +var file_FlightSql_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1000, + Name: "arrow.flight.protocol.sql.experimental", + Tag: "varint,1000,opt,name=experimental", + Filename: "FlightSql.proto", + }, +} + +// Extension fields to descriptorpb.MessageOptions. +var ( + // optional bool experimental = 1000; + E_Experimental = &file_FlightSql_proto_extTypes[0] +) + +var File_FlightSql_proto protoreflect.FileDescriptor + +var file_FlightSql_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x19, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x1a, 0x20, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, + 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x53, 0x71, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x48, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x47, 0x65, 0x74, 0x58, 0x64, 0x62, 0x63, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x20, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x14, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x44, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, + 0x1d, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x88, 0x01, 0x01, 0x12, 0x3c, + 0x0a, 0x18, 0x64, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x15, 0x64, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x64, 0x62, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0xbe, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x64, 0x62, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x15, 0x64, + 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x16, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x42, 0x1b, 0x0a, 0x19, 0x5f, + 0x64, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x42, 0x1c, 0x0a, 0x1a, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x70, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x88, + 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x64, 0x62, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x64, 0x62, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x64, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x64, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x64, 0x62, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x64, 0x62, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, + 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x88, 0x01, 0x01, 0x12, + 0x20, 0x0a, 0x09, 0x64, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x64, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x88, 0x01, + 0x01, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x64, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x22, 0xa6, 0x02, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x47, 0x65, 0x74, + 0x43, 0x72, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x22, + 0x0a, 0x0a, 0x70, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x70, 0x6b, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x88, + 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x70, 0x6b, 0x5f, 0x64, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x6b, 0x44, 0x62, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6b, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6b, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x66, 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x66, 0x6b, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x66, 0x6b, 0x5f, 0x64, + 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, + 0x52, 0x0a, 0x66, 0x6b, 0x44, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x08, 0x66, 0x6b, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x66, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, + 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x6b, + 0x5f, 0x64, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x66, + 0x6b, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x66, 0x6b, + 0x5f, 0x64, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x7b, 0x0a, 0x24, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, + 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x48, 0x00, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x73, 0x74, + 0x72, 0x61, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x01, 0x0a, 0x28, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x53, + 0x75, 0x62, 0x73, 0x74, 0x72, 0x61, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x74, 0x72, 0x61, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x70, 0x6c, 0x61, + 0x6e, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, + 0x0f, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x22, 0xb3, 0x01, 0x0a, 0x23, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x70, 0x72, 0x65, 0x70, + 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x17, 0x70, 0x72, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x29, 0x0a, 0x10, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x61, 0x0a, 0x23, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, + 0x19, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x17, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x1b, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x61, 0x76, 0x65, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x1c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x65, + 0x67, 0x69, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x1a, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x53, 0x61, 0x76, 0x65, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x61, 0x76, + 0x65, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0b, 0x73, 0x61, 0x76, 0x65, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x90, 0x02, 0x0a, + 0x1b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x5d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x6b, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, + 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, + 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x22, + 0xff, 0x01, 0x0a, 0x19, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x53, 0x61, 0x76, + 0x65, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x61, 0x76, 0x65, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x61, 0x76, 0x65, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x59, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x41, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x2e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x53, 0x61, 0x76, 0x65, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x53, 0x61, 0x76, 0x65, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x0c, 0x45, + 0x6e, 0x64, 0x53, 0x61, 0x76, 0x65, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x45, + 0x4e, 0x44, 0x5f, 0x53, 0x41, 0x56, 0x45, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x4e, + 0x44, 0x5f, 0x53, 0x41, 0x56, 0x45, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x4c, 0x45, + 0x41, 0x53, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x41, 0x56, + 0x45, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, + 0x02, 0x22, 0x6c, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, + 0x9c, 0x01, 0x0a, 0x1d, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x61, 0x69, 0x74, 0x50, 0x6c, 0x61, + 0x6e, 0x12, 0x3c, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x2e, 0x53, 0x75, 0x62, 0x73, + 0x74, 0x72, 0x61, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x12, + 0x2a, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x41, + 0x0a, 0x14, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x22, 0x5b, 0x0a, 0x1d, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x72, 0x65, 0x70, + 0x61, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x19, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x17, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x6d, + 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2a, + 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x5c, 0x0a, + 0x1e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x3a, 0x0a, 0x19, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x17, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xac, 0x08, 0x0a, 0x16, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x12, 0x82, 0x01, 0x0a, 0x18, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x61, 0x72, 0x72, 0x6f, + 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x16, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x88, 0x01, 0x01, 0x12, 0x1d, + 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x0e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0c, 0x48, 0x02, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x59, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0xe8, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x61, 0x72, 0x72, 0x6f, + 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x1a, 0xaf, 0x04, 0x0a, 0x16, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7e, 0x0a, + 0x0c, 0x69, 0x66, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x5c, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0a, 0x69, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x12, 0x77, 0x0a, + 0x09, 0x69, 0x66, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x5a, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x66, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x13, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, + 0x0a, 0x22, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x58, 0x49, 0x53, + 0x54, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, + 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x42, + 0x4c, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x5f, 0x4f, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x22, 0x97, 0x01, 0x0a, 0x11, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, + 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x45, + 0x58, 0x49, 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, + 0x4c, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x45, 0x58, 0x49, + 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x50, 0x45, 0x4e, + 0x44, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x45, 0x58, 0x49, + 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x41, + 0x43, 0x45, 0x10, 0x03, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x36, 0x0a, 0x11, 0x44, 0x6f, + 0x50, 0x75, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x7d, 0x0a, 0x1c, 0x44, 0x6f, 0x50, 0x75, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, + 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x3f, 0x0a, 0x19, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x17, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x1c, 0x0a, 0x1a, 0x5f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x22, 0x32, 0x0a, 0x18, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x6e, 0x66, + 0x6f, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x84, 0x02, 0x0a, 0x17, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x57, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3f, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x73, 0x71, 0x6c, 0x2e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x0c, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x43, + 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, + 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, + 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, 0x4e, 0x43, 0x45, + 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, + 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, + 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, + 0x4c, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x3a, 0x02, 0x18, 0x01, 0x2a, 0x92, 0x19, 0x0a, + 0x07, 0x53, 0x71, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x4c, 0x49, 0x47, + 0x48, 0x54, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x4e, 0x41, + 0x4d, 0x45, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x53, + 0x51, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, + 0x4e, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x53, 0x51, + 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x52, 0x4f, 0x57, 0x5f, 0x56, + 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x4c, 0x49, 0x47, + 0x48, 0x54, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x45, + 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x4c, 0x49, + 0x47, 0x48, 0x54, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x53, + 0x51, 0x4c, 0x10, 0x04, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x53, + 0x51, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x54, 0x52, + 0x41, 0x49, 0x54, 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, + 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x54, + 0x52, 0x41, 0x49, 0x54, 0x5f, 0x4d, 0x49, 0x4e, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, + 0x10, 0x06, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x53, 0x51, 0x4c, + 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x54, 0x52, 0x41, 0x49, + 0x54, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x12, + 0x21, 0x0a, 0x1d, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x45, + 0x52, 0x56, 0x45, 0x52, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x08, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x53, 0x51, 0x4c, + 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x09, + 0x12, 0x24, 0x0a, 0x20, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x53, + 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x4c, 0x4b, 0x5f, 0x49, 0x4e, 0x47, 0x45, 0x53, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x12, 0x33, 0x0a, 0x2f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, + 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x47, 0x45, + 0x53, 0x54, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, + 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x27, 0x0a, 0x23, 0x46, + 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, + 0x55, 0x54, 0x10, 0x64, 0x12, 0x29, 0x0a, 0x25, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x53, + 0x51, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x65, 0x12, + 0x14, 0x0a, 0x0f, 0x53, 0x51, 0x4c, 0x5f, 0x44, 0x44, 0x4c, 0x5f, 0x43, 0x41, 0x54, 0x41, 0x4c, + 0x4f, 0x47, 0x10, 0xf4, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x51, 0x4c, 0x5f, 0x44, 0x44, 0x4c, + 0x5f, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x10, 0xf5, 0x03, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x51, + 0x4c, 0x5f, 0x44, 0x44, 0x4c, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0xf6, 0x03, 0x12, 0x18, + 0x0a, 0x13, 0x53, 0x51, 0x4c, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, + 0x5f, 0x43, 0x41, 0x53, 0x45, 0x10, 0xf7, 0x03, 0x12, 0x1e, 0x0a, 0x19, 0x53, 0x51, 0x4c, 0x5f, + 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x5f, 0x51, 0x55, 0x4f, 0x54, 0x45, + 0x5f, 0x43, 0x48, 0x41, 0x52, 0x10, 0xf8, 0x03, 0x12, 0x1f, 0x0a, 0x1a, 0x53, 0x51, 0x4c, 0x5f, + 0x51, 0x55, 0x4f, 0x54, 0x45, 0x44, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, + 0x52, 0x5f, 0x43, 0x41, 0x53, 0x45, 0x10, 0xf9, 0x03, 0x12, 0x22, 0x0a, 0x1d, 0x53, 0x51, 0x4c, + 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x5f, 0x41, 0x52, 0x45, 0x5f, + 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0xfa, 0x03, 0x12, 0x16, 0x0a, + 0x11, 0x53, 0x51, 0x4c, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x49, + 0x4e, 0x47, 0x10, 0xfb, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x51, 0x4c, 0x5f, 0x4b, 0x45, 0x59, + 0x57, 0x4f, 0x52, 0x44, 0x53, 0x10, 0xfc, 0x03, 0x12, 0x1a, 0x0a, 0x15, 0x53, 0x51, 0x4c, 0x5f, + 0x4e, 0x55, 0x4d, 0x45, 0x52, 0x49, 0x43, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x53, 0x10, 0xfd, 0x03, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x54, 0x52, 0x49, + 0x4e, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0xfe, 0x03, 0x12, + 0x19, 0x0a, 0x14, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x46, 0x55, + 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0xff, 0x03, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x51, + 0x4c, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x80, 0x04, 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x51, 0x4c, 0x5f, 0x53, + 0x45, 0x41, 0x52, 0x43, 0x48, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x53, 0x43, + 0x41, 0x50, 0x45, 0x10, 0x81, 0x04, 0x12, 0x1e, 0x0a, 0x19, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, + 0x54, 0x52, 0x41, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, + 0x45, 0x52, 0x53, 0x10, 0x82, 0x04, 0x12, 0x21, 0x0a, 0x1c, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, + 0x50, 0x50, 0x4f, 0x52, 0x54, 0x53, 0x5f, 0x43, 0x4f, 0x4c, 0x55, 0x4d, 0x4e, 0x5f, 0x41, 0x4c, + 0x49, 0x41, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x83, 0x04, 0x12, 0x1f, 0x0a, 0x1a, 0x53, 0x51, 0x4c, + 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x55, 0x53, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, + 0x49, 0x53, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x84, 0x04, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x51, + 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, + 0x52, 0x54, 0x10, 0x85, 0x04, 0x12, 0x29, 0x0a, 0x24, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, + 0x50, 0x4f, 0x52, 0x54, 0x53, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x52, 0x52, + 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x86, 0x04, + 0x12, 0x33, 0x0a, 0x2e, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x53, + 0x5f, 0x44, 0x49, 0x46, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, + 0x5f, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x41, 0x4d, + 0x45, 0x53, 0x10, 0x87, 0x04, 0x12, 0x29, 0x0a, 0x24, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, + 0x50, 0x4f, 0x52, 0x54, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, + 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x10, 0x88, 0x04, + 0x12, 0x24, 0x0a, 0x1f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x53, + 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x55, 0x4e, 0x52, 0x45, 0x4c, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x89, 0x04, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, + 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x42, 0x59, + 0x10, 0x8a, 0x04, 0x12, 0x24, 0x0a, 0x1f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, + 0x52, 0x54, 0x53, 0x5f, 0x4c, 0x49, 0x4b, 0x45, 0x5f, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x5f, + 0x43, 0x4c, 0x41, 0x55, 0x53, 0x45, 0x10, 0x8b, 0x04, 0x12, 0x26, 0x0a, 0x21, 0x53, 0x51, 0x4c, + 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x53, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x4e, 0x55, + 0x4c, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x4c, 0x55, 0x4d, 0x4e, 0x53, 0x10, 0x8c, + 0x04, 0x12, 0x1a, 0x0a, 0x15, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, + 0x45, 0x44, 0x5f, 0x47, 0x52, 0x41, 0x4d, 0x4d, 0x41, 0x52, 0x10, 0x8d, 0x04, 0x12, 0x1f, 0x0a, + 0x1a, 0x53, 0x51, 0x4c, 0x5f, 0x41, 0x4e, 0x53, 0x49, 0x39, 0x32, 0x5f, 0x53, 0x55, 0x50, 0x50, + 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x8e, 0x04, 0x12, 0x30, + 0x0a, 0x2b, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x53, 0x5f, 0x49, + 0x4e, 0x54, 0x45, 0x47, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, 0x48, 0x41, 0x4e, 0x43, 0x45, + 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x41, 0x43, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x8f, 0x04, + 0x12, 0x22, 0x0a, 0x1d, 0x53, 0x51, 0x4c, 0x5f, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x4a, 0x4f, + 0x49, 0x4e, 0x53, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x4c, 0x45, 0x56, 0x45, + 0x4c, 0x10, 0x90, 0x04, 0x12, 0x14, 0x0a, 0x0f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x43, 0x48, 0x45, + 0x4d, 0x41, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x10, 0x91, 0x04, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x51, + 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x44, 0x55, 0x52, 0x45, 0x5f, 0x54, 0x45, 0x52, 0x4d, + 0x10, 0x92, 0x04, 0x12, 0x15, 0x0a, 0x10, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x41, 0x54, 0x41, 0x4c, + 0x4f, 0x47, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x10, 0x93, 0x04, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x51, + 0x4c, 0x5f, 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x41, 0x54, 0x5f, 0x53, 0x54, 0x41, + 0x52, 0x54, 0x10, 0x94, 0x04, 0x12, 0x22, 0x0a, 0x1d, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x43, 0x48, + 0x45, 0x4d, 0x41, 0x53, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x95, 0x04, 0x12, 0x23, 0x0a, 0x1e, 0x53, 0x51, 0x4c, + 0x5f, 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f, 0x47, 0x53, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, + 0x54, 0x45, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x96, 0x04, 0x12, 0x26, + 0x0a, 0x21, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, + 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x45, 0x44, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x41, + 0x4e, 0x44, 0x53, 0x10, 0x97, 0x04, 0x12, 0x24, 0x0a, 0x1f, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x45, + 0x4c, 0x45, 0x43, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, + 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x98, 0x04, 0x12, 0x24, 0x0a, 0x1f, + 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, + 0x44, 0x55, 0x52, 0x45, 0x53, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, + 0x99, 0x04, 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, + 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x51, 0x55, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x9a, + 0x04, 0x12, 0x28, 0x0a, 0x23, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x4c, 0x41, + 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x51, 0x55, 0x45, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x53, + 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x9b, 0x04, 0x12, 0x19, 0x0a, 0x14, 0x53, + 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x49, + 0x4f, 0x4e, 0x53, 0x10, 0x9c, 0x04, 0x12, 0x22, 0x0a, 0x1d, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, + 0x58, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, + 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0x9d, 0x04, 0x12, 0x20, 0x0a, 0x1b, 0x53, 0x51, + 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, + 0x41, 0x4c, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0x9e, 0x04, 0x12, 0x1f, 0x0a, 0x1a, + 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x4f, 0x4c, 0x55, 0x4d, 0x4e, 0x5f, 0x4e, + 0x41, 0x4d, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0x9f, 0x04, 0x12, 0x20, 0x0a, + 0x1b, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x4f, 0x4c, 0x55, 0x4d, 0x4e, 0x53, + 0x5f, 0x49, 0x4e, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x42, 0x59, 0x10, 0xa0, 0x04, 0x12, + 0x1d, 0x0a, 0x18, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x4f, 0x4c, 0x55, 0x4d, + 0x4e, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0xa1, 0x04, 0x12, 0x20, + 0x0a, 0x1b, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x4f, 0x4c, 0x55, 0x4d, 0x4e, + 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x10, 0xa2, 0x04, + 0x12, 0x1e, 0x0a, 0x19, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x4f, 0x4c, 0x55, + 0x4d, 0x4e, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x10, 0xa3, 0x04, + 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x4f, 0x4c, 0x55, + 0x4d, 0x4e, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0xa4, 0x04, 0x12, + 0x18, 0x0a, 0x13, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0xa5, 0x04, 0x12, 0x1f, 0x0a, 0x1a, 0x53, 0x51, 0x4c, + 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x52, 0x53, 0x4f, 0x52, 0x5f, 0x4e, 0x41, 0x4d, 0x45, + 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0xa6, 0x04, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x51, + 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x5f, 0x4c, 0x45, 0x4e, 0x47, + 0x54, 0x48, 0x10, 0xa7, 0x04, 0x12, 0x1e, 0x0a, 0x19, 0x53, 0x51, 0x4c, 0x5f, 0x44, 0x42, 0x5f, + 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, + 0x54, 0x48, 0x10, 0xa8, 0x04, 0x12, 0x22, 0x0a, 0x1d, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, + 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x44, 0x55, 0x52, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, + 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0xa9, 0x04, 0x12, 0x20, 0x0a, 0x1b, 0x53, 0x51, 0x4c, + 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x4e, 0x41, 0x4d, + 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0xaa, 0x04, 0x12, 0x15, 0x0a, 0x10, 0x53, + 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x4f, 0x57, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, + 0xab, 0x04, 0x12, 0x24, 0x0a, 0x1f, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x4f, + 0x57, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x53, 0x5f, + 0x42, 0x4c, 0x4f, 0x42, 0x53, 0x10, 0xac, 0x04, 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x51, 0x4c, 0x5f, + 0x4d, 0x41, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x45, + 0x4e, 0x47, 0x54, 0x48, 0x10, 0xad, 0x04, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x51, 0x4c, 0x5f, 0x4d, + 0x41, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x53, 0x10, 0xae, 0x04, + 0x12, 0x1e, 0x0a, 0x19, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x54, 0x41, 0x42, 0x4c, + 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0xaf, 0x04, + 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x54, 0x41, 0x42, 0x4c, + 0x45, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x10, 0xb0, 0x04, 0x12, + 0x1c, 0x0a, 0x17, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x4e, + 0x41, 0x4d, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0xb1, 0x04, 0x12, 0x26, 0x0a, + 0x21, 0x53, 0x51, 0x4c, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x53, 0x4f, 0x4c, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x10, 0xb2, 0x04, 0x12, 0x1f, 0x0a, 0x1a, 0x53, 0x51, 0x4c, 0x5f, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, + 0x54, 0x45, 0x44, 0x10, 0xb3, 0x04, 0x12, 0x30, 0x0a, 0x2b, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, + 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x49, 0x53, 0x4f, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, + 0x45, 0x56, 0x45, 0x4c, 0x53, 0x10, 0xb4, 0x04, 0x12, 0x32, 0x0a, 0x2d, 0x53, 0x51, 0x4c, 0x5f, + 0x44, 0x41, 0x54, 0x41, 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x43, 0x41, 0x55, 0x53, 0x45, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0xb5, 0x04, 0x12, 0x31, 0x0a, 0x2c, + 0x53, 0x51, 0x4c, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x44, 0x10, 0xb6, 0x04, 0x12, + 0x23, 0x0a, 0x1e, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, + 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x53, 0x10, 0xb7, 0x04, 0x12, 0x3b, 0x0a, 0x36, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, + 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, + 0x49, 0x45, 0x53, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, + 0x45, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0xb8, + 0x04, 0x12, 0x3c, 0x0a, 0x37, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, + 0x45, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x49, 0x45, 0x53, + 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x5f, + 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0xb9, 0x04, 0x12, + 0x40, 0x0a, 0x3b, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, + 0x5f, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x49, 0x45, 0x53, 0x5f, 0x46, + 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x53, 0x43, + 0x52, 0x4f, 0x4c, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, 0xba, + 0x04, 0x12, 0x42, 0x0a, 0x3d, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, + 0x45, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x49, 0x45, 0x53, + 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x5f, + 0x53, 0x43, 0x52, 0x4f, 0x4c, 0x4c, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49, + 0x56, 0x45, 0x10, 0xbb, 0x04, 0x12, 0x20, 0x0a, 0x1b, 0x53, 0x51, 0x4c, 0x5f, 0x42, 0x41, 0x54, + 0x43, 0x48, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x53, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, + 0x52, 0x54, 0x45, 0x44, 0x10, 0xbc, 0x04, 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x51, 0x4c, 0x5f, 0x53, + 0x41, 0x56, 0x45, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x53, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, + 0x54, 0x45, 0x44, 0x10, 0xbd, 0x04, 0x12, 0x23, 0x0a, 0x1e, 0x53, 0x51, 0x4c, 0x5f, 0x4e, 0x41, + 0x4d, 0x45, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x53, + 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0xbe, 0x04, 0x12, 0x1d, 0x0a, 0x18, 0x53, + 0x51, 0x4c, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x4f, 0x52, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, + 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x50, 0x59, 0x10, 0xbf, 0x04, 0x12, 0x35, 0x0a, 0x30, 0x53, 0x51, + 0x4c, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x44, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x53, 0x5f, 0x55, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x41, 0x4c, 0x4c, 0x5f, 0x53, 0x59, + 0x4e, 0x54, 0x41, 0x58, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0xc0, + 0x04, 0x2a, 0x91, 0x01, 0x0a, 0x17, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, + 0x1e, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, + 0x00, 0x12, 0x29, 0x0a, 0x25, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, + 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x23, + 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x54, 0x52, + 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x41, 0x56, 0x45, 0x50, 0x4f, + 0x49, 0x4e, 0x54, 0x10, 0x02, 0x2a, 0xb2, 0x01, 0x0a, 0x1b, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x41, 0x53, + 0x45, 0x5f, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x29, 0x0a, 0x25, 0x53, 0x51, 0x4c, 0x5f, 0x43, + 0x41, 0x53, 0x45, 0x5f, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, + 0x43, 0x41, 0x53, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, + 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x41, 0x53, 0x45, 0x5f, 0x53, + 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x50, 0x50, 0x45, 0x52, + 0x43, 0x41, 0x53, 0x45, 0x10, 0x02, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x41, + 0x53, 0x45, 0x5f, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x4c, + 0x4f, 0x57, 0x45, 0x52, 0x43, 0x41, 0x53, 0x45, 0x10, 0x03, 0x2a, 0x82, 0x01, 0x0a, 0x0f, 0x53, + 0x71, 0x6c, 0x4e, 0x75, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x19, + 0x0a, 0x15, 0x53, 0x51, 0x4c, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x53, 0x5f, 0x53, 0x4f, 0x52, 0x54, + 0x45, 0x44, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x51, 0x4c, + 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x53, 0x5f, 0x53, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x4c, 0x4f, + 0x57, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x51, 0x4c, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x53, + 0x5f, 0x53, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, + 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x51, 0x4c, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x53, 0x5f, + 0x53, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x54, 0x5f, 0x45, 0x4e, 0x44, 0x10, 0x03, 0x2a, + 0x5e, 0x0a, 0x13, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x53, 0x71, 0x6c, 0x47, + 0x72, 0x61, 0x6d, 0x6d, 0x61, 0x72, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x51, 0x4c, 0x5f, 0x4d, 0x49, + 0x4e, 0x49, 0x4d, 0x55, 0x4d, 0x5f, 0x47, 0x52, 0x41, 0x4d, 0x4d, 0x41, 0x52, 0x10, 0x00, 0x12, + 0x14, 0x0a, 0x10, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x52, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x4d, + 0x4d, 0x41, 0x52, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, 0x54, + 0x45, 0x4e, 0x44, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x41, 0x4d, 0x4d, 0x41, 0x52, 0x10, 0x02, 0x2a, + 0x68, 0x0a, 0x1e, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x73, 0x69, + 0x39, 0x32, 0x53, 0x71, 0x6c, 0x47, 0x72, 0x61, 0x6d, 0x6d, 0x61, 0x72, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x4e, 0x53, 0x49, 0x39, 0x32, 0x5f, 0x45, 0x4e, 0x54, 0x52, + 0x59, 0x5f, 0x53, 0x51, 0x4c, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x4e, 0x53, 0x49, 0x39, + 0x32, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x54, 0x45, 0x5f, 0x53, + 0x51, 0x4c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x4e, 0x53, 0x49, 0x39, 0x32, 0x5f, 0x46, + 0x55, 0x4c, 0x4c, 0x5f, 0x53, 0x51, 0x4c, 0x10, 0x02, 0x2a, 0x6d, 0x0a, 0x19, 0x53, 0x71, 0x6c, + 0x4f, 0x75, 0x74, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x51, 0x4c, 0x5f, 0x4a, 0x4f, + 0x49, 0x4e, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x51, 0x4c, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, + 0x5f, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x53, 0x10, 0x01, 0x12, 0x18, + 0x0a, 0x14, 0x53, 0x51, 0x4c, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x4f, 0x55, 0x54, 0x45, 0x52, + 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x53, 0x10, 0x02, 0x2a, 0x51, 0x0a, 0x13, 0x53, 0x71, 0x6c, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x12, + 0x1a, 0x0a, 0x16, 0x53, 0x51, 0x4c, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x42, 0x59, 0x5f, + 0x55, 0x4e, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x53, + 0x51, 0x4c, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x42, 0x59, 0x5f, 0x42, 0x45, 0x59, 0x4f, + 0x4e, 0x44, 0x5f, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x10, 0x01, 0x2a, 0x90, 0x01, 0x0a, 0x1a, + 0x53, 0x71, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x45, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x51, + 0x4c, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, + 0x43, 0x45, 0x44, 0x55, 0x52, 0x45, 0x5f, 0x43, 0x41, 0x4c, 0x4c, 0x53, 0x10, 0x00, 0x12, 0x24, + 0x0a, 0x20, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x4e, + 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x4f, + 0x4e, 0x53, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x4c, 0x45, 0x4d, + 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x49, 0x4c, 0x45, 0x47, 0x45, + 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x02, 0x2a, 0x56, + 0x0a, 0x1e, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x12, 0x19, 0x0a, 0x15, 0x53, 0x51, 0x4c, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x45, 0x44, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x53, + 0x51, 0x4c, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x45, 0x44, 0x5f, 0x55, 0x50, + 0x44, 0x41, 0x54, 0x45, 0x10, 0x01, 0x2a, 0x97, 0x01, 0x0a, 0x16, 0x53, 0x71, 0x6c, 0x53, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x42, 0x51, 0x55, 0x45, 0x52, + 0x49, 0x45, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x52, 0x49, 0x53, 0x4f, + 0x4e, 0x53, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x42, 0x51, + 0x55, 0x45, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, + 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x42, 0x51, 0x55, 0x45, + 0x52, 0x49, 0x45, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x10, 0x02, 0x12, 0x21, 0x0a, + 0x1d, 0x53, 0x51, 0x4c, 0x5f, 0x53, 0x55, 0x42, 0x51, 0x55, 0x45, 0x52, 0x49, 0x45, 0x53, 0x5f, + 0x49, 0x4e, 0x5f, 0x51, 0x55, 0x41, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, 0x44, 0x53, 0x10, 0x03, + 0x2a, 0x36, 0x0a, 0x12, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x51, 0x4c, 0x5f, 0x55, 0x4e, + 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x51, 0x4c, 0x5f, 0x55, 0x4e, 0x49, + 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x2a, 0xc9, 0x01, 0x0a, 0x1c, 0x53, 0x71, 0x6c, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x73, 0x6f, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x51, 0x4c, + 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, + 0x45, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x51, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, + 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x55, 0x4e, 0x43, 0x4f, + 0x4d, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x51, 0x4c, + 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, + 0x44, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x23, 0x0a, + 0x1f, 0x53, 0x51, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, + 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x51, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x45, 0x52, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x42, + 0x4c, 0x45, 0x10, 0x04, 0x2a, 0x89, 0x01, 0x0a, 0x18, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x51, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x51, 0x4c, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x44, + 0x45, 0x46, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x01, 0x12, 0x26, 0x0a, 0x22, 0x53, 0x51, 0x4c, 0x5f, + 0x44, 0x41, 0x54, 0x41, 0x5f, 0x4d, 0x41, 0x4e, 0x49, 0x50, 0x55, 0x4c, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x02, + 0x2a, 0xbc, 0x01, 0x0a, 0x19, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, + 0x0a, 0x1f, 0x53, 0x51, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x45, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x51, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, + 0x54, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, + 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x2a, 0x0a, 0x26, 0x53, 0x51, 0x4c, + 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x53, 0x43, 0x52, 0x4f, 0x4c, 0x4c, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x53, 0x51, 0x4c, 0x5f, 0x52, 0x45, 0x53, + 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 0x52, + 0x4f, 0x4c, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, 0x03, 0x2a, + 0xa2, 0x01, 0x0a, 0x20, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2a, 0x0a, 0x26, 0x53, 0x51, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, + 0x4c, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x28, 0x0a, 0x24, 0x53, 0x51, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, + 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x52, + 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, 0x53, 0x51, + 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, + 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x41, 0x42, + 0x4c, 0x45, 0x10, 0x02, 0x2a, 0x99, 0x04, 0x0a, 0x12, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x53, + 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x42, 0x49, 0x47, 0x49, 0x4e, + 0x54, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, + 0x52, 0x54, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, + 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x42, 0x49, 0x54, 0x10, 0x02, + 0x12, 0x14, 0x0a, 0x10, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, + 0x43, 0x48, 0x41, 0x52, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, + 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, + 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x44, 0x45, 0x43, 0x49, + 0x4d, 0x41, 0x4c, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, + 0x56, 0x45, 0x52, 0x54, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, + 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x47, 0x45, 0x52, 0x10, 0x07, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, + 0x56, 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x44, 0x41, + 0x59, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x08, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x51, 0x4c, 0x5f, + 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, + 0x5f, 0x59, 0x45, 0x41, 0x52, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x09, 0x12, 0x1d, 0x0a, + 0x19, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x4c, 0x4f, 0x4e, + 0x47, 0x56, 0x41, 0x52, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, + 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, + 0x56, 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0x0b, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x51, 0x4c, + 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x4e, 0x55, 0x4d, 0x45, 0x52, 0x49, 0x43, + 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, + 0x54, 0x5f, 0x52, 0x45, 0x41, 0x4c, 0x10, 0x0d, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x51, 0x4c, 0x5f, + 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x49, 0x4e, 0x54, + 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, + 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x0f, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x51, 0x4c, 0x5f, + 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, + 0x50, 0x10, 0x10, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, + 0x52, 0x54, 0x5f, 0x54, 0x49, 0x4e, 0x59, 0x49, 0x4e, 0x54, 0x10, 0x11, 0x12, 0x19, 0x0a, 0x15, + 0x53, 0x51, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x56, 0x41, 0x52, 0x42, + 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x51, 0x4c, 0x5f, 0x43, + 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x56, 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0x13, + 0x2a, 0x8f, 0x04, 0x0a, 0x0c, 0x58, 0x64, 0x62, 0x63, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x15, 0x0a, 0x11, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x58, 0x44, 0x42, 0x43, + 0x5f, 0x43, 0x48, 0x41, 0x52, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x58, 0x44, 0x42, 0x43, 0x5f, + 0x4e, 0x55, 0x4d, 0x45, 0x52, 0x49, 0x43, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x58, 0x44, 0x42, + 0x43, 0x5f, 0x44, 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x58, + 0x44, 0x42, 0x43, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x04, 0x12, 0x11, 0x0a, + 0x0d, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x49, 0x4e, 0x54, 0x10, 0x05, + 0x12, 0x0e, 0x0a, 0x0a, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x06, + 0x12, 0x0d, 0x0a, 0x09, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x52, 0x45, 0x41, 0x4c, 0x10, 0x07, 0x12, + 0x0f, 0x0a, 0x0b, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x08, + 0x12, 0x11, 0x0a, 0x0d, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, + 0x45, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x56, 0x41, 0x4c, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x56, + 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0x0c, 0x12, 0x0d, 0x0a, 0x09, 0x58, 0x44, 0x42, 0x43, + 0x5f, 0x44, 0x41, 0x54, 0x45, 0x10, 0x5b, 0x12, 0x0d, 0x0a, 0x09, 0x58, 0x44, 0x42, 0x43, 0x5f, + 0x54, 0x49, 0x4d, 0x45, 0x10, 0x5c, 0x12, 0x12, 0x0a, 0x0e, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x5d, 0x12, 0x1d, 0x0a, 0x10, 0x58, 0x44, + 0x42, 0x43, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x56, 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x12, 0x18, 0x0a, 0x0b, 0x58, 0x44, 0x42, + 0x43, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x12, 0x1b, 0x0a, 0x0e, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x56, 0x41, 0x52, 0x42, + 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, + 0x12, 0x1f, 0x0a, 0x12, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x56, 0x41, 0x52, + 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x01, 0x12, 0x18, 0x0a, 0x0b, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x42, 0x49, 0x47, 0x49, 0x4e, 0x54, + 0x10, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x12, 0x19, 0x0a, 0x0c, 0x58, + 0x44, 0x42, 0x43, 0x5f, 0x54, 0x49, 0x4e, 0x59, 0x49, 0x4e, 0x54, 0x10, 0xfa, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x12, 0x15, 0x0a, 0x08, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x42, + 0x49, 0x54, 0x10, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x12, 0x17, 0x0a, + 0x0a, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x57, 0x43, 0x48, 0x41, 0x52, 0x10, 0xf8, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x12, 0x1a, 0x0a, 0x0d, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x57, + 0x56, 0x41, 0x52, 0x43, 0x48, 0x41, 0x52, 0x10, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x01, 0x2a, 0xa3, 0x08, 0x0a, 0x13, 0x58, 0x64, 0x62, 0x63, 0x44, 0x61, 0x74, 0x65, 0x74, + 0x69, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x58, 0x44, + 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, + 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x59, 0x45, 0x41, 0x52, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x58, + 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x45, + 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x58, 0x44, 0x42, + 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, + 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, + 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x03, 0x12, 0x14, 0x0a, + 0x10, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, + 0x59, 0x10, 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, + 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x54, 0x49, + 0x4d, 0x45, 0x5a, 0x4f, 0x4e, 0x45, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x58, 0x44, 0x42, 0x43, + 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x04, 0x12, + 0x28, 0x0a, 0x24, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, + 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x5a, 0x4f, 0x4e, 0x45, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x58, 0x44, 0x42, + 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, + 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x58, + 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x59, 0x45, 0x41, 0x52, + 0x5f, 0x54, 0x4f, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x07, 0x12, 0x1c, 0x0a, 0x18, 0x58, + 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x59, 0x5f, + 0x54, 0x4f, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x08, 0x12, 0x1e, 0x0a, 0x1a, 0x58, 0x44, 0x42, + 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x59, 0x5f, 0x54, 0x4f, + 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x09, 0x12, 0x1e, 0x0a, 0x1a, 0x58, 0x44, 0x42, + 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x59, 0x5f, 0x54, 0x4f, + 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x0a, 0x12, 0x1f, 0x0a, 0x1b, 0x58, 0x44, 0x42, + 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x5f, 0x54, + 0x4f, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x0b, 0x12, 0x1f, 0x0a, 0x1b, 0x58, 0x44, + 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x5f, + 0x54, 0x4f, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x0c, 0x12, 0x21, 0x0a, 0x1d, 0x58, + 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x49, 0x4e, 0x55, + 0x54, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x0d, 0x12, 0x1e, + 0x0a, 0x1a, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, + 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x59, 0x45, 0x41, 0x52, 0x10, 0x65, 0x12, 0x1f, + 0x0a, 0x1b, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, + 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x66, 0x12, + 0x1d, 0x0a, 0x19, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, + 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x44, 0x41, 0x59, 0x10, 0x67, 0x12, 0x1e, + 0x0a, 0x1a, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, + 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x68, 0x12, 0x20, + 0x0a, 0x1c, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, + 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x69, + 0x12, 0x20, 0x0a, 0x1c, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, + 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, + 0x10, 0x6a, 0x12, 0x27, 0x0a, 0x23, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x59, 0x45, 0x41, 0x52, + 0x5f, 0x54, 0x4f, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x6b, 0x12, 0x25, 0x0a, 0x21, 0x58, + 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x44, 0x41, 0x59, 0x5f, 0x54, 0x4f, 0x5f, 0x48, 0x4f, 0x55, 0x52, + 0x10, 0x6c, 0x12, 0x27, 0x0a, 0x23, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x44, 0x41, 0x59, 0x5f, + 0x54, 0x4f, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x6d, 0x12, 0x27, 0x0a, 0x23, 0x58, + 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x44, 0x41, 0x59, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x45, 0x43, 0x4f, + 0x4e, 0x44, 0x10, 0x6e, 0x12, 0x28, 0x0a, 0x24, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, + 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x48, 0x4f, + 0x55, 0x52, 0x5f, 0x54, 0x4f, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x6f, 0x12, 0x28, + 0x0a, 0x24, 0x58, 0x44, 0x42, 0x43, 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, + 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x48, 0x4f, 0x55, 0x52, 0x5f, 0x54, 0x4f, 0x5f, + 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x70, 0x12, 0x2a, 0x0a, 0x26, 0x58, 0x44, 0x42, 0x43, + 0x5f, 0x53, 0x55, 0x42, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, + 0x4c, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x45, 0x43, 0x4f, + 0x4e, 0x44, 0x10, 0x71, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0x57, 0x0a, 0x08, 0x4e, 0x75, 0x6c, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4e, 0x55, 0x4c, 0x4c, 0x41, 0x42, 0x49, 0x4c, + 0x49, 0x54, 0x59, 0x5f, 0x4e, 0x4f, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x53, 0x10, 0x00, 0x12, 0x18, + 0x0a, 0x14, 0x4e, 0x55, 0x4c, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4e, 0x55, + 0x4c, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x55, 0x4c, 0x4c, + 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x02, 0x2a, 0x61, 0x0a, 0x0a, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4e, 0x4f, + 0x4e, 0x45, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x41, 0x42, + 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x41, + 0x52, 0x43, 0x48, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x02, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x46, 0x55, + 0x4c, 0x4c, 0x10, 0x03, 0x2a, 0x5c, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x41, 0x53, + 0x43, 0x41, 0x44, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x53, 0x54, 0x52, 0x49, + 0x43, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x45, 0x54, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, + 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, + 0x10, 0x04, 0x3a, 0x44, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x42, 0x56, 0x0a, 0x20, 0x6f, 0x72, 0x67, 0x2e, + 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x66, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x2e, 0x73, 0x71, 0x6c, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x5a, 0x32, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, + 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x2f, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_FlightSql_proto_rawDescOnce sync.Once + file_FlightSql_proto_rawDescData = file_FlightSql_proto_rawDesc +) + +func file_FlightSql_proto_rawDescGZIP() []byte { + file_FlightSql_proto_rawDescOnce.Do(func() { + file_FlightSql_proto_rawDescData = protoimpl.X.CompressGZIP(file_FlightSql_proto_rawDescData) + }) + return file_FlightSql_proto_rawDescData +} + +var file_FlightSql_proto_enumTypes = make([]protoimpl.EnumInfo, 27) +var file_FlightSql_proto_msgTypes = make([]protoimpl.MessageInfo, 34) +var file_FlightSql_proto_goTypes = []interface{}{ + (SqlInfo)(0), // 0: arrow.flight.protocol.sql.SqlInfo + (SqlSupportedTransaction)(0), // 1: arrow.flight.protocol.sql.SqlSupportedTransaction + (SqlSupportedCaseSensitivity)(0), // 2: arrow.flight.protocol.sql.SqlSupportedCaseSensitivity + (SqlNullOrdering)(0), // 3: arrow.flight.protocol.sql.SqlNullOrdering + (SupportedSqlGrammar)(0), // 4: arrow.flight.protocol.sql.SupportedSqlGrammar + (SupportedAnsi92SqlGrammarLevel)(0), // 5: arrow.flight.protocol.sql.SupportedAnsi92SqlGrammarLevel + (SqlOuterJoinsSupportLevel)(0), // 6: arrow.flight.protocol.sql.SqlOuterJoinsSupportLevel + (SqlSupportedGroupBy)(0), // 7: arrow.flight.protocol.sql.SqlSupportedGroupBy + (SqlSupportedElementActions)(0), // 8: arrow.flight.protocol.sql.SqlSupportedElementActions + (SqlSupportedPositionedCommands)(0), // 9: arrow.flight.protocol.sql.SqlSupportedPositionedCommands + (SqlSupportedSubqueries)(0), // 10: arrow.flight.protocol.sql.SqlSupportedSubqueries + (SqlSupportedUnions)(0), // 11: arrow.flight.protocol.sql.SqlSupportedUnions + (SqlTransactionIsolationLevel)(0), // 12: arrow.flight.protocol.sql.SqlTransactionIsolationLevel + (SqlSupportedTransactions)(0), // 13: arrow.flight.protocol.sql.SqlSupportedTransactions + (SqlSupportedResultSetType)(0), // 14: arrow.flight.protocol.sql.SqlSupportedResultSetType + (SqlSupportedResultSetConcurrency)(0), // 15: arrow.flight.protocol.sql.SqlSupportedResultSetConcurrency + (SqlSupportsConvert)(0), // 16: arrow.flight.protocol.sql.SqlSupportsConvert + (XdbcDataType)(0), // 17: arrow.flight.protocol.sql.XdbcDataType + (XdbcDatetimeSubcode)(0), // 18: arrow.flight.protocol.sql.XdbcDatetimeSubcode + (Nullable)(0), // 19: arrow.flight.protocol.sql.Nullable + (Searchable)(0), // 20: arrow.flight.protocol.sql.Searchable + (UpdateDeleteRules)(0), // 21: arrow.flight.protocol.sql.UpdateDeleteRules + (ActionEndTransactionRequest_EndTransaction)(0), // 22: arrow.flight.protocol.sql.ActionEndTransactionRequest.EndTransaction + (ActionEndSavepointRequest_EndSavepoint)(0), // 23: arrow.flight.protocol.sql.ActionEndSavepointRequest.EndSavepoint + (CommandStatementIngest_TableDefinitionOptions_TableNotExistOption)(0), // 24: arrow.flight.protocol.sql.CommandStatementIngest.TableDefinitionOptions.TableNotExistOption + (CommandStatementIngest_TableDefinitionOptions_TableExistsOption)(0), // 25: arrow.flight.protocol.sql.CommandStatementIngest.TableDefinitionOptions.TableExistsOption + (ActionCancelQueryResult_CancelResult)(0), // 26: arrow.flight.protocol.sql.ActionCancelQueryResult.CancelResult + (*CommandGetSqlInfo)(nil), // 27: arrow.flight.protocol.sql.CommandGetSqlInfo + (*CommandGetXdbcTypeInfo)(nil), // 28: arrow.flight.protocol.sql.CommandGetXdbcTypeInfo + (*CommandGetCatalogs)(nil), // 29: arrow.flight.protocol.sql.CommandGetCatalogs + (*CommandGetDbSchemas)(nil), // 30: arrow.flight.protocol.sql.CommandGetDbSchemas + (*CommandGetTables)(nil), // 31: arrow.flight.protocol.sql.CommandGetTables + (*CommandGetTableTypes)(nil), // 32: arrow.flight.protocol.sql.CommandGetTableTypes + (*CommandGetPrimaryKeys)(nil), // 33: arrow.flight.protocol.sql.CommandGetPrimaryKeys + (*CommandGetExportedKeys)(nil), // 34: arrow.flight.protocol.sql.CommandGetExportedKeys + (*CommandGetImportedKeys)(nil), // 35: arrow.flight.protocol.sql.CommandGetImportedKeys + (*CommandGetCrossReference)(nil), // 36: arrow.flight.protocol.sql.CommandGetCrossReference + (*ActionCreatePreparedStatementRequest)(nil), // 37: arrow.flight.protocol.sql.ActionCreatePreparedStatementRequest + (*SubstraitPlan)(nil), // 38: arrow.flight.protocol.sql.SubstraitPlan + (*ActionCreatePreparedSubstraitPlanRequest)(nil), // 39: arrow.flight.protocol.sql.ActionCreatePreparedSubstraitPlanRequest + (*ActionCreatePreparedStatementResult)(nil), // 40: arrow.flight.protocol.sql.ActionCreatePreparedStatementResult + (*ActionClosePreparedStatementRequest)(nil), // 41: arrow.flight.protocol.sql.ActionClosePreparedStatementRequest + (*ActionBeginTransactionRequest)(nil), // 42: arrow.flight.protocol.sql.ActionBeginTransactionRequest + (*ActionBeginSavepointRequest)(nil), // 43: arrow.flight.protocol.sql.ActionBeginSavepointRequest + (*ActionBeginTransactionResult)(nil), // 44: arrow.flight.protocol.sql.ActionBeginTransactionResult + (*ActionBeginSavepointResult)(nil), // 45: arrow.flight.protocol.sql.ActionBeginSavepointResult + (*ActionEndTransactionRequest)(nil), // 46: arrow.flight.protocol.sql.ActionEndTransactionRequest + (*ActionEndSavepointRequest)(nil), // 47: arrow.flight.protocol.sql.ActionEndSavepointRequest + (*CommandStatementQuery)(nil), // 48: arrow.flight.protocol.sql.CommandStatementQuery + (*CommandStatementSubstraitPlan)(nil), // 49: arrow.flight.protocol.sql.CommandStatementSubstraitPlan + (*TicketStatementQuery)(nil), // 50: arrow.flight.protocol.sql.TicketStatementQuery + (*CommandPreparedStatementQuery)(nil), // 51: arrow.flight.protocol.sql.CommandPreparedStatementQuery + (*CommandStatementUpdate)(nil), // 52: arrow.flight.protocol.sql.CommandStatementUpdate + (*CommandPreparedStatementUpdate)(nil), // 53: arrow.flight.protocol.sql.CommandPreparedStatementUpdate + (*CommandStatementIngest)(nil), // 54: arrow.flight.protocol.sql.CommandStatementIngest + (*DoPutUpdateResult)(nil), // 55: arrow.flight.protocol.sql.DoPutUpdateResult + (*DoPutPreparedStatementResult)(nil), // 56: arrow.flight.protocol.sql.DoPutPreparedStatementResult + (*ActionCancelQueryRequest)(nil), // 57: arrow.flight.protocol.sql.ActionCancelQueryRequest + (*ActionCancelQueryResult)(nil), // 58: arrow.flight.protocol.sql.ActionCancelQueryResult + (*CommandStatementIngest_TableDefinitionOptions)(nil), // 59: arrow.flight.protocol.sql.CommandStatementIngest.TableDefinitionOptions + nil, // 60: arrow.flight.protocol.sql.CommandStatementIngest.OptionsEntry + (*descriptorpb.MessageOptions)(nil), // 61: google.protobuf.MessageOptions +} +var file_FlightSql_proto_depIdxs = []int32{ + 38, // 0: arrow.flight.protocol.sql.ActionCreatePreparedSubstraitPlanRequest.plan:type_name -> arrow.flight.protocol.sql.SubstraitPlan + 22, // 1: arrow.flight.protocol.sql.ActionEndTransactionRequest.action:type_name -> arrow.flight.protocol.sql.ActionEndTransactionRequest.EndTransaction + 23, // 2: arrow.flight.protocol.sql.ActionEndSavepointRequest.action:type_name -> arrow.flight.protocol.sql.ActionEndSavepointRequest.EndSavepoint + 38, // 3: arrow.flight.protocol.sql.CommandStatementSubstraitPlan.plan:type_name -> arrow.flight.protocol.sql.SubstraitPlan + 59, // 4: arrow.flight.protocol.sql.CommandStatementIngest.table_definition_options:type_name -> arrow.flight.protocol.sql.CommandStatementIngest.TableDefinitionOptions + 60, // 5: arrow.flight.protocol.sql.CommandStatementIngest.options:type_name -> arrow.flight.protocol.sql.CommandStatementIngest.OptionsEntry + 26, // 6: arrow.flight.protocol.sql.ActionCancelQueryResult.result:type_name -> arrow.flight.protocol.sql.ActionCancelQueryResult.CancelResult + 24, // 7: arrow.flight.protocol.sql.CommandStatementIngest.TableDefinitionOptions.if_not_exist:type_name -> arrow.flight.protocol.sql.CommandStatementIngest.TableDefinitionOptions.TableNotExistOption + 25, // 8: arrow.flight.protocol.sql.CommandStatementIngest.TableDefinitionOptions.if_exists:type_name -> arrow.flight.protocol.sql.CommandStatementIngest.TableDefinitionOptions.TableExistsOption + 61, // 9: arrow.flight.protocol.sql.experimental:extendee -> google.protobuf.MessageOptions + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 9, // [9:10] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_FlightSql_proto_init() } +func file_FlightSql_proto_init() { + if File_FlightSql_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_FlightSql_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetSqlInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetXdbcTypeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetCatalogs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetDbSchemas); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetTables); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetTableTypes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetPrimaryKeys); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetExportedKeys); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetImportedKeys); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandGetCrossReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionCreatePreparedStatementRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubstraitPlan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionCreatePreparedSubstraitPlanRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionCreatePreparedStatementResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionClosePreparedStatementRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionBeginTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionBeginSavepointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionBeginTransactionResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionBeginSavepointResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionEndTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionEndSavepointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandStatementQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandStatementSubstraitPlan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TicketStatementQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandPreparedStatementQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandStatementUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandPreparedStatementUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandStatementIngest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoPutUpdateResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoPutPreparedStatementResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionCancelQueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionCancelQueryResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_FlightSql_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandStatementIngest_TableDefinitionOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_FlightSql_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[7].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[9].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[10].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[12].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[21].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[22].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[25].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[27].OneofWrappers = []interface{}{} + file_FlightSql_proto_msgTypes[29].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_FlightSql_proto_rawDesc, + NumEnums: 27, + NumMessages: 34, + NumExtensions: 1, + NumServices: 0, + }, + GoTypes: file_FlightSql_proto_goTypes, + DependencyIndexes: file_FlightSql_proto_depIdxs, + EnumInfos: file_FlightSql_proto_enumTypes, + MessageInfos: file_FlightSql_proto_msgTypes, + ExtensionInfos: file_FlightSql_proto_extTypes, + }.Build() + File_FlightSql_proto = out.File + file_FlightSql_proto_rawDesc = nil + file_FlightSql_proto_goTypes = nil + file_FlightSql_proto_depIdxs = nil +} diff --git a/dev/flight-integration/flight/Flight_grpc.pb.go b/dev/flight-integration/flight/Flight_grpc.pb.go new file mode 100644 index 0000000000000..918ba6cedd6ba --- /dev/null +++ b/dev/flight-integration/flight/Flight_grpc.pb.go @@ -0,0 +1,804 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +//

+// http://www.apache.org/licenses/LICENSE-2.0 +//

+// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.3 +// source: Flight.proto + +package flight + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + FlightService_Handshake_FullMethodName = "/arrow.flight.protocol.FlightService/Handshake" + FlightService_ListFlights_FullMethodName = "/arrow.flight.protocol.FlightService/ListFlights" + FlightService_GetFlightInfo_FullMethodName = "/arrow.flight.protocol.FlightService/GetFlightInfo" + FlightService_PollFlightInfo_FullMethodName = "/arrow.flight.protocol.FlightService/PollFlightInfo" + FlightService_GetSchema_FullMethodName = "/arrow.flight.protocol.FlightService/GetSchema" + FlightService_DoGet_FullMethodName = "/arrow.flight.protocol.FlightService/DoGet" + FlightService_DoPut_FullMethodName = "/arrow.flight.protocol.FlightService/DoPut" + FlightService_DoExchange_FullMethodName = "/arrow.flight.protocol.FlightService/DoExchange" + FlightService_DoAction_FullMethodName = "/arrow.flight.protocol.FlightService/DoAction" + FlightService_ListActions_FullMethodName = "/arrow.flight.protocol.FlightService/ListActions" +) + +// FlightServiceClient is the client API for FlightService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type FlightServiceClient interface { + // Handshake between client and server. Depending on the server, the + // handshake may be required to determine the token that should be used for + // future operations. Both request and response are streams to allow multiple + // round-trips depending on auth mechanism. + Handshake(ctx context.Context, opts ...grpc.CallOption) (FlightService_HandshakeClient, error) + // Get a list of available streams given a particular criteria. Most flight + // services will expose one or more streams that are readily available for + // retrieval. This api allows listing the streams available for + // consumption. A user can also provide a criteria. The criteria can limit + // the subset of streams that can be listed via this interface. Each flight + // service allows its own definition of how to consume criteria. + ListFlights(ctx context.Context, in *Criteria, opts ...grpc.CallOption) (FlightService_ListFlightsClient, error) + // For a given FlightDescriptor, get information about how the flight can be + // consumed. This is a useful interface if the consumer of the interface + // already can identify the specific flight to consume. This interface can + // also allow a consumer to generate a flight stream through a specified + // descriptor. For example, a flight descriptor might be something that + // includes a SQL statement or a Pickled Python operation that will be + // executed. In those cases, the descriptor will not be previously available + // within the list of available streams provided by ListFlights but will be + // available for consumption for the duration defined by the specific flight + // service. + GetFlightInfo(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*FlightInfo, error) + // For a given FlightDescriptor, start a query and get information + // to poll its execution status. This is a useful interface if the + // query may be a long-running query. The first PollFlightInfo call + // should return as quickly as possible. (GetFlightInfo doesn't + // return until the query is complete.) + // + // A client can consume any available results before + // the query is completed. See PollInfo.info for details. + // + // A client can poll the updated query status by calling + // PollFlightInfo() with PollInfo.flight_descriptor. A server + // should not respond until the result would be different from last + // time. That way, the client can "long poll" for updates + // without constantly making requests. Clients can set a short timeout + // to avoid blocking calls if desired. + // + // A client can't use PollInfo.flight_descriptor after + // PollInfo.expiration_time passes. A server might not accept the + // retry descriptor anymore and the query may be cancelled. + // + // A client may use the CancelFlightInfo action with + // PollInfo.info to cancel the running query. + PollFlightInfo(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*PollInfo, error) + // For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema + // This is used when a consumer needs the Schema of flight stream. Similar to + // GetFlightInfo this interface may generate a new flight that was not previously + // available in ListFlights. + GetSchema(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*SchemaResult, error) + // Retrieve a single stream associated with a particular descriptor + // associated with the referenced ticket. A Flight can be composed of one or + // more streams where each stream can be retrieved using a separate opaque + // ticket that the flight service uses for managing a collection of streams. + DoGet(ctx context.Context, in *Ticket, opts ...grpc.CallOption) (FlightService_DoGetClient, error) + // Push a stream to the flight service associated with a particular + // flight stream. This allows a client of a flight service to upload a stream + // of data. Depending on the particular flight service, a client consumer + // could be allowed to upload a single stream per descriptor or an unlimited + // number. In the latter, the service might implement a 'seal' action that + // can be applied to a descriptor once all streams are uploaded. + DoPut(ctx context.Context, opts ...grpc.CallOption) (FlightService_DoPutClient, error) + // Open a bidirectional data channel for a given descriptor. This + // allows clients to send and receive arbitrary Arrow data and + // application-specific metadata in a single logical stream. In + // contrast to DoGet/DoPut, this is more suited for clients + // offloading computation (rather than storage) to a Flight service. + DoExchange(ctx context.Context, opts ...grpc.CallOption) (FlightService_DoExchangeClient, error) + // Flight services can support an arbitrary number of simple actions in + // addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut + // operations that are potentially available. DoAction allows a flight client + // to do a specific action against a flight service. An action includes + // opaque request and response objects that are specific to the type action + // being undertaken. + DoAction(ctx context.Context, in *Action, opts ...grpc.CallOption) (FlightService_DoActionClient, error) + // A flight service exposes all of the available action types that it has + // along with descriptions. This allows different flight consumers to + // understand the capabilities of the flight service. + ListActions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (FlightService_ListActionsClient, error) +} + +type flightServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFlightServiceClient(cc grpc.ClientConnInterface) FlightServiceClient { + return &flightServiceClient{cc} +} + +func (c *flightServiceClient) Handshake(ctx context.Context, opts ...grpc.CallOption) (FlightService_HandshakeClient, error) { + stream, err := c.cc.NewStream(ctx, &FlightService_ServiceDesc.Streams[0], FlightService_Handshake_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &flightServiceHandshakeClient{stream} + return x, nil +} + +type FlightService_HandshakeClient interface { + Send(*HandshakeRequest) error + Recv() (*HandshakeResponse, error) + grpc.ClientStream +} + +type flightServiceHandshakeClient struct { + grpc.ClientStream +} + +func (x *flightServiceHandshakeClient) Send(m *HandshakeRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *flightServiceHandshakeClient) Recv() (*HandshakeResponse, error) { + m := new(HandshakeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *flightServiceClient) ListFlights(ctx context.Context, in *Criteria, opts ...grpc.CallOption) (FlightService_ListFlightsClient, error) { + stream, err := c.cc.NewStream(ctx, &FlightService_ServiceDesc.Streams[1], FlightService_ListFlights_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &flightServiceListFlightsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type FlightService_ListFlightsClient interface { + Recv() (*FlightInfo, error) + grpc.ClientStream +} + +type flightServiceListFlightsClient struct { + grpc.ClientStream +} + +func (x *flightServiceListFlightsClient) Recv() (*FlightInfo, error) { + m := new(FlightInfo) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *flightServiceClient) GetFlightInfo(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*FlightInfo, error) { + out := new(FlightInfo) + err := c.cc.Invoke(ctx, FlightService_GetFlightInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flightServiceClient) PollFlightInfo(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*PollInfo, error) { + out := new(PollInfo) + err := c.cc.Invoke(ctx, FlightService_PollFlightInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flightServiceClient) GetSchema(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*SchemaResult, error) { + out := new(SchemaResult) + err := c.cc.Invoke(ctx, FlightService_GetSchema_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flightServiceClient) DoGet(ctx context.Context, in *Ticket, opts ...grpc.CallOption) (FlightService_DoGetClient, error) { + stream, err := c.cc.NewStream(ctx, &FlightService_ServiceDesc.Streams[2], FlightService_DoGet_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &flightServiceDoGetClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type FlightService_DoGetClient interface { + Recv() (*FlightData, error) + grpc.ClientStream +} + +type flightServiceDoGetClient struct { + grpc.ClientStream +} + +func (x *flightServiceDoGetClient) Recv() (*FlightData, error) { + m := new(FlightData) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *flightServiceClient) DoPut(ctx context.Context, opts ...grpc.CallOption) (FlightService_DoPutClient, error) { + stream, err := c.cc.NewStream(ctx, &FlightService_ServiceDesc.Streams[3], FlightService_DoPut_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &flightServiceDoPutClient{stream} + return x, nil +} + +type FlightService_DoPutClient interface { + Send(*FlightData) error + Recv() (*PutResult, error) + grpc.ClientStream +} + +type flightServiceDoPutClient struct { + grpc.ClientStream +} + +func (x *flightServiceDoPutClient) Send(m *FlightData) error { + return x.ClientStream.SendMsg(m) +} + +func (x *flightServiceDoPutClient) Recv() (*PutResult, error) { + m := new(PutResult) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *flightServiceClient) DoExchange(ctx context.Context, opts ...grpc.CallOption) (FlightService_DoExchangeClient, error) { + stream, err := c.cc.NewStream(ctx, &FlightService_ServiceDesc.Streams[4], FlightService_DoExchange_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &flightServiceDoExchangeClient{stream} + return x, nil +} + +type FlightService_DoExchangeClient interface { + Send(*FlightData) error + Recv() (*FlightData, error) + grpc.ClientStream +} + +type flightServiceDoExchangeClient struct { + grpc.ClientStream +} + +func (x *flightServiceDoExchangeClient) Send(m *FlightData) error { + return x.ClientStream.SendMsg(m) +} + +func (x *flightServiceDoExchangeClient) Recv() (*FlightData, error) { + m := new(FlightData) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *flightServiceClient) DoAction(ctx context.Context, in *Action, opts ...grpc.CallOption) (FlightService_DoActionClient, error) { + stream, err := c.cc.NewStream(ctx, &FlightService_ServiceDesc.Streams[5], FlightService_DoAction_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &flightServiceDoActionClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type FlightService_DoActionClient interface { + Recv() (*Result, error) + grpc.ClientStream +} + +type flightServiceDoActionClient struct { + grpc.ClientStream +} + +func (x *flightServiceDoActionClient) Recv() (*Result, error) { + m := new(Result) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *flightServiceClient) ListActions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (FlightService_ListActionsClient, error) { + stream, err := c.cc.NewStream(ctx, &FlightService_ServiceDesc.Streams[6], FlightService_ListActions_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &flightServiceListActionsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type FlightService_ListActionsClient interface { + Recv() (*ActionType, error) + grpc.ClientStream +} + +type flightServiceListActionsClient struct { + grpc.ClientStream +} + +func (x *flightServiceListActionsClient) Recv() (*ActionType, error) { + m := new(ActionType) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// FlightServiceServer is the server API for FlightService service. +// All implementations must embed UnimplementedFlightServiceServer +// for forward compatibility +type FlightServiceServer interface { + // Handshake between client and server. Depending on the server, the + // handshake may be required to determine the token that should be used for + // future operations. Both request and response are streams to allow multiple + // round-trips depending on auth mechanism. + Handshake(FlightService_HandshakeServer) error + // Get a list of available streams given a particular criteria. Most flight + // services will expose one or more streams that are readily available for + // retrieval. This api allows listing the streams available for + // consumption. A user can also provide a criteria. The criteria can limit + // the subset of streams that can be listed via this interface. Each flight + // service allows its own definition of how to consume criteria. + ListFlights(*Criteria, FlightService_ListFlightsServer) error + // For a given FlightDescriptor, get information about how the flight can be + // consumed. This is a useful interface if the consumer of the interface + // already can identify the specific flight to consume. This interface can + // also allow a consumer to generate a flight stream through a specified + // descriptor. For example, a flight descriptor might be something that + // includes a SQL statement or a Pickled Python operation that will be + // executed. In those cases, the descriptor will not be previously available + // within the list of available streams provided by ListFlights but will be + // available for consumption for the duration defined by the specific flight + // service. + GetFlightInfo(context.Context, *FlightDescriptor) (*FlightInfo, error) + // For a given FlightDescriptor, start a query and get information + // to poll its execution status. This is a useful interface if the + // query may be a long-running query. The first PollFlightInfo call + // should return as quickly as possible. (GetFlightInfo doesn't + // return until the query is complete.) + // + // A client can consume any available results before + // the query is completed. See PollInfo.info for details. + // + // A client can poll the updated query status by calling + // PollFlightInfo() with PollInfo.flight_descriptor. A server + // should not respond until the result would be different from last + // time. That way, the client can "long poll" for updates + // without constantly making requests. Clients can set a short timeout + // to avoid blocking calls if desired. + // + // A client can't use PollInfo.flight_descriptor after + // PollInfo.expiration_time passes. A server might not accept the + // retry descriptor anymore and the query may be cancelled. + // + // A client may use the CancelFlightInfo action with + // PollInfo.info to cancel the running query. + PollFlightInfo(context.Context, *FlightDescriptor) (*PollInfo, error) + // For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema + // This is used when a consumer needs the Schema of flight stream. Similar to + // GetFlightInfo this interface may generate a new flight that was not previously + // available in ListFlights. + GetSchema(context.Context, *FlightDescriptor) (*SchemaResult, error) + // Retrieve a single stream associated with a particular descriptor + // associated with the referenced ticket. A Flight can be composed of one or + // more streams where each stream can be retrieved using a separate opaque + // ticket that the flight service uses for managing a collection of streams. + DoGet(*Ticket, FlightService_DoGetServer) error + // Push a stream to the flight service associated with a particular + // flight stream. This allows a client of a flight service to upload a stream + // of data. Depending on the particular flight service, a client consumer + // could be allowed to upload a single stream per descriptor or an unlimited + // number. In the latter, the service might implement a 'seal' action that + // can be applied to a descriptor once all streams are uploaded. + DoPut(FlightService_DoPutServer) error + // Open a bidirectional data channel for a given descriptor. This + // allows clients to send and receive arbitrary Arrow data and + // application-specific metadata in a single logical stream. In + // contrast to DoGet/DoPut, this is more suited for clients + // offloading computation (rather than storage) to a Flight service. + DoExchange(FlightService_DoExchangeServer) error + // Flight services can support an arbitrary number of simple actions in + // addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut + // operations that are potentially available. DoAction allows a flight client + // to do a specific action against a flight service. An action includes + // opaque request and response objects that are specific to the type action + // being undertaken. + DoAction(*Action, FlightService_DoActionServer) error + // A flight service exposes all of the available action types that it has + // along with descriptions. This allows different flight consumers to + // understand the capabilities of the flight service. + ListActions(*Empty, FlightService_ListActionsServer) error + mustEmbedUnimplementedFlightServiceServer() +} + +// UnimplementedFlightServiceServer must be embedded to have forward compatible implementations. +type UnimplementedFlightServiceServer struct { +} + +func (UnimplementedFlightServiceServer) Handshake(FlightService_HandshakeServer) error { + return status.Errorf(codes.Unimplemented, "method Handshake not implemented") +} +func (UnimplementedFlightServiceServer) ListFlights(*Criteria, FlightService_ListFlightsServer) error { + return status.Errorf(codes.Unimplemented, "method ListFlights not implemented") +} +func (UnimplementedFlightServiceServer) GetFlightInfo(context.Context, *FlightDescriptor) (*FlightInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFlightInfo not implemented") +} +func (UnimplementedFlightServiceServer) PollFlightInfo(context.Context, *FlightDescriptor) (*PollInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method PollFlightInfo not implemented") +} +func (UnimplementedFlightServiceServer) GetSchema(context.Context, *FlightDescriptor) (*SchemaResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented") +} +func (UnimplementedFlightServiceServer) DoGet(*Ticket, FlightService_DoGetServer) error { + return status.Errorf(codes.Unimplemented, "method DoGet not implemented") +} +func (UnimplementedFlightServiceServer) DoPut(FlightService_DoPutServer) error { + return status.Errorf(codes.Unimplemented, "method DoPut not implemented") +} +func (UnimplementedFlightServiceServer) DoExchange(FlightService_DoExchangeServer) error { + return status.Errorf(codes.Unimplemented, "method DoExchange not implemented") +} +func (UnimplementedFlightServiceServer) DoAction(*Action, FlightService_DoActionServer) error { + return status.Errorf(codes.Unimplemented, "method DoAction not implemented") +} +func (UnimplementedFlightServiceServer) ListActions(*Empty, FlightService_ListActionsServer) error { + return status.Errorf(codes.Unimplemented, "method ListActions not implemented") +} +func (UnimplementedFlightServiceServer) mustEmbedUnimplementedFlightServiceServer() {} + +// UnsafeFlightServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FlightServiceServer will +// result in compilation errors. +type UnsafeFlightServiceServer interface { + mustEmbedUnimplementedFlightServiceServer() +} + +func RegisterFlightServiceServer(s grpc.ServiceRegistrar, srv FlightServiceServer) { + s.RegisterService(&FlightService_ServiceDesc, srv) +} + +func _FlightService_Handshake_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(FlightServiceServer).Handshake(&flightServiceHandshakeServer{stream}) +} + +type FlightService_HandshakeServer interface { + Send(*HandshakeResponse) error + Recv() (*HandshakeRequest, error) + grpc.ServerStream +} + +type flightServiceHandshakeServer struct { + grpc.ServerStream +} + +func (x *flightServiceHandshakeServer) Send(m *HandshakeResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *flightServiceHandshakeServer) Recv() (*HandshakeRequest, error) { + m := new(HandshakeRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _FlightService_ListFlights_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(Criteria) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(FlightServiceServer).ListFlights(m, &flightServiceListFlightsServer{stream}) +} + +type FlightService_ListFlightsServer interface { + Send(*FlightInfo) error + grpc.ServerStream +} + +type flightServiceListFlightsServer struct { + grpc.ServerStream +} + +func (x *flightServiceListFlightsServer) Send(m *FlightInfo) error { + return x.ServerStream.SendMsg(m) +} + +func _FlightService_GetFlightInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FlightDescriptor) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlightServiceServer).GetFlightInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FlightService_GetFlightInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlightServiceServer).GetFlightInfo(ctx, req.(*FlightDescriptor)) + } + return interceptor(ctx, in, info, handler) +} + +func _FlightService_PollFlightInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FlightDescriptor) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlightServiceServer).PollFlightInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FlightService_PollFlightInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlightServiceServer).PollFlightInfo(ctx, req.(*FlightDescriptor)) + } + return interceptor(ctx, in, info, handler) +} + +func _FlightService_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FlightDescriptor) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlightServiceServer).GetSchema(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FlightService_GetSchema_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlightServiceServer).GetSchema(ctx, req.(*FlightDescriptor)) + } + return interceptor(ctx, in, info, handler) +} + +func _FlightService_DoGet_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(Ticket) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(FlightServiceServer).DoGet(m, &flightServiceDoGetServer{stream}) +} + +type FlightService_DoGetServer interface { + Send(*FlightData) error + grpc.ServerStream +} + +type flightServiceDoGetServer struct { + grpc.ServerStream +} + +func (x *flightServiceDoGetServer) Send(m *FlightData) error { + return x.ServerStream.SendMsg(m) +} + +func _FlightService_DoPut_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(FlightServiceServer).DoPut(&flightServiceDoPutServer{stream}) +} + +type FlightService_DoPutServer interface { + Send(*PutResult) error + Recv() (*FlightData, error) + grpc.ServerStream +} + +type flightServiceDoPutServer struct { + grpc.ServerStream +} + +func (x *flightServiceDoPutServer) Send(m *PutResult) error { + return x.ServerStream.SendMsg(m) +} + +func (x *flightServiceDoPutServer) Recv() (*FlightData, error) { + m := new(FlightData) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _FlightService_DoExchange_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(FlightServiceServer).DoExchange(&flightServiceDoExchangeServer{stream}) +} + +type FlightService_DoExchangeServer interface { + Send(*FlightData) error + Recv() (*FlightData, error) + grpc.ServerStream +} + +type flightServiceDoExchangeServer struct { + grpc.ServerStream +} + +func (x *flightServiceDoExchangeServer) Send(m *FlightData) error { + return x.ServerStream.SendMsg(m) +} + +func (x *flightServiceDoExchangeServer) Recv() (*FlightData, error) { + m := new(FlightData) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _FlightService_DoAction_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(Action) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(FlightServiceServer).DoAction(m, &flightServiceDoActionServer{stream}) +} + +type FlightService_DoActionServer interface { + Send(*Result) error + grpc.ServerStream +} + +type flightServiceDoActionServer struct { + grpc.ServerStream +} + +func (x *flightServiceDoActionServer) Send(m *Result) error { + return x.ServerStream.SendMsg(m) +} + +func _FlightService_ListActions_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(Empty) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(FlightServiceServer).ListActions(m, &flightServiceListActionsServer{stream}) +} + +type FlightService_ListActionsServer interface { + Send(*ActionType) error + grpc.ServerStream +} + +type flightServiceListActionsServer struct { + grpc.ServerStream +} + +func (x *flightServiceListActionsServer) Send(m *ActionType) error { + return x.ServerStream.SendMsg(m) +} + +// FlightService_ServiceDesc is the grpc.ServiceDesc for FlightService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FlightService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "arrow.flight.protocol.FlightService", + HandlerType: (*FlightServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetFlightInfo", + Handler: _FlightService_GetFlightInfo_Handler, + }, + { + MethodName: "PollFlightInfo", + Handler: _FlightService_PollFlightInfo_Handler, + }, + { + MethodName: "GetSchema", + Handler: _FlightService_GetSchema_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Handshake", + Handler: _FlightService_Handshake_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "ListFlights", + Handler: _FlightService_ListFlights_Handler, + ServerStreams: true, + }, + { + StreamName: "DoGet", + Handler: _FlightService_DoGet_Handler, + ServerStreams: true, + }, + { + StreamName: "DoPut", + Handler: _FlightService_DoPut_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "DoExchange", + Handler: _FlightService_DoExchange_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "DoAction", + Handler: _FlightService_DoAction_Handler, + ServerStreams: true, + }, + { + StreamName: "ListActions", + Handler: _FlightService_ListActions_Handler, + ServerStreams: true, + }, + }, + Metadata: "Flight.proto", +} diff --git a/dev/flight-integration/flight/gen.go b/dev/flight-integration/flight/gen.go new file mode 100644 index 0000000000000..b3f477df50d76 --- /dev/null +++ b/dev/flight-integration/flight/gen.go @@ -0,0 +1,20 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package flight + +//go:generate protoc --experimental_allow_proto3_optional -I../../../format --go_out=. --go-grpc_out=. --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative Flight.proto +//go:generate protoc --experimental_allow_proto3_optional -I../../../format --go_out=. --go-grpc_out=. --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative FlightSql.proto diff --git a/dev/flight-integration/go.mod b/dev/flight-integration/go.mod index 48f6b1ead955a..1976008de0e60 100644 --- a/dev/flight-integration/go.mod +++ b/dev/flight-integration/go.mod @@ -3,7 +3,6 @@ module github.com/apache/arrow/dev/flight-integration go 1.22.3 require ( - github.com/apache/arrow/go/v18 v18.0.0-20240912174209-990cdf7dca8b github.com/stretchr/testify v1.9.0 google.golang.org/grpc v1.66.2 google.golang.org/protobuf v1.34.2 diff --git a/dev/flight-integration/go.sum b/dev/flight-integration/go.sum index 35f0ac468ea61..6720683644ac3 100644 --- a/dev/flight-integration/go.sum +++ b/dev/flight-integration/go.sum @@ -1,5 +1,3 @@ -github.com/apache/arrow/go/v18 v18.0.0-20240912174209-990cdf7dca8b h1:qoHDuszpabcuxTvXi/JIFdcDF5a2dtpa4lIYHKnMvR4= -github.com/apache/arrow/go/v18 v18.0.0-20240912174209-990cdf7dca8b/go.mod h1:GjCnS5QddrJzyqrdYqCUvwlND7SfAw4WH/722M2U2NM= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= diff --git a/dev/flight-integration/scenario/runner.go b/dev/flight-integration/scenario/runner.go index a0e41f6466900..d22a388247357 100644 --- a/dev/flight-integration/scenario/runner.go +++ b/dev/flight-integration/scenario/runner.go @@ -6,9 +6,9 @@ import ( "fmt" "strings" + "github.com/apache/arrow/dev/flight-integration/flight" "github.com/apache/arrow/dev/flight-integration/tester" - "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/grpc" ) diff --git a/dev/flight-integration/scenario/scenario.go b/dev/flight-integration/scenario/scenario.go index 62e6bb9fa6dfe..6fbf58a37b434 100644 --- a/dev/flight-integration/scenario/scenario.go +++ b/dev/flight-integration/scenario/scenario.go @@ -5,9 +5,8 @@ import ( "fmt" "sync" + "github.com/apache/arrow/dev/flight-integration/flight" "github.com/apache/arrow/dev/flight-integration/tester" - - "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" ) var ( diff --git a/dev/flight-integration/scenario/scenario_test.go b/dev/flight-integration/scenario/scenario_test.go index d07df9d49d382..3e2b04a36aced 100644 --- a/dev/flight-integration/scenario/scenario_test.go +++ b/dev/flight-integration/scenario/scenario_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" + "github.com/apache/arrow/dev/flight-integration/flight" "github.com/apache/arrow/dev/flight-integration/scenario" - "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/dev/flight-integration/scenario/server.go b/dev/flight-integration/scenario/server.go index f0ba50c10edba..19da7d438bec1 100644 --- a/dev/flight-integration/scenario/server.go +++ b/dev/flight-integration/scenario/server.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" + "github.com/apache/arrow/dev/flight-integration/flight" "google.golang.org/grpc/codes" "google.golang.org/grpc/stats" "google.golang.org/grpc/status" diff --git a/dev/flight-integration/scenario/server_test.go b/dev/flight-integration/scenario/server_test.go index ece3470ae7437..58cf44d49b26b 100644 --- a/dev/flight-integration/scenario/server_test.go +++ b/dev/flight-integration/scenario/server_test.go @@ -7,9 +7,9 @@ import ( "testing" integration "github.com/apache/arrow/dev/flight-integration" + "github.com/apache/arrow/dev/flight-integration/flight" "github.com/apache/arrow/dev/flight-integration/scenario" - "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "github.com/stretchr/testify/suite" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" diff --git a/dev/flight-integration/server.go b/dev/flight-integration/server.go index 0f0031b62a14f..1d887801f899b 100644 --- a/dev/flight-integration/server.go +++ b/dev/flight-integration/server.go @@ -1,9 +1,9 @@ package integration import ( + "github.com/apache/arrow/dev/flight-integration/flight" "github.com/apache/arrow/dev/flight-integration/scenario" - "github.com/apache/arrow/go/v18/arrow/flight/gen/flight" "google.golang.org/grpc" ) From 83da9f842771451f86a1cb1acfd7219bb7f39c86 Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Fri, 13 Sep 2024 16:42:34 -0400 Subject: [PATCH 05/12] cleanup server client conn watcher --- dev/flight-integration/scenario/server.go | 46 ++++++++++++----------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/dev/flight-integration/scenario/server.go b/dev/flight-integration/scenario/server.go index 19da7d438bec1..1df0947703cca 100644 --- a/dev/flight-integration/scenario/server.go +++ b/dev/flight-integration/scenario/server.go @@ -25,28 +25,9 @@ func NewServer(scenarios []Scenario) *scenarioServer { clientDoneCh: make(chan struct{}, 1), serverReadyCh: make(chan struct{}, 1), } - server.serverReadyCh <- struct{}{} - go func() { - for { - select { - case <-server.clientDoneCh: - case <-ctx.Done(): - return - } - - if !server.expectingClientReset { - server.FinishScenario() - } - server.expectingClientReset = false - - select { - case server.serverReadyCh <- struct{}{}: - case <-ctx.Done(): - return - } - } - }() + server.serverReadyCh <- struct{}{} + go server.runClientConnWatcher() return &server } @@ -65,6 +46,27 @@ type scenarioServer struct { incompleteScenarios []string } +func (s *scenarioServer) runClientConnWatcher() { + for { + select { + case <-s.clientDoneCh: + case <-s.ctx.Done(): + return + } + + if !s.expectingClientReset { + s.FinishScenario() + } + s.expectingClientReset = false + + select { + case s.serverReadyCh <- struct{}{}: + case <-s.ctx.Done(): + return + } + } +} + func (s *scenarioServer) CurrentScenario() (Scenario, error) { if s.curScenario < len(s.scenarios) { return s.scenarios[s.curScenario], nil @@ -292,6 +294,8 @@ func (s *scenarioServer) HandleConn(ctx context.Context, connStats stats.ConnSta select { case <-s.serverReadyCh: log.Println("conn acquired") + case <-s.ctx.Done(): + log.Fatal("invalid state: all scenarios completed, server not accepting new connections") default: log.Fatal("invalid state: only one client may connect to the integration server at a time") } From 8f7ee937d12d9f495b6bd363d9eefa86d849ef10 Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Fri, 13 Sep 2024 16:58:22 -0400 Subject: [PATCH 06/12] add to github actions --- .github/workflows/integration.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b73f900e616f5..62f358ecbcc6b 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -24,6 +24,7 @@ on: - '.github/workflows/integration.yml' - 'ci/**' - 'dev/archery/**' + - 'dev/flight-integration/**' - 'docker-compose.yml' - 'go/**' - 'integration/**' @@ -38,6 +39,7 @@ on: - '.github/workflows/integration.yml' - 'ci/**' - 'dev/archery/**' + - 'dev/flight-integration/**' - 'docker-compose.yml' - 'go/**' - 'integration/**' @@ -118,3 +120,23 @@ jobs: ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} continue-on-error: true run: archery docker push conda-integration + + flight_integration_server: + name: Build and Test Flight Integration Server + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./dev/flight-integration + steps: + - name: Checkout Arrow + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - name: Setup Go + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: '1.22' + - name: Go Get + run: go get . + - name: Go Build + run: go build -v ./... + - name: Go Test + run: go test -v ./... From 66fa84d6b125424b5db016e72533dff5eccb4617 Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Fri, 13 Sep 2024 17:05:10 -0400 Subject: [PATCH 07/12] add license header --- dev/flight-integration/cases/auth:basic_proto.go | 16 ++++++++++++++++ .../cases/location:reuse_connection.go | 16 ++++++++++++++++ dev/flight-integration/cases/poll_flight_info.go | 16 ++++++++++++++++ .../cmd/arrow-flight-integration-client/main.go | 16 ++++++++++++++++ .../cmd/arrow-flight-integration-server/main.go | 16 ++++++++++++++++ dev/flight-integration/go.mod | 16 ++++++++++++++++ dev/flight-integration/scenario/runner.go | 16 ++++++++++++++++ dev/flight-integration/scenario/scenario.go | 16 ++++++++++++++++ dev/flight-integration/scenario/scenario_test.go | 16 ++++++++++++++++ dev/flight-integration/scenario/server.go | 16 ++++++++++++++++ dev/flight-integration/scenario/server_test.go | 16 ++++++++++++++++ dev/flight-integration/server.go | 16 ++++++++++++++++ dev/flight-integration/server_test.go | 16 ++++++++++++++++ dev/flight-integration/tester/tester.go | 16 ++++++++++++++++ 14 files changed, 224 insertions(+) diff --git a/dev/flight-integration/cases/auth:basic_proto.go b/dev/flight-integration/cases/auth:basic_proto.go index 07ddeff66dd80..da80bc98692a3 100644 --- a/dev/flight-integration/cases/auth:basic_proto.go +++ b/dev/flight-integration/cases/auth:basic_proto.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package cases import ( diff --git a/dev/flight-integration/cases/location:reuse_connection.go b/dev/flight-integration/cases/location:reuse_connection.go index 6d319bf206511..af6b822a0077d 100644 --- a/dev/flight-integration/cases/location:reuse_connection.go +++ b/dev/flight-integration/cases/location:reuse_connection.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package cases import ( diff --git a/dev/flight-integration/cases/poll_flight_info.go b/dev/flight-integration/cases/poll_flight_info.go index aec7860283b90..2f6fa0f239fa3 100644 --- a/dev/flight-integration/cases/poll_flight_info.go +++ b/dev/flight-integration/cases/poll_flight_info.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package cases import ( diff --git a/dev/flight-integration/cmd/arrow-flight-integration-client/main.go b/dev/flight-integration/cmd/arrow-flight-integration-client/main.go index 8c243050f28a2..738ca5b18aea6 100644 --- a/dev/flight-integration/cmd/arrow-flight-integration-client/main.go +++ b/dev/flight-integration/cmd/arrow-flight-integration-client/main.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/dev/flight-integration/cmd/arrow-flight-integration-server/main.go b/dev/flight-integration/cmd/arrow-flight-integration-server/main.go index dabb9641846ec..139376d36cbd2 100644 --- a/dev/flight-integration/cmd/arrow-flight-integration-server/main.go +++ b/dev/flight-integration/cmd/arrow-flight-integration-server/main.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( diff --git a/dev/flight-integration/go.mod b/dev/flight-integration/go.mod index 1976008de0e60..e50f20dafa8fc 100644 --- a/dev/flight-integration/go.mod +++ b/dev/flight-integration/go.mod @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + module github.com/apache/arrow/dev/flight-integration go 1.22.3 diff --git a/dev/flight-integration/scenario/runner.go b/dev/flight-integration/scenario/runner.go index d22a388247357..8fefb27f17a69 100644 --- a/dev/flight-integration/scenario/runner.go +++ b/dev/flight-integration/scenario/runner.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package scenario import ( diff --git a/dev/flight-integration/scenario/scenario.go b/dev/flight-integration/scenario/scenario.go index 6fbf58a37b434..12ead776e8b7e 100644 --- a/dev/flight-integration/scenario/scenario.go +++ b/dev/flight-integration/scenario/scenario.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package scenario import ( diff --git a/dev/flight-integration/scenario/scenario_test.go b/dev/flight-integration/scenario/scenario_test.go index 3e2b04a36aced..7fb5bb24ccce4 100644 --- a/dev/flight-integration/scenario/scenario_test.go +++ b/dev/flight-integration/scenario/scenario_test.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package scenario_test import ( diff --git a/dev/flight-integration/scenario/server.go b/dev/flight-integration/scenario/server.go index 1df0947703cca..859b33c21365a 100644 --- a/dev/flight-integration/scenario/server.go +++ b/dev/flight-integration/scenario/server.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package scenario import ( diff --git a/dev/flight-integration/scenario/server_test.go b/dev/flight-integration/scenario/server_test.go index 58cf44d49b26b..aed93f4dee4f2 100644 --- a/dev/flight-integration/scenario/server_test.go +++ b/dev/flight-integration/scenario/server_test.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package scenario_test import ( diff --git a/dev/flight-integration/server.go b/dev/flight-integration/server.go index 1d887801f899b..5b325e92bf900 100644 --- a/dev/flight-integration/server.go +++ b/dev/flight-integration/server.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package integration import ( diff --git a/dev/flight-integration/server_test.go b/dev/flight-integration/server_test.go index a46b048a81a80..98cabacb208dd 100644 --- a/dev/flight-integration/server_test.go +++ b/dev/flight-integration/server_test.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package integration_test import ( diff --git a/dev/flight-integration/tester/tester.go b/dev/flight-integration/tester/tester.go index d4817c1a187db..20a72bf1aae02 100644 --- a/dev/flight-integration/tester/tester.go +++ b/dev/flight-integration/tester/tester.go @@ -1,3 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package tester import ( From 97bcb365afbf2c9841df4608fd3ba3295b30ca44 Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Fri, 13 Sep 2024 17:16:10 -0400 Subject: [PATCH 08/12] fix auth scenario --- dev/flight-integration/cases/auth:basic_proto.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev/flight-integration/cases/auth:basic_proto.go b/dev/flight-integration/cases/auth:basic_proto.go index da80bc98692a3..1dc775b291b2d 100644 --- a/dev/flight-integration/cases/auth:basic_proto.go +++ b/dev/flight-integration/cases/auth:basic_proto.go @@ -46,13 +46,17 @@ func init() { { Name: "unauthenticated_action", ServerHandler: scenario.Handler{DoAction: func(a *flight.Action, fs flight.FlightService_DoActionServer) error { + md, ok := metadata.FromIncomingContext(fs.Context()) + if ok && len(md.Get(authHeader)) > 0 { + return fmt.Errorf("expected not to find auth header for unauthenticated action") + } + return status.Error(codes.Unauthenticated, "no token") }}, }, { Name: "auth_handshake", ServerHandler: scenario.Handler{Handshake: func(fs flight.FlightService_HandshakeServer) error { - in, err := fs.Recv() if err != nil { return err From 098602c1d0d6c4ec7d901fd0ac846d9b9f1cf0b5 Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Wed, 18 Sep 2024 18:45:27 -0400 Subject: [PATCH 09/12] initial add flight_sql scenario and gen flatbuffers --- dev/flight-integration/cases/flight_sql.go | 660 ++++++++++++++++++ dev/flight-integration/go.mod | 1 + dev/flight-integration/go.sum | 2 + dev/flight-integration/message/gen.go | 19 + .../org/apache/arrow/flatbuf/Binary.go | 50 ++ .../org/apache/arrow/flatbuf/BinaryView.go | 56 ++ .../message/org/apache/arrow/flatbuf/Block.go | 58 ++ .../apache/arrow/flatbuf/BodyCompression.go | 88 +++ .../arrow/flatbuf/BodyCompressionMethod.go | 36 + .../message/org/apache/arrow/flatbuf/Bool.go | 49 ++ .../org/apache/arrow/flatbuf/Buffer.go | 57 ++ .../apache/arrow/flatbuf/CompressionType.go | 29 + .../message/org/apache/arrow/flatbuf/Date.go | 70 ++ .../org/apache/arrow/flatbuf/DateUnit.go | 29 + .../org/apache/arrow/flatbuf/Decimal.go | 106 +++ .../apache/arrow/flatbuf/DictionaryBatch.go | 107 +++ .../arrow/flatbuf/DictionaryEncoding.go | 134 ++++ .../apache/arrow/flatbuf/DictionaryKind.go | 31 + .../org/apache/arrow/flatbuf/Duration.go | 64 ++ .../org/apache/arrow/flatbuf/Endianness.go | 31 + .../org/apache/arrow/flatbuf/Feature.go | 55 ++ .../message/org/apache/arrow/flatbuf/Field.go | 187 +++++ .../org/apache/arrow/flatbuf/FieldNode.go | 60 ++ .../apache/arrow/flatbuf/FixedSizeBinary.go | 66 ++ .../org/apache/arrow/flatbuf/FixedSizeList.go | 66 ++ .../org/apache/arrow/flatbuf/FloatingPoint.go | 64 ++ .../org/apache/arrow/flatbuf/Footer.go | 161 +++++ .../message/org/apache/arrow/flatbuf/Int.go | 79 +++ .../org/apache/arrow/flatbuf/Interval.go | 64 ++ .../org/apache/arrow/flatbuf/IntervalUnit.go | 32 + .../org/apache/arrow/flatbuf/KeyValue.go | 74 ++ .../org/apache/arrow/flatbuf/LargeBinary.go | 51 ++ .../org/apache/arrow/flatbuf/LargeList.go | 51 ++ .../org/apache/arrow/flatbuf/LargeListView.go | 51 ++ .../org/apache/arrow/flatbuf/LargeUtf8.go | 51 ++ .../message/org/apache/arrow/flatbuf/List.go | 49 ++ .../org/apache/arrow/flatbuf/ListView.go | 52 ++ .../message/org/apache/arrow/flatbuf/Map.go | 91 +++ .../org/apache/arrow/flatbuf/Message.go | 132 ++++ .../org/apache/arrow/flatbuf/MessageHeader.go | 49 ++ .../apache/arrow/flatbuf/MetadataVersion.go | 49 ++ .../message/org/apache/arrow/flatbuf/Null.go | 50 ++ .../org/apache/arrow/flatbuf/Precision.go | 32 + .../org/apache/arrow/flatbuf/RecordBatch.go | 213 ++++++ .../org/apache/arrow/flatbuf/RunEndEncoded.go | 54 ++ .../org/apache/arrow/flatbuf/Schema.go | 158 +++++ .../flatbuf/SparseMatrixCompressedAxis.go | 29 + .../arrow/flatbuf/SparseMatrixIndexCSX.go | 199 ++++++ .../org/apache/arrow/flatbuf/SparseTensor.go | 174 +++++ .../apache/arrow/flatbuf/SparseTensorIndex.go | 35 + .../arrow/flatbuf/SparseTensorIndexCOO.go | 178 +++++ .../arrow/flatbuf/SparseTensorIndexCSF.go | 290 ++++++++ .../org/apache/arrow/flatbuf/Struct_.go | 52 ++ .../org/apache/arrow/flatbuf/Tensor.go | 162 +++++ .../org/apache/arrow/flatbuf/TensorDim.go | 82 +++ .../message/org/apache/arrow/flatbuf/Time.go | 93 +++ .../org/apache/arrow/flatbuf/TimeUnit.go | 35 + .../org/apache/arrow/flatbuf/Timestamp.go | 200 ++++++ .../message/org/apache/arrow/flatbuf/Type.go | 107 +++ .../message/org/apache/arrow/flatbuf/Union.go | 100 +++ .../org/apache/arrow/flatbuf/UnionMode.go | 29 + .../message/org/apache/arrow/flatbuf/Utf8.go | 50 ++ .../org/apache/arrow/flatbuf/Utf8View.go | 56 ++ 63 files changed, 5589 insertions(+) create mode 100644 dev/flight-integration/cases/flight_sql.go create mode 100644 dev/flight-integration/message/gen.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Binary.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/BinaryView.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Block.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/BodyCompression.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/BodyCompressionMethod.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Bool.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Buffer.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/CompressionType.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Date.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/DateUnit.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Decimal.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryBatch.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryEncoding.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryKind.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Duration.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Endianness.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Feature.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Field.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/FieldNode.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/FixedSizeBinary.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/FixedSizeList.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/FloatingPoint.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Footer.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Int.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Interval.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/IntervalUnit.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/KeyValue.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/LargeBinary.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/LargeList.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/LargeListView.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/LargeUtf8.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/List.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/ListView.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Map.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Message.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/MessageHeader.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/MetadataVersion.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Null.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Precision.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/RecordBatch.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/RunEndEncoded.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Schema.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/SparseMatrixCompressedAxis.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/SparseMatrixIndexCSX.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensor.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndex.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndexCOO.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndexCSF.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Struct_.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Tensor.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/TensorDim.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Time.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/TimeUnit.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Timestamp.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Type.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Union.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/UnionMode.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Utf8.go create mode 100644 dev/flight-integration/message/org/apache/arrow/flatbuf/Utf8View.go diff --git a/dev/flight-integration/cases/flight_sql.go b/dev/flight-integration/cases/flight_sql.go new file mode 100644 index 0000000000000..f26954a67c170 --- /dev/null +++ b/dev/flight-integration/cases/flight_sql.go @@ -0,0 +1,660 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cases + +import ( + "context" + "encoding/binary" + "fmt" + "io" + + "github.com/apache/arrow/dev/flight-integration/flight" + "github.com/apache/arrow/dev/flight-integration/message/org/apache/arrow/flatbuf" + "github.com/apache/arrow/dev/flight-integration/scenario" + "github.com/apache/arrow/dev/flight-integration/tester" + flatbuffers "github.com/google/flatbuffers/go" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" +) + +func init() { + var ( + catalog = "catalog" + dbSchemaFilterPattern = "db_schema_filter_pattern" + tableFilterPattern = "table_filter_pattern" + table = "table" + dbSchema = "db_schema" + tableTypes = []string{"table", "view"} + pkCatalog = "pk_catalog" + pkDbSchema = "pk_db_schema" + pkTable = "pk_table" + fkCatalog = "fk_catalog" + fkDbSchema = "fk_db_schema" + fkTable = "fk_table" + ) + + testcases := []struct { + Command proto.Message + Fields []field + }{ + { + Command: &flight.CommandGetCatalogs{}, + Fields: []field{ + {Name: "catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + }, + }, + { + Command: &flight.CommandGetDbSchemas{Catalog: &catalog, DbSchemaFilterPattern: &dbSchemaFilterPattern}, + Fields: []field{ + {Name: "catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "db_schema_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + }, + }, + // { + // Command: &flight.CommandGetTables{ + // Catalog: &catalog, + // DbSchemaFilterPattern: &dbSchemaFilterPattern, + // TableNameFilterPattern: &tableFilterPattern, + // IncludeSchema: false, + // TableTypes: tableTypes, + // }, + // Fields: []field{ + // {Name: "catalog_name", Type: flatbuf.TypeUtf8, Nullable: true}, + // {Name: "db_schema_name", Type: flatbuf.TypeUtf8, Nullable: true}, + // {Name: "table_name", Type: flatbuf.TypeUtf8, Nullable: false}, + // {Name: "table_type", Type: flatbuf.TypeUtf8, Nullable: false}, + // }, + // }, + { + Command: &flight.CommandGetTables{ + Catalog: &catalog, + DbSchemaFilterPattern: &dbSchemaFilterPattern, + TableNameFilterPattern: &tableFilterPattern, + IncludeSchema: true, + TableTypes: tableTypes, + }, + Fields: []field{ + {Name: "catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "db_schema_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "table_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "table_type", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "table_schema", Type: flatbuf.TypeBinary, GetTypeTable: binaryTypeTable, Nullable: false}, + }, + }, + { + Command: &flight.CommandGetTableTypes{}, + Fields: []field{ + {Name: "table_type", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + }, + }, + { + Command: &flight.CommandGetPrimaryKeys{Catalog: &catalog, DbSchema: &dbSchema, Table: table}, + Fields: []field{ + {Name: "catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "db_schema_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "table_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "column_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "key_sequence", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, + {Name: "key_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + }, + }, + { + Command: &flight.CommandGetExportedKeys{Catalog: &catalog, DbSchema: &dbSchema, Table: table}, + Fields: []field{ + {Name: "pk_catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "pk_db_schema_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "pk_table_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "pk_column_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "fk_catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "fk_db_schema_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "fk_table_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "fk_column_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "key_sequence", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, + {Name: "fk_key_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "pk_key_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "update_rule", Type: flatbuf.TypeInt, GetTypeTable: uint8TypeTable, Nullable: false}, + {Name: "delete_rule", Type: flatbuf.TypeInt, GetTypeTable: uint8TypeTable, Nullable: false}, + }, + }, + { + Command: &flight.CommandGetImportedKeys{Catalog: &catalog, DbSchema: &dbSchema, Table: table}, + Fields: []field{ + {Name: "pk_catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "pk_db_schema_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "pk_table_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "pk_column_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "fk_catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "fk_db_schema_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "fk_table_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "fk_column_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "key_sequence", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, + {Name: "fk_key_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "pk_key_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "update_rule", Type: flatbuf.TypeInt, GetTypeTable: uint8TypeTable, Nullable: false}, + {Name: "delete_rule", Type: flatbuf.TypeInt, GetTypeTable: uint8TypeTable, Nullable: false}, + }, + }, + { + Command: &flight.CommandGetCrossReference{ + PkCatalog: &pkCatalog, + PkDbSchema: &pkDbSchema, + PkTable: pkTable, + FkCatalog: &fkCatalog, + FkDbSchema: &fkDbSchema, + FkTable: fkTable, + }, + Fields: []field{ + {Name: "pk_catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "pk_db_schema_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "pk_table_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "pk_column_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "fk_catalog_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "fk_db_schema_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "fk_table_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "fk_column_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "key_sequence", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, + {Name: "fk_key_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "pk_key_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "update_rule", Type: flatbuf.TypeInt, GetTypeTable: uint8TypeTable, Nullable: false}, + {Name: "delete_rule", Type: flatbuf.TypeInt, GetTypeTable: uint8TypeTable, Nullable: false}, + }, + }, + { + Command: &flight.CommandGetXdbcTypeInfo{}, + Fields: []field{ + {Name: "type_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: false}, + {Name: "data_type", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, + {Name: "column_size", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}, + {Name: "literal_prefix", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "literal_suffix", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "create_params", Type: flatbuf.TypeList, GetTypeTable: createParamsTypeTable, Nullable: true}, // TODO: list elements + {Name: "nullable", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, + {Name: "case_sensitive", Type: flatbuf.TypeBool, GetTypeTable: boolTypeTable, Nullable: false}, + {Name: "searchable", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, + {Name: "unsigned_attribute", Type: flatbuf.TypeBool, GetTypeTable: boolTypeTable, Nullable: true}, + {Name: "fixed_prec_scale", Type: flatbuf.TypeBool, GetTypeTable: boolTypeTable, Nullable: false}, + {Name: "auto_increment", Type: flatbuf.TypeBool, GetTypeTable: boolTypeTable, Nullable: true}, + {Name: "local_type_name", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, + {Name: "minimum_scale", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}, + {Name: "maximum_scale", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}, + {Name: "sql_data_type", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, + {Name: "datetime_subcode", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}, + {Name: "num_prec_radix", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}, + {Name: "interval_precision", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}, + }, + }, + { + Command: &flight.CommandGetSqlInfo{Info: []uint32{0, 3}}, + Fields: []field{ + {Name: "info_name", Type: flatbuf.TypeInt, GetTypeTable: uint32TypeTable, Nullable: false}, + {Name: "value", Type: flatbuf.TypeUnion, GetTypeTable: sqlInfoValuesTypeTable, Nullable: false}, // TODO: Union elements + }, + }, + } + + steps := make([]scenario.ScenarioStep, 0) + for _, tc := range testcases { + name := proto.MessageName(tc.Command).Name() + steps = append( + steps, + scenario.ScenarioStep{Name: fmt.Sprintf("GetFlightInfo/%s", name), ServerHandler: scenario.Handler{GetFlightInfo: echoFlightInfo}}, + scenario.ScenarioStep{ + Name: fmt.Sprintf("DoGet/%s", name), + ServerHandler: scenario.Handler{ + DoGet: func(t *flight.Ticket, fs flight.FlightService_DoGetServer) error { + var anycmd anypb.Any + if err := proto.Unmarshal(t.Ticket, &anycmd); err != nil { + return status.Errorf(codes.InvalidArgument, "unable to parse ticket: %s", err.Error()) + } + + cmd := proto.Clone(tc.Command) + proto.Reset(cmd) + + if err := anycmd.UnmarshalTo(cmd); err != nil { + return status.Errorf(codes.InvalidArgument, "unable to unmarshal proto.Any: %s", err.Error()) + } + + return fs.Send(&flight.FlightData{DataHeader: buildFlatbufferSchema(tc.Fields)}) + }, + }, + }, + scenario.ScenarioStep{ + Name: fmt.Sprintf("GetSchema/%s", name), + ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + var anycmd anypb.Any + if err := proto.Unmarshal(fd.Cmd, &anycmd); err != nil { + return nil, status.Errorf(codes.InvalidArgument, "unable to parse command: %s", err.Error()) + } + + cmd := proto.Clone(tc.Command) + proto.Reset(cmd) + + if err := anycmd.UnmarshalTo(cmd); err != nil { + return nil, status.Errorf(codes.InvalidArgument, "unable to unmarshal proto.Any: %s", err.Error()) + } + + schema := writeFlatbufferPayload(tc.Fields) + + return &flight.SchemaResult{Schema: schema}, nil + }}, + }) + } + + scenario.Register( + scenario.Scenario{ + Name: "flight_sql", + Steps: steps, + RunClient: func(ctx context.Context, client flight.FlightServiceClient, t *tester.Tester) { + for _, tc := range testcases { + // pack the command + desc, err := descForCommand(tc.Command) + t.Require().NoError(err) + + // submit query + info, err := client.GetFlightInfo(ctx, desc) + t.Require().NoError(err) + + t.Require().Greater(len(info.Endpoint), 0) + t.Assert().Equal(desc.Cmd, info.Endpoint[0].Ticket.Ticket) + + // fetch result stream + stream, err := client.DoGet(ctx, info.Endpoint[0].Ticket) + t.Require().NoError(err) + + // validate first message is properly formatted schema message + data, err := stream.Recv() + t.Require().NoError(err) + + msg := flatbuf.GetRootAsMessage(data.DataHeader, 0) + t.Require().Equal(flatbuf.MessageHeaderSchema, msg.HeaderType()) + + fields, ok := parseFlatbufferSchemaFields(msg) + t.Require().True(ok) + t.Require().Len(fields, len(tc.Fields)) + + for _, expectedField := range tc.Fields { + field, found := matchFieldByName(fields, expectedField.Name) + t.Require().Truef(found, "no matching field with expected name \"%s\" found in flatbuffer schema", expectedField.Name) + + t.Assert().Equal(expectedField.Name, string(field.Name())) + t.Assert().Equal(expectedField.Type, field.TypeType()) + t.Assert().Equal(expectedField.Nullable, field.Nullable()) + } + + // drain rest of stream + for { + data, err = stream.Recv() + if err == io.EOF { + break + } + t.Require().NoError(err) + + // no more schema messages + t.Assert().Contains( + []flatbuf.MessageHeader{ + flatbuf.MessageHeaderRecordBatch, + flatbuf.MessageHeaderDictionaryBatch, + }, + flatbuf.GetRootAsMessage(data.DataHeader, 0).HeaderType(), + ) + } + + // issue GetSchema + res, err := client.GetSchema(ctx, desc) + t.Require().NoError(err) + + // expect schema to be serialized as full IPC stream Schema message + metadata := extractFlatbufferPayload(res.Schema) + + msg = flatbuf.GetRootAsMessage(metadata, 0) + t.Require().Equal(flatbuf.MessageHeaderSchema, msg.HeaderType()) + + fields, ok = parseFlatbufferSchemaFields(msg) + t.Require().True(ok) + t.Require().Len(fields, len(tc.Fields)) + + for _, expectedField := range tc.Fields { + field, found := matchFieldByName(fields, expectedField.Name) + t.Require().Truef(found, "no matching field with expected name \"%s\" found in flatbuffer schema", expectedField.Name) + + t.Assert().Equal(expectedField.Name, string(field.Name())) + t.Assert().Equal(expectedField.Type, field.TypeType()) + t.Assert().Equal(expectedField.Nullable, field.Nullable()) + } + } + }, + }, + ) +} + +type field struct { + Name string + Type flatbuf.Type + Nullable bool + GetTypeTable func(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) +} + +func utf8TypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + flatbuf.Utf8Start(b) + return flatbuf.Utf8End(b), 0 +} + +func binaryTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + flatbuf.BinaryStart(b) + return flatbuf.BinaryEnd(b), 0 +} + +func int32TypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + flatbuf.IntStart(b) + flatbuf.IntAddBitWidth(b, 32) + flatbuf.IntAddIsSigned(b, true) + return flatbuf.IntEnd(b), 0 +} + +func int64TypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + flatbuf.IntStart(b) + flatbuf.IntAddBitWidth(b, 64) + flatbuf.IntAddIsSigned(b, true) + return flatbuf.IntEnd(b), 0 +} + +func uint32TypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + flatbuf.IntStart(b) + flatbuf.IntAddBitWidth(b, 32) + flatbuf.IntAddIsSigned(b, false) + return flatbuf.IntEnd(b), 0 +} + +func uint8TypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + flatbuf.IntStart(b) + flatbuf.IntAddBitWidth(b, 8) + flatbuf.IntAddIsSigned(b, false) + return flatbuf.IntEnd(b), 0 +} + +func boolTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + flatbuf.BoolStart(b) + return flatbuf.BoolEnd(b), 0 +} + +func createParamsTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + childOffset := buildFlatbufferField(b, field{Name: "item", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable}) + + flatbuf.ListStart(b) + listOffset := flatbuf.ListEnd(b) + + flatbuf.FieldStartChildrenVector(b, 1) + b.PrependUOffsetT(childOffset) + childVecOffset := b.EndVector(1) + + return listOffset, childVecOffset +} + +func int32ListTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + childOffset := buildFlatbufferField(b, field{Name: "item", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}) // TODO: nullable? + + flatbuf.ListStart(b) + listOffset := flatbuf.ListEnd(b) + + flatbuf.FieldStartChildrenVector(b, 1) + b.PrependUOffsetT(childOffset) + childVecOffset := b.EndVector(1) + + return listOffset, childVecOffset +} + +func listTypeTable(b *flatbuffers.Builder, child field) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + childOffset := buildFlatbufferField(b, child) + + flatbuf.ListStart(b) + listOffset := flatbuf.ListEnd(b) + + flatbuf.FieldStartChildrenVector(b, 1) + b.PrependUOffsetT(childOffset) + childVecOffset := b.EndVector(1) + + return listOffset, childVecOffset +} + +func structTypeTable(b *flatbuffers.Builder, children []field) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + nChildren := len(children) + childOffsets := make([]flatbuffers.UOffsetT, nChildren) + for i, child := range children { + childOffsets[i] = buildFlatbufferField(b, child) + } + + flatbuf.Struct_Start(b) + for i := nChildren - 1; i >= 0; i-- { + b.PrependUOffsetT(childOffsets[i]) + } + structOffset := flatbuf.Struct_End(b) + + flatbuf.FieldStartChildrenVector(b, nChildren) + for i := nChildren - 1; i >= 0; i-- { + b.PrependUOffsetT(childOffsets[i]) + } + childVecOffset := b.EndVector(nChildren) + + return structOffset, childVecOffset +} + +func mapTypeTable(b *flatbuffers.Builder, key, val field) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + childOffset := buildFlatbufferField( + b, + field{ + Name: "entries", + Type: flatbuf.TypeStruct_, + GetTypeTable: func(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + return structTypeTable(b, []field{key, val}) + }, + }, + ) + + flatbuf.MapStart(b) + mapOffset := flatbuf.MapEnd(b) + + flatbuf.FieldStartChildrenVector(b, 1) + b.PrependUOffsetT(childOffset) + childVecOffset := b.EndVector(1) + + return mapOffset, childVecOffset +} + +func stringListTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + return listTypeTable(b, field{Name: "item", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}) // TODO: nullable? +} + +func int32ToInt32ListMapTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + return mapTypeTable( + b, + field{Name: "key", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable}, + field{Name: "val", Type: flatbuf.TypeList, GetTypeTable: int32ListTypeTable, Nullable: true}, // TODO: nullable? + ) +} + +func sqlInfoValuesTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { + children := []field{ + {Name: "string_value", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable}, + {Name: "bool_value", Type: flatbuf.TypeBool, GetTypeTable: boolTypeTable}, + {Name: "bigint_value", Type: flatbuf.TypeInt, GetTypeTable: int64TypeTable}, + {Name: "int32_bitmask", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable}, + {Name: "string_list", Type: flatbuf.TypeList, GetTypeTable: stringListTypeTable}, + {Name: "int32_to_int32_list_map", Type: flatbuf.TypeMap, GetTypeTable: int32ToInt32ListMapTypeTable}, + } + + childOffsets := make([]flatbuffers.UOffsetT, len(children)) + for i, child := range children { + childOffsets[i] = buildFlatbufferField(b, child) + } + + flatbuf.UnionStartTypeIdsVector(b, len(children)) + for i := len(children) - 1; i >= 0; i-- { + b.PlaceInt32(int32(i)) + } + typeIDVecOffset := b.EndVector(len(children)) + + flatbuf.UnionStart(b) + flatbuf.UnionAddMode(b, flatbuf.UnionModeDense) + flatbuf.UnionAddTypeIds(b, typeIDVecOffset) + unionOffset := flatbuf.UnionEnd(b) + + flatbuf.FieldStartChildrenVector(b, len(children)) + for i := len(children) - 1; i >= 0; i-- { + b.PrependUOffsetT(childOffsets[i]) + } + childVecOffset := b.EndVector(len(children)) + + return unionOffset, childVecOffset +} + +func matchFieldByName(fields []flatbuf.Field, name string) (flatbuf.Field, bool) { + for _, f := range fields { + fieldName := string(f.Name()) + if fieldName == name { + return f, true + } + } + return flatbuf.Field{}, false +} + +func writeFlatbufferPayload(fields []field) []byte { + schema := buildFlatbufferSchema(fields) + size := uint32(len(schema)) + + res := make([]byte, 8+size) + res[0] = 255 + res[1] = 255 + res[2] = 255 + res[3] = 255 + binary.LittleEndian.PutUint32(res[4:], size) + copy(res[8:], schema) + + return res +} + +func buildFlatbufferSchema(fields []field) []byte { + b := flatbuffers.NewBuilder(1024) + + fieldOffsets := make([]flatbuffers.UOffsetT, len(fields)) + for i, f := range fields { + fieldOffsets[len(fields)-i-1] = buildFlatbufferField(b, f) + } + + flatbuf.SchemaStartFieldsVector(b, len(fields)) + + for _, f := range fieldOffsets { + b.PrependUOffsetT(f) + } + + fieldsFB := b.EndVector(len(fields)) + + flatbuf.SchemaStart(b) + flatbuf.SchemaAddFields(b, fieldsFB) + headerOffset := flatbuf.SchemaEnd(b) + + flatbuf.MessageStart(b) + flatbuf.MessageAddVersion(b, flatbuf.MetadataVersionV5) + flatbuf.MessageAddHeaderType(b, flatbuf.MessageHeaderSchema) + flatbuf.MessageAddHeader(b, headerOffset) + msg := flatbuf.MessageEnd(b) + + b.Finish(msg) + + return b.FinishedBytes() +} + +func buildFlatbufferField(b *flatbuffers.Builder, f field) flatbuffers.UOffsetT { + nameOffset := b.CreateString(f.Name) + + typOffset, childrenOffset := f.GetTypeTable(b) + + flatbuf.FieldStart(b) + flatbuf.FieldAddName(b, nameOffset) + flatbuf.FieldAddTypeType(b, f.Type) + flatbuf.FieldAddType(b, typOffset) + flatbuf.FieldAddChildren(b, childrenOffset) + flatbuf.FieldAddNullable(b, f.Nullable) + return flatbuf.FieldEnd(b) +} + +func parseFlatbufferSchemaFields(msg *flatbuf.Message) ([]flatbuf.Field, bool) { + var schema flatbuf.Schema + table := schema.Table() + if ok := msg.Header(&table); !ok { + return nil, false + } + schema.Init(table.Bytes, table.Pos) + + fields := make([]flatbuf.Field, schema.FieldsLength()) + for i := range fields { + var field flatbuf.Field + if ok := schema.Fields(&field, i); !ok { + return nil, false + } + fields[i] = field + } + return fields, true +} + +func extractFlatbufferPayload(b []byte) []byte { + b = consumeContinuationIndicator(b) + b, size := consumeMetadataSize(b) + return b[:size] +} + +func consumeMetadataSize(b []byte) ([]byte, int32) { + size := int32(binary.LittleEndian.Uint32(b[:4])) + return b[4:], size +} + +func consumeContinuationIndicator(b []byte) []byte { + indicator := []byte{255, 255, 255, 255} + for i, v := range indicator { + if b[i] != v { + // indicator not found + return b + } + } + // indicator found, truncate leading bytes + return b[4:] +} + +func descForCommand(cmd proto.Message) (*flight.FlightDescriptor, error) { + var any anypb.Any + if err := any.MarshalFrom(cmd); err != nil { + return nil, err + } + + data, err := proto.Marshal(&any) + if err != nil { + return nil, err + } + return &flight.FlightDescriptor{ + Type: flight.FlightDescriptor_CMD, + Cmd: data, + }, nil +} + +func echoFlightInfo(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + return &flight.FlightInfo{ + Endpoint: []*flight.FlightEndpoint{{ + Ticket: &flight.Ticket{Ticket: fd.Cmd}, + }}, + }, nil +} diff --git a/dev/flight-integration/go.mod b/dev/flight-integration/go.mod index e50f20dafa8fc..ffdd457f82abd 100644 --- a/dev/flight-integration/go.mod +++ b/dev/flight-integration/go.mod @@ -19,6 +19,7 @@ module github.com/apache/arrow/dev/flight-integration go 1.22.3 require ( + github.com/google/flatbuffers v24.3.25+incompatible github.com/stretchr/testify v1.9.0 google.golang.org/grpc v1.66.2 google.golang.org/protobuf v1.34.2 diff --git a/dev/flight-integration/go.sum b/dev/flight-integration/go.sum index 6720683644ac3..c78686f80165e 100644 --- a/dev/flight-integration/go.sum +++ b/dev/flight-integration/go.sum @@ -1,5 +1,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= +github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/dev/flight-integration/message/gen.go b/dev/flight-integration/message/gen.go new file mode 100644 index 0000000000000..9ba19148df97d --- /dev/null +++ b/dev/flight-integration/message/gen.go @@ -0,0 +1,19 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package message + +//go:generate flatc --go ../../../format/Message.fbs ../../../format/Schema.fbs ../../../format/Tensor.fbs ../../../format/SparseTensor.fbs ../../../format/File.fbs diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Binary.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Binary.go new file mode 100644 index 0000000000000..70c75584ace17 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Binary.go @@ -0,0 +1,50 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Opaque binary data +type Binary struct { + _tab flatbuffers.Table +} + +func GetRootAsBinary(buf []byte, offset flatbuffers.UOffsetT) *Binary { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Binary{} + x.Init(buf, n+offset) + return x +} + +func FinishBinaryBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsBinary(buf []byte, offset flatbuffers.UOffsetT) *Binary { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Binary{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedBinaryBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Binary) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Binary) Table() flatbuffers.Table { + return rcv._tab +} + +func BinaryStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func BinaryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/BinaryView.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/BinaryView.go new file mode 100644 index 0000000000000..d1ddfe7e8b8fd --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/BinaryView.go @@ -0,0 +1,56 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Logically the same as Binary, but the internal representation uses a view +/// struct that contains the string length and either the string's entire data +/// inline (for small strings) or an inlined prefix, an index of another buffer, +/// and an offset pointing to a slice in that buffer (for non-small strings). +/// +/// Since it uses a variable number of data buffers, each Field with this type +/// must have a corresponding entry in `variadicBufferCounts`. +type BinaryView struct { + _tab flatbuffers.Table +} + +func GetRootAsBinaryView(buf []byte, offset flatbuffers.UOffsetT) *BinaryView { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &BinaryView{} + x.Init(buf, n+offset) + return x +} + +func FinishBinaryViewBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsBinaryView(buf []byte, offset flatbuffers.UOffsetT) *BinaryView { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &BinaryView{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedBinaryViewBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *BinaryView) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *BinaryView) Table() flatbuffers.Table { + return rcv._tab +} + +func BinaryViewStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func BinaryViewEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Block.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Block.go new file mode 100644 index 0000000000000..5039172121d4a --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Block.go @@ -0,0 +1,58 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type Block struct { + _tab flatbuffers.Struct +} + +func (rcv *Block) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Block) Table() flatbuffers.Table { + return rcv._tab.Table +} + +/// Index to the start of the RecordBlock (note this is past the Message header) +func (rcv *Block) Offset() int64 { + return rcv._tab.GetInt64(rcv._tab.Pos + flatbuffers.UOffsetT(0)) +} +/// Index to the start of the RecordBlock (note this is past the Message header) +func (rcv *Block) MutateOffset(n int64) bool { + return rcv._tab.MutateInt64(rcv._tab.Pos+flatbuffers.UOffsetT(0), n) +} + +/// Length of the metadata +func (rcv *Block) MetaDataLength() int32 { + return rcv._tab.GetInt32(rcv._tab.Pos + flatbuffers.UOffsetT(8)) +} +/// Length of the metadata +func (rcv *Block) MutateMetaDataLength(n int32) bool { + return rcv._tab.MutateInt32(rcv._tab.Pos+flatbuffers.UOffsetT(8), n) +} + +/// Length of the data (this is aligned so there can be a gap between this and +/// the metadata). +func (rcv *Block) BodyLength() int64 { + return rcv._tab.GetInt64(rcv._tab.Pos + flatbuffers.UOffsetT(16)) +} +/// Length of the data (this is aligned so there can be a gap between this and +/// the metadata). +func (rcv *Block) MutateBodyLength(n int64) bool { + return rcv._tab.MutateInt64(rcv._tab.Pos+flatbuffers.UOffsetT(16), n) +} + +func CreateBlock(builder *flatbuffers.Builder, offset int64, metaDataLength int32, bodyLength int64) flatbuffers.UOffsetT { + builder.Prep(8, 24) + builder.PrependInt64(bodyLength) + builder.Pad(4) + builder.PrependInt32(metaDataLength) + builder.PrependInt64(offset) + return builder.Offset() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/BodyCompression.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/BodyCompression.go new file mode 100644 index 0000000000000..019ace9bd944a --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/BodyCompression.go @@ -0,0 +1,88 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Optional compression for the memory buffers constituting IPC message +/// bodies. Intended for use with RecordBatch but could be used for other +/// message types +type BodyCompression struct { + _tab flatbuffers.Table +} + +func GetRootAsBodyCompression(buf []byte, offset flatbuffers.UOffsetT) *BodyCompression { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &BodyCompression{} + x.Init(buf, n+offset) + return x +} + +func FinishBodyCompressionBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsBodyCompression(buf []byte, offset flatbuffers.UOffsetT) *BodyCompression { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &BodyCompression{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedBodyCompressionBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *BodyCompression) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *BodyCompression) Table() flatbuffers.Table { + return rcv._tab +} + +/// Compressor library. +/// For LZ4_FRAME, each compressed buffer must consist of a single frame. +func (rcv *BodyCompression) Codec() CompressionType { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return CompressionType(rcv._tab.GetInt8(o + rcv._tab.Pos)) + } + return 0 +} + +/// Compressor library. +/// For LZ4_FRAME, each compressed buffer must consist of a single frame. +func (rcv *BodyCompression) MutateCodec(n CompressionType) bool { + return rcv._tab.MutateInt8Slot(4, int8(n)) +} + +/// Indicates the way the record batch body was compressed +func (rcv *BodyCompression) Method() BodyCompressionMethod { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return BodyCompressionMethod(rcv._tab.GetInt8(o + rcv._tab.Pos)) + } + return 0 +} + +/// Indicates the way the record batch body was compressed +func (rcv *BodyCompression) MutateMethod(n BodyCompressionMethod) bool { + return rcv._tab.MutateInt8Slot(6, int8(n)) +} + +func BodyCompressionStart(builder *flatbuffers.Builder) { + builder.StartObject(2) +} +func BodyCompressionAddCodec(builder *flatbuffers.Builder, codec CompressionType) { + builder.PrependInt8Slot(0, int8(codec), 0) +} +func BodyCompressionAddMethod(builder *flatbuffers.Builder, method BodyCompressionMethod) { + builder.PrependInt8Slot(1, int8(method), 0) +} +func BodyCompressionEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/BodyCompressionMethod.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/BodyCompressionMethod.go new file mode 100644 index 0000000000000..28be9390c59be --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/BodyCompressionMethod.go @@ -0,0 +1,36 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +/// Provided for forward compatibility in case we need to support different +/// strategies for compressing the IPC message body (like whole-body +/// compression rather than buffer-level) in the future +type BodyCompressionMethod int8 + +const ( + /// Each constituent buffer is first compressed with the indicated + /// compressor, and then written with the uncompressed length in the first 8 + /// bytes as a 64-bit little-endian signed integer followed by the compressed + /// buffer bytes (and then padding as required by the protocol). The + /// uncompressed length may be set to -1 to indicate that the data that + /// follows is not compressed, which can be useful for cases where + /// compression does not yield appreciable savings. + BodyCompressionMethodBUFFER BodyCompressionMethod = 0 +) + +var EnumNamesBodyCompressionMethod = map[BodyCompressionMethod]string{ + BodyCompressionMethodBUFFER: "BUFFER", +} + +var EnumValuesBodyCompressionMethod = map[string]BodyCompressionMethod{ + "BUFFER": BodyCompressionMethodBUFFER, +} + +func (v BodyCompressionMethod) String() string { + if s, ok := EnumNamesBodyCompressionMethod[v]; ok { + return s + } + return "BodyCompressionMethod(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Bool.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Bool.go new file mode 100644 index 0000000000000..7cee4f820e7bd --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Bool.go @@ -0,0 +1,49 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type Bool struct { + _tab flatbuffers.Table +} + +func GetRootAsBool(buf []byte, offset flatbuffers.UOffsetT) *Bool { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Bool{} + x.Init(buf, n+offset) + return x +} + +func FinishBoolBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsBool(buf []byte, offset flatbuffers.UOffsetT) *Bool { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Bool{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedBoolBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Bool) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Bool) Table() flatbuffers.Table { + return rcv._tab +} + +func BoolStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func BoolEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Buffer.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Buffer.go new file mode 100644 index 0000000000000..82254947f6339 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Buffer.go @@ -0,0 +1,57 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// ---------------------------------------------------------------------- +/// A Buffer represents a single contiguous memory segment +type Buffer struct { + _tab flatbuffers.Struct +} + +func (rcv *Buffer) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Buffer) Table() flatbuffers.Table { + return rcv._tab.Table +} + +/// The relative offset into the shared memory page where the bytes for this +/// buffer starts +func (rcv *Buffer) Offset() int64 { + return rcv._tab.GetInt64(rcv._tab.Pos + flatbuffers.UOffsetT(0)) +} +/// The relative offset into the shared memory page where the bytes for this +/// buffer starts +func (rcv *Buffer) MutateOffset(n int64) bool { + return rcv._tab.MutateInt64(rcv._tab.Pos+flatbuffers.UOffsetT(0), n) +} + +/// The absolute length (in bytes) of the memory buffer. The memory is found +/// from offset (inclusive) to offset + length (non-inclusive). When building +/// messages using the encapsulated IPC message, padding bytes may be written +/// after a buffer, but such padding bytes do not need to be accounted for in +/// the size here. +func (rcv *Buffer) Length() int64 { + return rcv._tab.GetInt64(rcv._tab.Pos + flatbuffers.UOffsetT(8)) +} +/// The absolute length (in bytes) of the memory buffer. The memory is found +/// from offset (inclusive) to offset + length (non-inclusive). When building +/// messages using the encapsulated IPC message, padding bytes may be written +/// after a buffer, but such padding bytes do not need to be accounted for in +/// the size here. +func (rcv *Buffer) MutateLength(n int64) bool { + return rcv._tab.MutateInt64(rcv._tab.Pos+flatbuffers.UOffsetT(8), n) +} + +func CreateBuffer(builder *flatbuffers.Builder, offset int64, length int64) flatbuffers.UOffsetT { + builder.Prep(8, 16) + builder.PrependInt64(length) + builder.PrependInt64(offset) + return builder.Offset() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/CompressionType.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/CompressionType.go new file mode 100644 index 0000000000000..bd8bb9bd3ba0c --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/CompressionType.go @@ -0,0 +1,29 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +type CompressionType int8 + +const ( + CompressionTypeLZ4_FRAME CompressionType = 0 + CompressionTypeZSTD CompressionType = 1 +) + +var EnumNamesCompressionType = map[CompressionType]string{ + CompressionTypeLZ4_FRAME: "LZ4_FRAME", + CompressionTypeZSTD: "ZSTD", +} + +var EnumValuesCompressionType = map[string]CompressionType{ + "LZ4_FRAME": CompressionTypeLZ4_FRAME, + "ZSTD": CompressionTypeZSTD, +} + +func (v CompressionType) String() string { + if s, ok := EnumNamesCompressionType[v]; ok { + return s + } + return "CompressionType(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Date.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Date.go new file mode 100644 index 0000000000000..09fb57358fd7d --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Date.go @@ -0,0 +1,70 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Date is either a 32-bit or 64-bit signed integer type representing an +/// elapsed time since UNIX epoch (1970-01-01), stored in either of two units: +/// +/// * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no +/// leap seconds), where the values are evenly divisible by 86400000 +/// * Days (32 bits) since the UNIX epoch +type Date struct { + _tab flatbuffers.Table +} + +func GetRootAsDate(buf []byte, offset flatbuffers.UOffsetT) *Date { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Date{} + x.Init(buf, n+offset) + return x +} + +func FinishDateBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsDate(buf []byte, offset flatbuffers.UOffsetT) *Date { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Date{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedDateBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Date) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Date) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Date) Unit() DateUnit { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return DateUnit(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 1 +} + +func (rcv *Date) MutateUnit(n DateUnit) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +func DateStart(builder *flatbuffers.Builder) { + builder.StartObject(1) +} +func DateAddUnit(builder *flatbuffers.Builder, unit DateUnit) { + builder.PrependInt16Slot(0, int16(unit), 1) +} +func DateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/DateUnit.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/DateUnit.go new file mode 100644 index 0000000000000..b2bfdec91486c --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/DateUnit.go @@ -0,0 +1,29 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +type DateUnit int16 + +const ( + DateUnitDAY DateUnit = 0 + DateUnitMILLISECOND DateUnit = 1 +) + +var EnumNamesDateUnit = map[DateUnit]string{ + DateUnitDAY: "DAY", + DateUnitMILLISECOND: "MILLISECOND", +} + +var EnumValuesDateUnit = map[string]DateUnit{ + "DAY": DateUnitDAY, + "MILLISECOND": DateUnitMILLISECOND, +} + +func (v DateUnit) String() string { + if s, ok := EnumNamesDateUnit[v]; ok { + return s + } + return "DateUnit(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Decimal.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Decimal.go new file mode 100644 index 0000000000000..dfd80e8bd25db --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Decimal.go @@ -0,0 +1,106 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Exact decimal value represented as an integer value in two's +/// complement. Currently 32-bit (4-byte), 64-bit (8-byte), +/// 128-bit (16-byte) and 256-bit (32-byte) integers are used. +/// The representation uses the endianness indicated in the Schema. +type Decimal struct { + _tab flatbuffers.Table +} + +func GetRootAsDecimal(buf []byte, offset flatbuffers.UOffsetT) *Decimal { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Decimal{} + x.Init(buf, n+offset) + return x +} + +func FinishDecimalBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsDecimal(buf []byte, offset flatbuffers.UOffsetT) *Decimal { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Decimal{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedDecimalBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Decimal) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Decimal) Table() flatbuffers.Table { + return rcv._tab +} + +/// Total number of decimal digits +func (rcv *Decimal) Precision() int32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.GetInt32(o + rcv._tab.Pos) + } + return 0 +} + +/// Total number of decimal digits +func (rcv *Decimal) MutatePrecision(n int32) bool { + return rcv._tab.MutateInt32Slot(4, n) +} + +/// Number of digits after the decimal point "." +func (rcv *Decimal) Scale() int32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.GetInt32(o + rcv._tab.Pos) + } + return 0 +} + +/// Number of digits after the decimal point "." +func (rcv *Decimal) MutateScale(n int32) bool { + return rcv._tab.MutateInt32Slot(6, n) +} + +/// Number of bits per value. The accepted widths are 32, 64, 128 and 256. +/// We use bitWidth for consistency with Int::bitWidth. +func (rcv *Decimal) BitWidth() int32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + return rcv._tab.GetInt32(o + rcv._tab.Pos) + } + return 128 +} + +/// Number of bits per value. The accepted widths are 32, 64, 128 and 256. +/// We use bitWidth for consistency with Int::bitWidth. +func (rcv *Decimal) MutateBitWidth(n int32) bool { + return rcv._tab.MutateInt32Slot(8, n) +} + +func DecimalStart(builder *flatbuffers.Builder) { + builder.StartObject(3) +} +func DecimalAddPrecision(builder *flatbuffers.Builder, precision int32) { + builder.PrependInt32Slot(0, precision, 0) +} +func DecimalAddScale(builder *flatbuffers.Builder, scale int32) { + builder.PrependInt32Slot(1, scale, 0) +} +func DecimalAddBitWidth(builder *flatbuffers.Builder, bitWidth int32) { + builder.PrependInt32Slot(2, bitWidth, 128) +} +func DecimalEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryBatch.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryBatch.go new file mode 100644 index 0000000000000..423a06a0046c6 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryBatch.go @@ -0,0 +1,107 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// For sending dictionary encoding information. Any Field can be +/// dictionary-encoded, but in this case none of its children may be +/// dictionary-encoded. +/// There is one vector / column per dictionary, but that vector / column +/// may be spread across multiple dictionary batches by using the isDelta +/// flag +type DictionaryBatch struct { + _tab flatbuffers.Table +} + +func GetRootAsDictionaryBatch(buf []byte, offset flatbuffers.UOffsetT) *DictionaryBatch { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &DictionaryBatch{} + x.Init(buf, n+offset) + return x +} + +func FinishDictionaryBatchBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsDictionaryBatch(buf []byte, offset flatbuffers.UOffsetT) *DictionaryBatch { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &DictionaryBatch{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedDictionaryBatchBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *DictionaryBatch) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *DictionaryBatch) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *DictionaryBatch) Id() int64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.GetInt64(o + rcv._tab.Pos) + } + return 0 +} + +func (rcv *DictionaryBatch) MutateId(n int64) bool { + return rcv._tab.MutateInt64Slot(4, n) +} + +func (rcv *DictionaryBatch) Data(obj *RecordBatch) *RecordBatch { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(RecordBatch) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// If isDelta is true the values in the dictionary are to be appended to a +/// dictionary with the indicated id. If isDelta is false this dictionary +/// should replace the existing dictionary. +func (rcv *DictionaryBatch) IsDelta() bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + return rcv._tab.GetBool(o + rcv._tab.Pos) + } + return false +} + +/// If isDelta is true the values in the dictionary are to be appended to a +/// dictionary with the indicated id. If isDelta is false this dictionary +/// should replace the existing dictionary. +func (rcv *DictionaryBatch) MutateIsDelta(n bool) bool { + return rcv._tab.MutateBoolSlot(8, n) +} + +func DictionaryBatchStart(builder *flatbuffers.Builder) { + builder.StartObject(3) +} +func DictionaryBatchAddId(builder *flatbuffers.Builder, id int64) { + builder.PrependInt64Slot(0, id, 0) +} +func DictionaryBatchAddData(builder *flatbuffers.Builder, data flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(data), 0) +} +func DictionaryBatchAddIsDelta(builder *flatbuffers.Builder, isDelta bool) { + builder.PrependBoolSlot(2, isDelta, false) +} +func DictionaryBatchEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryEncoding.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryEncoding.go new file mode 100644 index 0000000000000..40910e4a7ce04 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryEncoding.go @@ -0,0 +1,134 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type DictionaryEncoding struct { + _tab flatbuffers.Table +} + +func GetRootAsDictionaryEncoding(buf []byte, offset flatbuffers.UOffsetT) *DictionaryEncoding { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &DictionaryEncoding{} + x.Init(buf, n+offset) + return x +} + +func FinishDictionaryEncodingBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsDictionaryEncoding(buf []byte, offset flatbuffers.UOffsetT) *DictionaryEncoding { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &DictionaryEncoding{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedDictionaryEncodingBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *DictionaryEncoding) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *DictionaryEncoding) Table() flatbuffers.Table { + return rcv._tab +} + +/// The known dictionary id in the application where this data is used. In +/// the file or streaming formats, the dictionary ids are found in the +/// DictionaryBatch messages +func (rcv *DictionaryEncoding) Id() int64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.GetInt64(o + rcv._tab.Pos) + } + return 0 +} + +/// The known dictionary id in the application where this data is used. In +/// the file or streaming formats, the dictionary ids are found in the +/// DictionaryBatch messages +func (rcv *DictionaryEncoding) MutateId(n int64) bool { + return rcv._tab.MutateInt64Slot(4, n) +} + +/// The dictionary indices are constrained to be non-negative integers. If +/// this field is null, the indices must be signed int32. To maximize +/// cross-language compatibility and performance, implementations are +/// recommended to prefer signed integer types over unsigned integer types +/// and to avoid uint64 indices unless they are required by an application. +func (rcv *DictionaryEncoding) IndexType(obj *Int) *Int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(Int) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// The dictionary indices are constrained to be non-negative integers. If +/// this field is null, the indices must be signed int32. To maximize +/// cross-language compatibility and performance, implementations are +/// recommended to prefer signed integer types over unsigned integer types +/// and to avoid uint64 indices unless they are required by an application. +/// By default, dictionaries are not ordered, or the order does not have +/// semantic meaning. In some statistical, applications, dictionary-encoding +/// is used to represent ordered categorical data, and we provide a way to +/// preserve that metadata here +func (rcv *DictionaryEncoding) IsOrdered() bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + return rcv._tab.GetBool(o + rcv._tab.Pos) + } + return false +} + +/// By default, dictionaries are not ordered, or the order does not have +/// semantic meaning. In some statistical, applications, dictionary-encoding +/// is used to represent ordered categorical data, and we provide a way to +/// preserve that metadata here +func (rcv *DictionaryEncoding) MutateIsOrdered(n bool) bool { + return rcv._tab.MutateBoolSlot(8, n) +} + +func (rcv *DictionaryEncoding) DictionaryKind() DictionaryKind { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + return DictionaryKind(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *DictionaryEncoding) MutateDictionaryKind(n DictionaryKind) bool { + return rcv._tab.MutateInt16Slot(10, int16(n)) +} + +func DictionaryEncodingStart(builder *flatbuffers.Builder) { + builder.StartObject(4) +} +func DictionaryEncodingAddId(builder *flatbuffers.Builder, id int64) { + builder.PrependInt64Slot(0, id, 0) +} +func DictionaryEncodingAddIndexType(builder *flatbuffers.Builder, indexType flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(indexType), 0) +} +func DictionaryEncodingAddIsOrdered(builder *flatbuffers.Builder, isOrdered bool) { + builder.PrependBoolSlot(2, isOrdered, false) +} +func DictionaryEncodingAddDictionaryKind(builder *flatbuffers.Builder, dictionaryKind DictionaryKind) { + builder.PrependInt16Slot(3, int16(dictionaryKind), 0) +} +func DictionaryEncodingEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryKind.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryKind.go new file mode 100644 index 0000000000000..f1410f7795d2a --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/DictionaryKind.go @@ -0,0 +1,31 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +/// ---------------------------------------------------------------------- +/// Dictionary encoding metadata +/// Maintained for forwards compatibility, in the future +/// Dictionaries might be explicit maps between integers and values +/// allowing for non-contiguous index values +type DictionaryKind int16 + +const ( + DictionaryKindDenseArray DictionaryKind = 0 +) + +var EnumNamesDictionaryKind = map[DictionaryKind]string{ + DictionaryKindDenseArray: "DenseArray", +} + +var EnumValuesDictionaryKind = map[string]DictionaryKind{ + "DenseArray": DictionaryKindDenseArray, +} + +func (v DictionaryKind) String() string { + if s, ok := EnumNamesDictionaryKind[v]; ok { + return s + } + return "DictionaryKind(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Duration.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Duration.go new file mode 100644 index 0000000000000..47171eef60756 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Duration.go @@ -0,0 +1,64 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type Duration struct { + _tab flatbuffers.Table +} + +func GetRootAsDuration(buf []byte, offset flatbuffers.UOffsetT) *Duration { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Duration{} + x.Init(buf, n+offset) + return x +} + +func FinishDurationBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsDuration(buf []byte, offset flatbuffers.UOffsetT) *Duration { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Duration{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedDurationBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Duration) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Duration) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Duration) Unit() TimeUnit { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return TimeUnit(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 1 +} + +func (rcv *Duration) MutateUnit(n TimeUnit) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +func DurationStart(builder *flatbuffers.Builder) { + builder.StartObject(1) +} +func DurationAddUnit(builder *flatbuffers.Builder, unit TimeUnit) { + builder.PrependInt16Slot(0, int16(unit), 1) +} +func DurationEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Endianness.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Endianness.go new file mode 100644 index 0000000000000..c60821e4598e1 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Endianness.go @@ -0,0 +1,31 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +/// ---------------------------------------------------------------------- +/// Endianness of the platform producing the data +type Endianness int16 + +const ( + EndiannessLittle Endianness = 0 + EndiannessBig Endianness = 1 +) + +var EnumNamesEndianness = map[Endianness]string{ + EndiannessLittle: "Little", + EndiannessBig: "Big", +} + +var EnumValuesEndianness = map[string]Endianness{ + "Little": EndiannessLittle, + "Big": EndiannessBig, +} + +func (v Endianness) String() string { + if s, ok := EnumNamesEndianness[v]; ok { + return s + } + return "Endianness(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Feature.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Feature.go new file mode 100644 index 0000000000000..8fa217f35f149 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Feature.go @@ -0,0 +1,55 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +/// Represents Arrow Features that might not have full support +/// within implementations. This is intended to be used in +/// two scenarios: +/// 1. A mechanism for readers of Arrow Streams +/// and files to understand that the stream or file makes +/// use of a feature that isn't supported or unknown to +/// the implementation (and therefore can meet the Arrow +/// forward compatibility guarantees). +/// 2. A means of negotiating between a client and server +/// what features a stream is allowed to use. The enums +/// values here are intented to represent higher level +/// features, additional details maybe negotiated +/// with key-value pairs specific to the protocol. +/// +/// Enums added to this list should be assigned power-of-two values +/// to facilitate exchanging and comparing bitmaps for supported +/// features. +type Feature int64 + +const ( + /// Needed to make flatbuffers happy. + FeatureUNUSED Feature = 0 + /// The stream makes use of multiple full dictionaries with the + /// same ID and assumes clients implement dictionary replacement + /// correctly. + FeatureDICTIONARY_REPLACEMENT Feature = 1 + /// The stream makes use of compressed bodies as described + /// in Message.fbs. + FeatureCOMPRESSED_BODY Feature = 2 +) + +var EnumNamesFeature = map[Feature]string{ + FeatureUNUSED: "UNUSED", + FeatureDICTIONARY_REPLACEMENT: "DICTIONARY_REPLACEMENT", + FeatureCOMPRESSED_BODY: "COMPRESSED_BODY", +} + +var EnumValuesFeature = map[string]Feature{ + "UNUSED": FeatureUNUSED, + "DICTIONARY_REPLACEMENT": FeatureDICTIONARY_REPLACEMENT, + "COMPRESSED_BODY": FeatureCOMPRESSED_BODY, +} + +func (v Feature) String() string { + if s, ok := EnumNamesFeature[v]; ok { + return s + } + return "Feature(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Field.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Field.go new file mode 100644 index 0000000000000..ef31955a574fd --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Field.go @@ -0,0 +1,187 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// ---------------------------------------------------------------------- +/// A field represents a named column in a record / row batch or child of a +/// nested type. +type Field struct { + _tab flatbuffers.Table +} + +func GetRootAsField(buf []byte, offset flatbuffers.UOffsetT) *Field { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Field{} + x.Init(buf, n+offset) + return x +} + +func FinishFieldBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsField(buf []byte, offset flatbuffers.UOffsetT) *Field { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Field{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedFieldBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Field) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Field) Table() flatbuffers.Table { + return rcv._tab +} + +/// Name is not required, in i.e. a List +func (rcv *Field) Name() []byte { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.ByteVector(o + rcv._tab.Pos) + } + return nil +} + +/// Name is not required, in i.e. a List +/// Whether or not this field can contain nulls. Should be true in general. +func (rcv *Field) Nullable() bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.GetBool(o + rcv._tab.Pos) + } + return false +} + +/// Whether or not this field can contain nulls. Should be true in general. +func (rcv *Field) MutateNullable(n bool) bool { + return rcv._tab.MutateBoolSlot(6, n) +} + +func (rcv *Field) TypeType() Type { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + return Type(rcv._tab.GetByte(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *Field) MutateTypeType(n Type) bool { + return rcv._tab.MutateByteSlot(8, byte(n)) +} + +/// This is the type of the decoded value if the field is dictionary encoded. +func (rcv *Field) Type(obj *flatbuffers.Table) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + rcv._tab.Union(obj, o) + return true + } + return false +} + +/// This is the type of the decoded value if the field is dictionary encoded. +/// Present only if the field is dictionary encoded. +func (rcv *Field) Dictionary(obj *DictionaryEncoding) *DictionaryEncoding { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(DictionaryEncoding) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// Present only if the field is dictionary encoded. +/// children apply only to nested data types like Struct, List and Union. For +/// primitive types children will have length 0. +func (rcv *Field) Children(obj *Field, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 4 + x = rcv._tab.Indirect(x) + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *Field) ChildrenLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// children apply only to nested data types like Struct, List and Union. For +/// primitive types children will have length 0. +/// User-defined metadata +func (rcv *Field) CustomMetadata(obj *KeyValue, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 4 + x = rcv._tab.Indirect(x) + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *Field) CustomMetadataLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// User-defined metadata +func FieldStart(builder *flatbuffers.Builder) { + builder.StartObject(7) +} +func FieldAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0) +} +func FieldAddNullable(builder *flatbuffers.Builder, nullable bool) { + builder.PrependBoolSlot(1, nullable, false) +} +func FieldAddTypeType(builder *flatbuffers.Builder, typeType Type) { + builder.PrependByteSlot(2, byte(typeType), 0) +} +func FieldAddType(builder *flatbuffers.Builder, type_ flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(type_), 0) +} +func FieldAddDictionary(builder *flatbuffers.Builder, dictionary flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(dictionary), 0) +} +func FieldAddChildren(builder *flatbuffers.Builder, children flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(children), 0) +} +func FieldStartChildrenVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func FieldAddCustomMetadata(builder *flatbuffers.Builder, customMetadata flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(6, flatbuffers.UOffsetT(customMetadata), 0) +} +func FieldStartCustomMetadataVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func FieldEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/FieldNode.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/FieldNode.go new file mode 100644 index 0000000000000..e379fc610d397 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/FieldNode.go @@ -0,0 +1,60 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// ---------------------------------------------------------------------- +/// Data structures for describing a table row batch (a collection of +/// equal-length Arrow arrays) +/// Metadata about a field at some level of a nested type tree (but not +/// its children). +/// +/// For example, a List with values `[[1, 2, 3], null, [4], [5, 6], null]` +/// would have {length: 5, null_count: 2} for its List node, and {length: 6, +/// null_count: 0} for its Int16 node, as separate FieldNode structs +type FieldNode struct { + _tab flatbuffers.Struct +} + +func (rcv *FieldNode) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *FieldNode) Table() flatbuffers.Table { + return rcv._tab.Table +} + +/// The number of value slots in the Arrow array at this level of a nested +/// tree +func (rcv *FieldNode) Length() int64 { + return rcv._tab.GetInt64(rcv._tab.Pos + flatbuffers.UOffsetT(0)) +} +/// The number of value slots in the Arrow array at this level of a nested +/// tree +func (rcv *FieldNode) MutateLength(n int64) bool { + return rcv._tab.MutateInt64(rcv._tab.Pos+flatbuffers.UOffsetT(0), n) +} + +/// The number of observed nulls. Fields with null_count == 0 may choose not +/// to write their physical validity bitmap out as a materialized buffer, +/// instead setting the length of the bitmap buffer to 0. +func (rcv *FieldNode) NullCount() int64 { + return rcv._tab.GetInt64(rcv._tab.Pos + flatbuffers.UOffsetT(8)) +} +/// The number of observed nulls. Fields with null_count == 0 may choose not +/// to write their physical validity bitmap out as a materialized buffer, +/// instead setting the length of the bitmap buffer to 0. +func (rcv *FieldNode) MutateNullCount(n int64) bool { + return rcv._tab.MutateInt64(rcv._tab.Pos+flatbuffers.UOffsetT(8), n) +} + +func CreateFieldNode(builder *flatbuffers.Builder, length int64, nullCount int64) flatbuffers.UOffsetT { + builder.Prep(8, 16) + builder.PrependInt64(nullCount) + builder.PrependInt64(length) + return builder.Offset() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/FixedSizeBinary.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/FixedSizeBinary.go new file mode 100644 index 0000000000000..52e3f220e6472 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/FixedSizeBinary.go @@ -0,0 +1,66 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type FixedSizeBinary struct { + _tab flatbuffers.Table +} + +func GetRootAsFixedSizeBinary(buf []byte, offset flatbuffers.UOffsetT) *FixedSizeBinary { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &FixedSizeBinary{} + x.Init(buf, n+offset) + return x +} + +func FinishFixedSizeBinaryBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsFixedSizeBinary(buf []byte, offset flatbuffers.UOffsetT) *FixedSizeBinary { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &FixedSizeBinary{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedFixedSizeBinaryBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *FixedSizeBinary) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *FixedSizeBinary) Table() flatbuffers.Table { + return rcv._tab +} + +/// Number of bytes per value +func (rcv *FixedSizeBinary) ByteWidth() int32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.GetInt32(o + rcv._tab.Pos) + } + return 0 +} + +/// Number of bytes per value +func (rcv *FixedSizeBinary) MutateByteWidth(n int32) bool { + return rcv._tab.MutateInt32Slot(4, n) +} + +func FixedSizeBinaryStart(builder *flatbuffers.Builder) { + builder.StartObject(1) +} +func FixedSizeBinaryAddByteWidth(builder *flatbuffers.Builder, byteWidth int32) { + builder.PrependInt32Slot(0, byteWidth, 0) +} +func FixedSizeBinaryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/FixedSizeList.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/FixedSizeList.go new file mode 100644 index 0000000000000..043a1f385f79e --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/FixedSizeList.go @@ -0,0 +1,66 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type FixedSizeList struct { + _tab flatbuffers.Table +} + +func GetRootAsFixedSizeList(buf []byte, offset flatbuffers.UOffsetT) *FixedSizeList { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &FixedSizeList{} + x.Init(buf, n+offset) + return x +} + +func FinishFixedSizeListBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsFixedSizeList(buf []byte, offset flatbuffers.UOffsetT) *FixedSizeList { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &FixedSizeList{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedFixedSizeListBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *FixedSizeList) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *FixedSizeList) Table() flatbuffers.Table { + return rcv._tab +} + +/// Number of list items per value +func (rcv *FixedSizeList) ListSize() int32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.GetInt32(o + rcv._tab.Pos) + } + return 0 +} + +/// Number of list items per value +func (rcv *FixedSizeList) MutateListSize(n int32) bool { + return rcv._tab.MutateInt32Slot(4, n) +} + +func FixedSizeListStart(builder *flatbuffers.Builder) { + builder.StartObject(1) +} +func FixedSizeListAddListSize(builder *flatbuffers.Builder, listSize int32) { + builder.PrependInt32Slot(0, listSize, 0) +} +func FixedSizeListEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/FloatingPoint.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/FloatingPoint.go new file mode 100644 index 0000000000000..341d4e91d1596 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/FloatingPoint.go @@ -0,0 +1,64 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type FloatingPoint struct { + _tab flatbuffers.Table +} + +func GetRootAsFloatingPoint(buf []byte, offset flatbuffers.UOffsetT) *FloatingPoint { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &FloatingPoint{} + x.Init(buf, n+offset) + return x +} + +func FinishFloatingPointBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsFloatingPoint(buf []byte, offset flatbuffers.UOffsetT) *FloatingPoint { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &FloatingPoint{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedFloatingPointBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *FloatingPoint) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *FloatingPoint) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *FloatingPoint) Precision() Precision { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return Precision(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *FloatingPoint) MutatePrecision(n Precision) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +func FloatingPointStart(builder *flatbuffers.Builder) { + builder.StartObject(1) +} +func FloatingPointAddPrecision(builder *flatbuffers.Builder, precision Precision) { + builder.PrependInt16Slot(0, int16(precision), 0) +} +func FloatingPointEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Footer.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Footer.go new file mode 100644 index 0000000000000..f0937d91a0948 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Footer.go @@ -0,0 +1,161 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// ---------------------------------------------------------------------- +/// Arrow File metadata +/// +type Footer struct { + _tab flatbuffers.Table +} + +func GetRootAsFooter(buf []byte, offset flatbuffers.UOffsetT) *Footer { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Footer{} + x.Init(buf, n+offset) + return x +} + +func FinishFooterBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsFooter(buf []byte, offset flatbuffers.UOffsetT) *Footer { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Footer{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedFooterBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Footer) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Footer) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Footer) Version() MetadataVersion { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return MetadataVersion(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *Footer) MutateVersion(n MetadataVersion) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +func (rcv *Footer) Schema(obj *Schema) *Schema { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(Schema) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +func (rcv *Footer) Dictionaries(obj *Block, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 24 + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *Footer) DictionariesLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +func (rcv *Footer) RecordBatches(obj *Block, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 24 + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *Footer) RecordBatchesLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// User-defined metadata +func (rcv *Footer) CustomMetadata(obj *KeyValue, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 4 + x = rcv._tab.Indirect(x) + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *Footer) CustomMetadataLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// User-defined metadata +func FooterStart(builder *flatbuffers.Builder) { + builder.StartObject(5) +} +func FooterAddVersion(builder *flatbuffers.Builder, version MetadataVersion) { + builder.PrependInt16Slot(0, int16(version), 0) +} +func FooterAddSchema(builder *flatbuffers.Builder, schema flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(schema), 0) +} +func FooterAddDictionaries(builder *flatbuffers.Builder, dictionaries flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(dictionaries), 0) +} +func FooterStartDictionariesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(24, numElems, 8) +} +func FooterAddRecordBatches(builder *flatbuffers.Builder, recordBatches flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(recordBatches), 0) +} +func FooterStartRecordBatchesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(24, numElems, 8) +} +func FooterAddCustomMetadata(builder *flatbuffers.Builder, customMetadata flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(customMetadata), 0) +} +func FooterStartCustomMetadataVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func FooterEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Int.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Int.go new file mode 100644 index 0000000000000..b24e5f128fcd0 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Int.go @@ -0,0 +1,79 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type Int struct { + _tab flatbuffers.Table +} + +func GetRootAsInt(buf []byte, offset flatbuffers.UOffsetT) *Int { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Int{} + x.Init(buf, n+offset) + return x +} + +func FinishIntBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsInt(buf []byte, offset flatbuffers.UOffsetT) *Int { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Int{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedIntBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Int) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Int) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Int) BitWidth() int32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.GetInt32(o + rcv._tab.Pos) + } + return 0 +} + +func (rcv *Int) MutateBitWidth(n int32) bool { + return rcv._tab.MutateInt32Slot(4, n) +} + +func (rcv *Int) IsSigned() bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.GetBool(o + rcv._tab.Pos) + } + return false +} + +func (rcv *Int) MutateIsSigned(n bool) bool { + return rcv._tab.MutateBoolSlot(6, n) +} + +func IntStart(builder *flatbuffers.Builder) { + builder.StartObject(2) +} +func IntAddBitWidth(builder *flatbuffers.Builder, bitWidth int32) { + builder.PrependInt32Slot(0, bitWidth, 0) +} +func IntAddIsSigned(builder *flatbuffers.Builder, isSigned bool) { + builder.PrependBoolSlot(1, isSigned, false) +} +func IntEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Interval.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Interval.go new file mode 100644 index 0000000000000..c11023e398027 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Interval.go @@ -0,0 +1,64 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type Interval struct { + _tab flatbuffers.Table +} + +func GetRootAsInterval(buf []byte, offset flatbuffers.UOffsetT) *Interval { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Interval{} + x.Init(buf, n+offset) + return x +} + +func FinishIntervalBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsInterval(buf []byte, offset flatbuffers.UOffsetT) *Interval { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Interval{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedIntervalBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Interval) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Interval) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Interval) Unit() IntervalUnit { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return IntervalUnit(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *Interval) MutateUnit(n IntervalUnit) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +func IntervalStart(builder *flatbuffers.Builder) { + builder.StartObject(1) +} +func IntervalAddUnit(builder *flatbuffers.Builder, unit IntervalUnit) { + builder.PrependInt16Slot(0, int16(unit), 0) +} +func IntervalEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/IntervalUnit.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/IntervalUnit.go new file mode 100644 index 0000000000000..698bbffc8f6c8 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/IntervalUnit.go @@ -0,0 +1,32 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +type IntervalUnit int16 + +const ( + IntervalUnitYEAR_MONTH IntervalUnit = 0 + IntervalUnitDAY_TIME IntervalUnit = 1 + IntervalUnitMONTH_DAY_NANO IntervalUnit = 2 +) + +var EnumNamesIntervalUnit = map[IntervalUnit]string{ + IntervalUnitYEAR_MONTH: "YEAR_MONTH", + IntervalUnitDAY_TIME: "DAY_TIME", + IntervalUnitMONTH_DAY_NANO: "MONTH_DAY_NANO", +} + +var EnumValuesIntervalUnit = map[string]IntervalUnit{ + "YEAR_MONTH": IntervalUnitYEAR_MONTH, + "DAY_TIME": IntervalUnitDAY_TIME, + "MONTH_DAY_NANO": IntervalUnitMONTH_DAY_NANO, +} + +func (v IntervalUnit) String() string { + if s, ok := EnumNamesIntervalUnit[v]; ok { + return s + } + return "IntervalUnit(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/KeyValue.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/KeyValue.go new file mode 100644 index 0000000000000..39e79e319867d --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/KeyValue.go @@ -0,0 +1,74 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// ---------------------------------------------------------------------- +/// user defined key value pairs to add custom metadata to arrow +/// key namespacing is the responsibility of the user +type KeyValue struct { + _tab flatbuffers.Table +} + +func GetRootAsKeyValue(buf []byte, offset flatbuffers.UOffsetT) *KeyValue { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &KeyValue{} + x.Init(buf, n+offset) + return x +} + +func FinishKeyValueBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsKeyValue(buf []byte, offset flatbuffers.UOffsetT) *KeyValue { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &KeyValue{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedKeyValueBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *KeyValue) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *KeyValue) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *KeyValue) Key() []byte { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.ByteVector(o + rcv._tab.Pos) + } + return nil +} + +func (rcv *KeyValue) Value() []byte { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.ByteVector(o + rcv._tab.Pos) + } + return nil +} + +func KeyValueStart(builder *flatbuffers.Builder) { + builder.StartObject(2) +} +func KeyValueAddKey(builder *flatbuffers.Builder, key flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(key), 0) +} +func KeyValueAddValue(builder *flatbuffers.Builder, value flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(value), 0) +} +func KeyValueEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeBinary.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeBinary.go new file mode 100644 index 0000000000000..988d7a4837457 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeBinary.go @@ -0,0 +1,51 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Same as Binary, but with 64-bit offsets, allowing to represent +/// extremely large data values. +type LargeBinary struct { + _tab flatbuffers.Table +} + +func GetRootAsLargeBinary(buf []byte, offset flatbuffers.UOffsetT) *LargeBinary { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &LargeBinary{} + x.Init(buf, n+offset) + return x +} + +func FinishLargeBinaryBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsLargeBinary(buf []byte, offset flatbuffers.UOffsetT) *LargeBinary { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &LargeBinary{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedLargeBinaryBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *LargeBinary) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *LargeBinary) Table() flatbuffers.Table { + return rcv._tab +} + +func LargeBinaryStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func LargeBinaryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeList.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeList.go new file mode 100644 index 0000000000000..d036616c5a843 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeList.go @@ -0,0 +1,51 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Same as List, but with 64-bit offsets, allowing to represent +/// extremely large data values. +type LargeList struct { + _tab flatbuffers.Table +} + +func GetRootAsLargeList(buf []byte, offset flatbuffers.UOffsetT) *LargeList { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &LargeList{} + x.Init(buf, n+offset) + return x +} + +func FinishLargeListBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsLargeList(buf []byte, offset flatbuffers.UOffsetT) *LargeList { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &LargeList{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedLargeListBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *LargeList) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *LargeList) Table() flatbuffers.Table { + return rcv._tab +} + +func LargeListStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func LargeListEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeListView.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeListView.go new file mode 100644 index 0000000000000..0153f3c178a38 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeListView.go @@ -0,0 +1,51 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Same as ListView, but with 64-bit offsets and sizes, allowing to represent +/// extremely large data values. +type LargeListView struct { + _tab flatbuffers.Table +} + +func GetRootAsLargeListView(buf []byte, offset flatbuffers.UOffsetT) *LargeListView { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &LargeListView{} + x.Init(buf, n+offset) + return x +} + +func FinishLargeListViewBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsLargeListView(buf []byte, offset flatbuffers.UOffsetT) *LargeListView { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &LargeListView{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedLargeListViewBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *LargeListView) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *LargeListView) Table() flatbuffers.Table { + return rcv._tab +} + +func LargeListViewStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func LargeListViewEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeUtf8.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeUtf8.go new file mode 100644 index 0000000000000..1c43b25b3fbdf --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/LargeUtf8.go @@ -0,0 +1,51 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Same as Utf8, but with 64-bit offsets, allowing to represent +/// extremely large data values. +type LargeUtf8 struct { + _tab flatbuffers.Table +} + +func GetRootAsLargeUtf8(buf []byte, offset flatbuffers.UOffsetT) *LargeUtf8 { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &LargeUtf8{} + x.Init(buf, n+offset) + return x +} + +func FinishLargeUtf8Buffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsLargeUtf8(buf []byte, offset flatbuffers.UOffsetT) *LargeUtf8 { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &LargeUtf8{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedLargeUtf8Buffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *LargeUtf8) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *LargeUtf8) Table() flatbuffers.Table { + return rcv._tab +} + +func LargeUtf8Start(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func LargeUtf8End(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/List.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/List.go new file mode 100644 index 0000000000000..c46c9c6e30147 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/List.go @@ -0,0 +1,49 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type List struct { + _tab flatbuffers.Table +} + +func GetRootAsList(buf []byte, offset flatbuffers.UOffsetT) *List { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &List{} + x.Init(buf, n+offset) + return x +} + +func FinishListBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsList(buf []byte, offset flatbuffers.UOffsetT) *List { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &List{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedListBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *List) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *List) Table() flatbuffers.Table { + return rcv._tab +} + +func ListStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func ListEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/ListView.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/ListView.go new file mode 100644 index 0000000000000..e0f0d0786c1b6 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/ListView.go @@ -0,0 +1,52 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Represents the same logical types that List can, but contains offsets and +/// sizes allowing for writes in any order and sharing of child values among +/// list values. +type ListView struct { + _tab flatbuffers.Table +} + +func GetRootAsListView(buf []byte, offset flatbuffers.UOffsetT) *ListView { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &ListView{} + x.Init(buf, n+offset) + return x +} + +func FinishListViewBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsListView(buf []byte, offset flatbuffers.UOffsetT) *ListView { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &ListView{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedListViewBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *ListView) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *ListView) Table() flatbuffers.Table { + return rcv._tab +} + +func ListViewStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func ListViewEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Map.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Map.go new file mode 100644 index 0000000000000..ffde0a40abc3e --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Map.go @@ -0,0 +1,91 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// A Map is a logical nested type that is represented as +/// +/// List> +/// +/// In this layout, the keys and values are each respectively contiguous. We do +/// not constrain the key and value types, so the application is responsible +/// for ensuring that the keys are hashable and unique. Whether the keys are sorted +/// may be set in the metadata for this field. +/// +/// In a field with Map type, the field has a child Struct field, which then +/// has two children: key type and the second the value type. The names of the +/// child fields may be respectively "entries", "key", and "value", but this is +/// not enforced. +/// +/// Map +/// ```text +/// - child[0] entries: Struct +/// - child[0] key: K +/// - child[1] value: V +/// ``` +/// Neither the "entries" field nor the "key" field may be nullable. +/// +/// The metadata is structured so that Arrow systems without special handling +/// for Map can make Map an alias for List. The "layout" attribute for the Map +/// field must have the same contents as a List. +type Map struct { + _tab flatbuffers.Table +} + +func GetRootAsMap(buf []byte, offset flatbuffers.UOffsetT) *Map { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Map{} + x.Init(buf, n+offset) + return x +} + +func FinishMapBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsMap(buf []byte, offset flatbuffers.UOffsetT) *Map { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Map{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedMapBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Map) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Map) Table() flatbuffers.Table { + return rcv._tab +} + +/// Set to true if the keys within each value are sorted +func (rcv *Map) KeysSorted() bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.GetBool(o + rcv._tab.Pos) + } + return false +} + +/// Set to true if the keys within each value are sorted +func (rcv *Map) MutateKeysSorted(n bool) bool { + return rcv._tab.MutateBoolSlot(4, n) +} + +func MapStart(builder *flatbuffers.Builder) { + builder.StartObject(1) +} +func MapAddKeysSorted(builder *flatbuffers.Builder, keysSorted bool) { + builder.PrependBoolSlot(0, keysSorted, false) +} +func MapEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Message.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Message.go new file mode 100644 index 0000000000000..803c68294c299 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Message.go @@ -0,0 +1,132 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type Message struct { + _tab flatbuffers.Table +} + +func GetRootAsMessage(buf []byte, offset flatbuffers.UOffsetT) *Message { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Message{} + x.Init(buf, n+offset) + return x +} + +func FinishMessageBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsMessage(buf []byte, offset flatbuffers.UOffsetT) *Message { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Message{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedMessageBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Message) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Message) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Message) Version() MetadataVersion { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return MetadataVersion(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *Message) MutateVersion(n MetadataVersion) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +func (rcv *Message) HeaderType() MessageHeader { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return MessageHeader(rcv._tab.GetByte(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *Message) MutateHeaderType(n MessageHeader) bool { + return rcv._tab.MutateByteSlot(6, byte(n)) +} + +func (rcv *Message) Header(obj *flatbuffers.Table) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + rcv._tab.Union(obj, o) + return true + } + return false +} + +func (rcv *Message) BodyLength() int64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + return rcv._tab.GetInt64(o + rcv._tab.Pos) + } + return 0 +} + +func (rcv *Message) MutateBodyLength(n int64) bool { + return rcv._tab.MutateInt64Slot(10, n) +} + +func (rcv *Message) CustomMetadata(obj *KeyValue, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 4 + x = rcv._tab.Indirect(x) + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *Message) CustomMetadataLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +func MessageStart(builder *flatbuffers.Builder) { + builder.StartObject(5) +} +func MessageAddVersion(builder *flatbuffers.Builder, version MetadataVersion) { + builder.PrependInt16Slot(0, int16(version), 0) +} +func MessageAddHeaderType(builder *flatbuffers.Builder, headerType MessageHeader) { + builder.PrependByteSlot(1, byte(headerType), 0) +} +func MessageAddHeader(builder *flatbuffers.Builder, header flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(header), 0) +} +func MessageAddBodyLength(builder *flatbuffers.Builder, bodyLength int64) { + builder.PrependInt64Slot(3, bodyLength, 0) +} +func MessageAddCustomMetadata(builder *flatbuffers.Builder, customMetadata flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(customMetadata), 0) +} +func MessageStartCustomMetadataVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func MessageEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/MessageHeader.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/MessageHeader.go new file mode 100644 index 0000000000000..36c07c792b553 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/MessageHeader.go @@ -0,0 +1,49 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +/// ---------------------------------------------------------------------- +/// The root Message type +/// This union enables us to easily send different message types without +/// redundant storage, and in the future we can easily add new message types. +/// +/// Arrow implementations do not need to implement all of the message types, +/// which may include experimental metadata types. For maximum compatibility, +/// it is best to send data using RecordBatch +type MessageHeader byte + +const ( + MessageHeaderNONE MessageHeader = 0 + MessageHeaderSchema MessageHeader = 1 + MessageHeaderDictionaryBatch MessageHeader = 2 + MessageHeaderRecordBatch MessageHeader = 3 + MessageHeaderTensor MessageHeader = 4 + MessageHeaderSparseTensor MessageHeader = 5 +) + +var EnumNamesMessageHeader = map[MessageHeader]string{ + MessageHeaderNONE: "NONE", + MessageHeaderSchema: "Schema", + MessageHeaderDictionaryBatch: "DictionaryBatch", + MessageHeaderRecordBatch: "RecordBatch", + MessageHeaderTensor: "Tensor", + MessageHeaderSparseTensor: "SparseTensor", +} + +var EnumValuesMessageHeader = map[string]MessageHeader{ + "NONE": MessageHeaderNONE, + "Schema": MessageHeaderSchema, + "DictionaryBatch": MessageHeaderDictionaryBatch, + "RecordBatch": MessageHeaderRecordBatch, + "Tensor": MessageHeaderTensor, + "SparseTensor": MessageHeaderSparseTensor, +} + +func (v MessageHeader) String() string { + if s, ok := EnumNamesMessageHeader[v]; ok { + return s + } + return "MessageHeader(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/MetadataVersion.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/MetadataVersion.go new file mode 100644 index 0000000000000..8477ece9bda3e --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/MetadataVersion.go @@ -0,0 +1,49 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +type MetadataVersion int16 + +const ( + /// 0.1.0 (October 2016). + MetadataVersionV1 MetadataVersion = 0 + /// 0.2.0 (February 2017). Non-backwards compatible with V1. + MetadataVersionV2 MetadataVersion = 1 + /// 0.3.0 -> 0.7.1 (May - December 2017). Non-backwards compatible with V2. + MetadataVersionV3 MetadataVersion = 2 + /// >= 0.8.0 (December 2017). Non-backwards compatible with V3. + MetadataVersionV4 MetadataVersion = 3 + /// >= 1.0.0 (July 2020). Backwards compatible with V4 (V5 readers can read V4 + /// metadata and IPC messages). Implementations are recommended to provide a + /// V4 compatibility mode with V5 format changes disabled. + /// + /// Incompatible changes between V4 and V5: + /// - Union buffer layout has changed. In V5, Unions don't have a validity + /// bitmap buffer. + MetadataVersionV5 MetadataVersion = 4 +) + +var EnumNamesMetadataVersion = map[MetadataVersion]string{ + MetadataVersionV1: "V1", + MetadataVersionV2: "V2", + MetadataVersionV3: "V3", + MetadataVersionV4: "V4", + MetadataVersionV5: "V5", +} + +var EnumValuesMetadataVersion = map[string]MetadataVersion{ + "V1": MetadataVersionV1, + "V2": MetadataVersionV2, + "V3": MetadataVersionV3, + "V4": MetadataVersionV4, + "V5": MetadataVersionV5, +} + +func (v MetadataVersion) String() string { + if s, ok := EnumNamesMetadataVersion[v]; ok { + return s + } + return "MetadataVersion(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Null.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Null.go new file mode 100644 index 0000000000000..ab340727fcbef --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Null.go @@ -0,0 +1,50 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// These are stored in the flatbuffer in the Type union below +type Null struct { + _tab flatbuffers.Table +} + +func GetRootAsNull(buf []byte, offset flatbuffers.UOffsetT) *Null { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Null{} + x.Init(buf, n+offset) + return x +} + +func FinishNullBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsNull(buf []byte, offset flatbuffers.UOffsetT) *Null { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Null{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedNullBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Null) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Null) Table() flatbuffers.Table { + return rcv._tab +} + +func NullStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func NullEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Precision.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Precision.go new file mode 100644 index 0000000000000..572df89e41f58 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Precision.go @@ -0,0 +1,32 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +type Precision int16 + +const ( + PrecisionHALF Precision = 0 + PrecisionSINGLE Precision = 1 + PrecisionDOUBLE Precision = 2 +) + +var EnumNamesPrecision = map[Precision]string{ + PrecisionHALF: "HALF", + PrecisionSINGLE: "SINGLE", + PrecisionDOUBLE: "DOUBLE", +} + +var EnumValuesPrecision = map[string]Precision{ + "HALF": PrecisionHALF, + "SINGLE": PrecisionSINGLE, + "DOUBLE": PrecisionDOUBLE, +} + +func (v Precision) String() string { + if s, ok := EnumNamesPrecision[v]; ok { + return s + } + return "Precision(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/RecordBatch.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/RecordBatch.go new file mode 100644 index 0000000000000..49093bf66d5d7 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/RecordBatch.go @@ -0,0 +1,213 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// A data header describing the shared memory layout of a "record" or "row" +/// batch. Some systems call this a "row batch" internally and others a "record +/// batch". +type RecordBatch struct { + _tab flatbuffers.Table +} + +func GetRootAsRecordBatch(buf []byte, offset flatbuffers.UOffsetT) *RecordBatch { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &RecordBatch{} + x.Init(buf, n+offset) + return x +} + +func FinishRecordBatchBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsRecordBatch(buf []byte, offset flatbuffers.UOffsetT) *RecordBatch { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &RecordBatch{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedRecordBatchBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *RecordBatch) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *RecordBatch) Table() flatbuffers.Table { + return rcv._tab +} + +/// number of records / rows. The arrays in the batch should all have this +/// length +func (rcv *RecordBatch) Length() int64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.GetInt64(o + rcv._tab.Pos) + } + return 0 +} + +/// number of records / rows. The arrays in the batch should all have this +/// length +func (rcv *RecordBatch) MutateLength(n int64) bool { + return rcv._tab.MutateInt64Slot(4, n) +} + +/// Nodes correspond to the pre-ordered flattened logical schema +func (rcv *RecordBatch) Nodes(obj *FieldNode, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 16 + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *RecordBatch) NodesLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// Nodes correspond to the pre-ordered flattened logical schema +/// Buffers correspond to the pre-ordered flattened buffer tree +/// +/// The number of buffers appended to this list depends on the schema. For +/// example, most primitive arrays will have 2 buffers, 1 for the validity +/// bitmap and 1 for the values. For struct arrays, there will only be a +/// single buffer for the validity (nulls) bitmap +func (rcv *RecordBatch) Buffers(obj *Buffer, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 16 + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *RecordBatch) BuffersLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// Buffers correspond to the pre-ordered flattened buffer tree +/// +/// The number of buffers appended to this list depends on the schema. For +/// example, most primitive arrays will have 2 buffers, 1 for the validity +/// bitmap and 1 for the values. For struct arrays, there will only be a +/// single buffer for the validity (nulls) bitmap +/// Optional compression of the message body +func (rcv *RecordBatch) Compression(obj *BodyCompression) *BodyCompression { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(BodyCompression) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// Optional compression of the message body +/// Some types such as Utf8View are represented using a variable number of buffers. +/// For each such Field in the pre-ordered flattened logical schema, there will be +/// an entry in variadicBufferCounts to indicate the number of number of variadic +/// buffers which belong to that Field in the current RecordBatch. +/// +/// For example, the schema +/// col1: Struct +/// col2: Utf8View +/// contains two Fields with variadic buffers so variadicBufferCounts will have +/// two entries, the first counting the variadic buffers of `col1.beta` and the +/// second counting `col2`'s. +/// +/// This field may be omitted if and only if the schema contains no Fields with +/// a variable number of buffers, such as BinaryView and Utf8View. +func (rcv *RecordBatch) VariadicBufferCounts(j int) int64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.GetInt64(a + flatbuffers.UOffsetT(j*8)) + } + return 0 +} + +func (rcv *RecordBatch) VariadicBufferCountsLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// Some types such as Utf8View are represented using a variable number of buffers. +/// For each such Field in the pre-ordered flattened logical schema, there will be +/// an entry in variadicBufferCounts to indicate the number of number of variadic +/// buffers which belong to that Field in the current RecordBatch. +/// +/// For example, the schema +/// col1: Struct +/// col2: Utf8View +/// contains two Fields with variadic buffers so variadicBufferCounts will have +/// two entries, the first counting the variadic buffers of `col1.beta` and the +/// second counting `col2`'s. +/// +/// This field may be omitted if and only if the schema contains no Fields with +/// a variable number of buffers, such as BinaryView and Utf8View. +func (rcv *RecordBatch) MutateVariadicBufferCounts(j int, n int64) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.MutateInt64(a+flatbuffers.UOffsetT(j*8), n) + } + return false +} + +func RecordBatchStart(builder *flatbuffers.Builder) { + builder.StartObject(5) +} +func RecordBatchAddLength(builder *flatbuffers.Builder, length int64) { + builder.PrependInt64Slot(0, length, 0) +} +func RecordBatchAddNodes(builder *flatbuffers.Builder, nodes flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(nodes), 0) +} +func RecordBatchStartNodesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(16, numElems, 8) +} +func RecordBatchAddBuffers(builder *flatbuffers.Builder, buffers flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(buffers), 0) +} +func RecordBatchStartBuffersVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(16, numElems, 8) +} +func RecordBatchAddCompression(builder *flatbuffers.Builder, compression flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(compression), 0) +} +func RecordBatchAddVariadicBufferCounts(builder *flatbuffers.Builder, variadicBufferCounts flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(variadicBufferCounts), 0) +} +func RecordBatchStartVariadicBufferCountsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(8, numElems, 8) +} +func RecordBatchEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/RunEndEncoded.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/RunEndEncoded.go new file mode 100644 index 0000000000000..626c75d3ea32c --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/RunEndEncoded.go @@ -0,0 +1,54 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Contains two child arrays, run_ends and values. +/// The run_ends child array must be a 16/32/64-bit integer array +/// which encodes the indices at which the run with the value in +/// each corresponding index in the values child array ends. +/// Like list/struct types, the value array can be of any type. +type RunEndEncoded struct { + _tab flatbuffers.Table +} + +func GetRootAsRunEndEncoded(buf []byte, offset flatbuffers.UOffsetT) *RunEndEncoded { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &RunEndEncoded{} + x.Init(buf, n+offset) + return x +} + +func FinishRunEndEncodedBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsRunEndEncoded(buf []byte, offset flatbuffers.UOffsetT) *RunEndEncoded { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &RunEndEncoded{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedRunEndEncodedBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *RunEndEncoded) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *RunEndEncoded) Table() flatbuffers.Table { + return rcv._tab +} + +func RunEndEncodedStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func RunEndEncodedEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Schema.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Schema.go new file mode 100644 index 0000000000000..1e511950e00ab --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Schema.go @@ -0,0 +1,158 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// ---------------------------------------------------------------------- +/// A Schema describes the columns in a row batch +type Schema struct { + _tab flatbuffers.Table +} + +func GetRootAsSchema(buf []byte, offset flatbuffers.UOffsetT) *Schema { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Schema{} + x.Init(buf, n+offset) + return x +} + +func FinishSchemaBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsSchema(buf []byte, offset flatbuffers.UOffsetT) *Schema { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Schema{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedSchemaBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Schema) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Schema) Table() flatbuffers.Table { + return rcv._tab +} + +/// endianness of the buffer +/// it is Little Endian by default +/// if endianness doesn't match the underlying system then the vectors need to be converted +func (rcv *Schema) Endianness() Endianness { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return Endianness(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 0 +} + +/// endianness of the buffer +/// it is Little Endian by default +/// if endianness doesn't match the underlying system then the vectors need to be converted +func (rcv *Schema) MutateEndianness(n Endianness) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +func (rcv *Schema) Fields(obj *Field, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 4 + x = rcv._tab.Indirect(x) + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *Schema) FieldsLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +func (rcv *Schema) CustomMetadata(obj *KeyValue, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 4 + x = rcv._tab.Indirect(x) + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *Schema) CustomMetadataLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// Features used in the stream/file. +func (rcv *Schema) Features(j int) Feature { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + a := rcv._tab.Vector(o) + return Feature(rcv._tab.GetInt64(a + flatbuffers.UOffsetT(j*8))) + } + return 0 +} + +func (rcv *Schema) FeaturesLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// Features used in the stream/file. +func (rcv *Schema) MutateFeatures(j int, n Feature) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.MutateInt64(a+flatbuffers.UOffsetT(j*8), int64(n)) + } + return false +} + +func SchemaStart(builder *flatbuffers.Builder) { + builder.StartObject(4) +} +func SchemaAddEndianness(builder *flatbuffers.Builder, endianness Endianness) { + builder.PrependInt16Slot(0, int16(endianness), 0) +} +func SchemaAddFields(builder *flatbuffers.Builder, fields flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(fields), 0) +} +func SchemaStartFieldsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func SchemaAddCustomMetadata(builder *flatbuffers.Builder, customMetadata flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(customMetadata), 0) +} +func SchemaStartCustomMetadataVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func SchemaAddFeatures(builder *flatbuffers.Builder, features flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(features), 0) +} +func SchemaStartFeaturesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(8, numElems, 8) +} +func SchemaEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseMatrixCompressedAxis.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseMatrixCompressedAxis.go new file mode 100644 index 0000000000000..c1d6d0db06475 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseMatrixCompressedAxis.go @@ -0,0 +1,29 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +type SparseMatrixCompressedAxis int16 + +const ( + SparseMatrixCompressedAxisRow SparseMatrixCompressedAxis = 0 + SparseMatrixCompressedAxisColumn SparseMatrixCompressedAxis = 1 +) + +var EnumNamesSparseMatrixCompressedAxis = map[SparseMatrixCompressedAxis]string{ + SparseMatrixCompressedAxisRow: "Row", + SparseMatrixCompressedAxisColumn: "Column", +} + +var EnumValuesSparseMatrixCompressedAxis = map[string]SparseMatrixCompressedAxis{ + "Row": SparseMatrixCompressedAxisRow, + "Column": SparseMatrixCompressedAxisColumn, +} + +func (v SparseMatrixCompressedAxis) String() string { + if s, ok := EnumNamesSparseMatrixCompressedAxis[v]; ok { + return s + } + return "SparseMatrixCompressedAxis(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseMatrixIndexCSX.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseMatrixIndexCSX.go new file mode 100644 index 0000000000000..0d12cc99458d1 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseMatrixIndexCSX.go @@ -0,0 +1,199 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Compressed Sparse format, that is matrix-specific. +type SparseMatrixIndexCSX struct { + _tab flatbuffers.Table +} + +func GetRootAsSparseMatrixIndexCSX(buf []byte, offset flatbuffers.UOffsetT) *SparseMatrixIndexCSX { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &SparseMatrixIndexCSX{} + x.Init(buf, n+offset) + return x +} + +func FinishSparseMatrixIndexCSXBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsSparseMatrixIndexCSX(buf []byte, offset flatbuffers.UOffsetT) *SparseMatrixIndexCSX { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &SparseMatrixIndexCSX{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedSparseMatrixIndexCSXBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *SparseMatrixIndexCSX) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *SparseMatrixIndexCSX) Table() flatbuffers.Table { + return rcv._tab +} + +/// Which axis, row or column, is compressed +func (rcv *SparseMatrixIndexCSX) CompressedAxis() SparseMatrixCompressedAxis { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return SparseMatrixCompressedAxis(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 0 +} + +/// Which axis, row or column, is compressed +func (rcv *SparseMatrixIndexCSX) MutateCompressedAxis(n SparseMatrixCompressedAxis) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +/// The type of values in indptrBuffer +func (rcv *SparseMatrixIndexCSX) IndptrType(obj *Int) *Int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(Int) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// The type of values in indptrBuffer +/// indptrBuffer stores the location and size of indptr array that +/// represents the range of the rows. +/// The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data. +/// The length of this array is 1 + (the number of rows), and the type +/// of index value is long. +/// +/// For example, let X be the following 6x4 matrix: +/// ```text +/// X := [[0, 1, 2, 0], +/// [0, 0, 3, 0], +/// [0, 4, 0, 5], +/// [0, 0, 0, 0], +/// [6, 0, 7, 8], +/// [0, 9, 0, 0]]. +/// ``` +/// The array of non-zero values in X is: +/// ```text +/// values(X) = [1, 2, 3, 4, 5, 6, 7, 8, 9]. +/// ``` +/// And the indptr of X is: +/// ```text +/// indptr(X) = [0, 2, 3, 5, 5, 8, 10]. +/// ``` +func (rcv *SparseMatrixIndexCSX) IndptrBuffer(obj *Buffer) *Buffer { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + x := o + rcv._tab.Pos + if obj == nil { + obj = new(Buffer) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// indptrBuffer stores the location and size of indptr array that +/// represents the range of the rows. +/// The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data. +/// The length of this array is 1 + (the number of rows), and the type +/// of index value is long. +/// +/// For example, let X be the following 6x4 matrix: +/// ```text +/// X := [[0, 1, 2, 0], +/// [0, 0, 3, 0], +/// [0, 4, 0, 5], +/// [0, 0, 0, 0], +/// [6, 0, 7, 8], +/// [0, 9, 0, 0]]. +/// ``` +/// The array of non-zero values in X is: +/// ```text +/// values(X) = [1, 2, 3, 4, 5, 6, 7, 8, 9]. +/// ``` +/// And the indptr of X is: +/// ```text +/// indptr(X) = [0, 2, 3, 5, 5, 8, 10]. +/// ``` +/// The type of values in indicesBuffer +func (rcv *SparseMatrixIndexCSX) IndicesType(obj *Int) *Int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(Int) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// The type of values in indicesBuffer +/// indicesBuffer stores the location and size of the array that +/// contains the column indices of the corresponding non-zero values. +/// The type of index value is long. +/// +/// For example, the indices of the above X is: +/// ```text +/// indices(X) = [1, 2, 2, 1, 3, 0, 2, 3, 1]. +/// ``` +/// Note that the indices are sorted in lexicographical order for each row. +func (rcv *SparseMatrixIndexCSX) IndicesBuffer(obj *Buffer) *Buffer { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + x := o + rcv._tab.Pos + if obj == nil { + obj = new(Buffer) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// indicesBuffer stores the location and size of the array that +/// contains the column indices of the corresponding non-zero values. +/// The type of index value is long. +/// +/// For example, the indices of the above X is: +/// ```text +/// indices(X) = [1, 2, 2, 1, 3, 0, 2, 3, 1]. +/// ``` +/// Note that the indices are sorted in lexicographical order for each row. +func SparseMatrixIndexCSXStart(builder *flatbuffers.Builder) { + builder.StartObject(5) +} +func SparseMatrixIndexCSXAddCompressedAxis(builder *flatbuffers.Builder, compressedAxis SparseMatrixCompressedAxis) { + builder.PrependInt16Slot(0, int16(compressedAxis), 0) +} +func SparseMatrixIndexCSXAddIndptrType(builder *flatbuffers.Builder, indptrType flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(indptrType), 0) +} +func SparseMatrixIndexCSXAddIndptrBuffer(builder *flatbuffers.Builder, indptrBuffer flatbuffers.UOffsetT) { + builder.PrependStructSlot(2, flatbuffers.UOffsetT(indptrBuffer), 0) +} +func SparseMatrixIndexCSXAddIndicesType(builder *flatbuffers.Builder, indicesType flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(indicesType), 0) +} +func SparseMatrixIndexCSXAddIndicesBuffer(builder *flatbuffers.Builder, indicesBuffer flatbuffers.UOffsetT) { + builder.PrependStructSlot(4, flatbuffers.UOffsetT(indicesBuffer), 0) +} +func SparseMatrixIndexCSXEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensor.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensor.go new file mode 100644 index 0000000000000..03c34d22d6ee4 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensor.go @@ -0,0 +1,174 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type SparseTensor struct { + _tab flatbuffers.Table +} + +func GetRootAsSparseTensor(buf []byte, offset flatbuffers.UOffsetT) *SparseTensor { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &SparseTensor{} + x.Init(buf, n+offset) + return x +} + +func FinishSparseTensorBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsSparseTensor(buf []byte, offset flatbuffers.UOffsetT) *SparseTensor { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &SparseTensor{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedSparseTensorBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *SparseTensor) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *SparseTensor) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *SparseTensor) TypeType() Type { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return Type(rcv._tab.GetByte(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *SparseTensor) MutateTypeType(n Type) bool { + return rcv._tab.MutateByteSlot(4, byte(n)) +} + +/// The type of data contained in a value cell. +/// Currently only fixed-width value types are supported, +/// no strings or nested types. +func (rcv *SparseTensor) Type(obj *flatbuffers.Table) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + rcv._tab.Union(obj, o) + return true + } + return false +} + +/// The type of data contained in a value cell. +/// Currently only fixed-width value types are supported, +/// no strings or nested types. +/// The dimensions of the tensor, optionally named. +func (rcv *SparseTensor) Shape(obj *TensorDim, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 4 + x = rcv._tab.Indirect(x) + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *SparseTensor) ShapeLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// The dimensions of the tensor, optionally named. +/// The number of non-zero values in a sparse tensor. +func (rcv *SparseTensor) NonZeroLength() int64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + return rcv._tab.GetInt64(o + rcv._tab.Pos) + } + return 0 +} + +/// The number of non-zero values in a sparse tensor. +func (rcv *SparseTensor) MutateNonZeroLength(n int64) bool { + return rcv._tab.MutateInt64Slot(10, n) +} + +func (rcv *SparseTensor) SparseIndexType() SparseTensorIndex { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + return SparseTensorIndex(rcv._tab.GetByte(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *SparseTensor) MutateSparseIndexType(n SparseTensorIndex) bool { + return rcv._tab.MutateByteSlot(12, byte(n)) +} + +/// Sparse tensor index +func (rcv *SparseTensor) SparseIndex(obj *flatbuffers.Table) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) + if o != 0 { + rcv._tab.Union(obj, o) + return true + } + return false +} + +/// Sparse tensor index +/// The location and size of the tensor's data +func (rcv *SparseTensor) Data(obj *Buffer) *Buffer { + o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) + if o != 0 { + x := o + rcv._tab.Pos + if obj == nil { + obj = new(Buffer) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// The location and size of the tensor's data +func SparseTensorStart(builder *flatbuffers.Builder) { + builder.StartObject(7) +} +func SparseTensorAddTypeType(builder *flatbuffers.Builder, typeType Type) { + builder.PrependByteSlot(0, byte(typeType), 0) +} +func SparseTensorAddType(builder *flatbuffers.Builder, type_ flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(type_), 0) +} +func SparseTensorAddShape(builder *flatbuffers.Builder, shape flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(shape), 0) +} +func SparseTensorStartShapeVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func SparseTensorAddNonZeroLength(builder *flatbuffers.Builder, nonZeroLength int64) { + builder.PrependInt64Slot(3, nonZeroLength, 0) +} +func SparseTensorAddSparseIndexType(builder *flatbuffers.Builder, sparseIndexType SparseTensorIndex) { + builder.PrependByteSlot(4, byte(sparseIndexType), 0) +} +func SparseTensorAddSparseIndex(builder *flatbuffers.Builder, sparseIndex flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(sparseIndex), 0) +} +func SparseTensorAddData(builder *flatbuffers.Builder, data flatbuffers.UOffsetT) { + builder.PrependStructSlot(6, flatbuffers.UOffsetT(data), 0) +} +func SparseTensorEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndex.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndex.go new file mode 100644 index 0000000000000..6327c82ef92f6 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndex.go @@ -0,0 +1,35 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +type SparseTensorIndex byte + +const ( + SparseTensorIndexNONE SparseTensorIndex = 0 + SparseTensorIndexSparseTensorIndexCOO SparseTensorIndex = 1 + SparseTensorIndexSparseMatrixIndexCSX SparseTensorIndex = 2 + SparseTensorIndexSparseTensorIndexCSF SparseTensorIndex = 3 +) + +var EnumNamesSparseTensorIndex = map[SparseTensorIndex]string{ + SparseTensorIndexNONE: "NONE", + SparseTensorIndexSparseTensorIndexCOO: "SparseTensorIndexCOO", + SparseTensorIndexSparseMatrixIndexCSX: "SparseMatrixIndexCSX", + SparseTensorIndexSparseTensorIndexCSF: "SparseTensorIndexCSF", +} + +var EnumValuesSparseTensorIndex = map[string]SparseTensorIndex{ + "NONE": SparseTensorIndexNONE, + "SparseTensorIndexCOO": SparseTensorIndexSparseTensorIndexCOO, + "SparseMatrixIndexCSX": SparseTensorIndexSparseMatrixIndexCSX, + "SparseTensorIndexCSF": SparseTensorIndexSparseTensorIndexCSF, +} + +func (v SparseTensorIndex) String() string { + if s, ok := EnumNamesSparseTensorIndex[v]; ok { + return s + } + return "SparseTensorIndex(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndexCOO.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndexCOO.go new file mode 100644 index 0000000000000..65a5ff74f2310 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndexCOO.go @@ -0,0 +1,178 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// ---------------------------------------------------------------------- +/// EXPERIMENTAL: Data structures for sparse tensors +/// Coordinate (COO) format of sparse tensor index. +/// +/// COO's index list are represented as a NxM matrix, +/// where N is the number of non-zero values, +/// and M is the number of dimensions of a sparse tensor. +/// +/// indicesBuffer stores the location and size of the data of this indices +/// matrix. The value type and the stride of the indices matrix is +/// specified in indicesType and indicesStrides fields. +/// +/// For example, let X be a 2x3x4x5 tensor, and it has the following +/// 6 non-zero values: +/// ```text +/// X[0, 1, 2, 0] := 1 +/// X[1, 1, 2, 3] := 2 +/// X[0, 2, 1, 0] := 3 +/// X[0, 1, 3, 0] := 4 +/// X[0, 1, 2, 1] := 5 +/// X[1, 2, 0, 4] := 6 +/// ``` +/// In COO format, the index matrix of X is the following 4x6 matrix: +/// ```text +/// [[0, 0, 0, 0, 1, 1], +/// [1, 1, 1, 2, 1, 2], +/// [2, 2, 3, 1, 2, 0], +/// [0, 1, 0, 0, 3, 4]] +/// ``` +/// When isCanonical is true, the indices is sorted in lexicographical order +/// (row-major order), and it does not have duplicated entries. Otherwise, +/// the indices may not be sorted, or may have duplicated entries. +type SparseTensorIndexCOO struct { + _tab flatbuffers.Table +} + +func GetRootAsSparseTensorIndexCOO(buf []byte, offset flatbuffers.UOffsetT) *SparseTensorIndexCOO { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &SparseTensorIndexCOO{} + x.Init(buf, n+offset) + return x +} + +func FinishSparseTensorIndexCOOBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsSparseTensorIndexCOO(buf []byte, offset flatbuffers.UOffsetT) *SparseTensorIndexCOO { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &SparseTensorIndexCOO{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedSparseTensorIndexCOOBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *SparseTensorIndexCOO) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *SparseTensorIndexCOO) Table() flatbuffers.Table { + return rcv._tab +} + +/// The type of values in indicesBuffer +func (rcv *SparseTensorIndexCOO) IndicesType(obj *Int) *Int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(Int) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// The type of values in indicesBuffer +/// Non-negative byte offsets to advance one value cell along each dimension +/// If omitted, default to row-major order (C-like). +func (rcv *SparseTensorIndexCOO) IndicesStrides(j int) int64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.GetInt64(a + flatbuffers.UOffsetT(j*8)) + } + return 0 +} + +func (rcv *SparseTensorIndexCOO) IndicesStridesLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// Non-negative byte offsets to advance one value cell along each dimension +/// If omitted, default to row-major order (C-like). +func (rcv *SparseTensorIndexCOO) MutateIndicesStrides(j int, n int64) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.MutateInt64(a+flatbuffers.UOffsetT(j*8), n) + } + return false +} + +/// The location and size of the indices matrix's data +func (rcv *SparseTensorIndexCOO) IndicesBuffer(obj *Buffer) *Buffer { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + x := o + rcv._tab.Pos + if obj == nil { + obj = new(Buffer) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// The location and size of the indices matrix's data +/// This flag is true if and only if the indices matrix is sorted in +/// row-major order, and does not have duplicated entries. +/// This sort order is the same as of Tensorflow's SparseTensor, +/// but it is inverse order of SciPy's canonical coo_matrix +/// (SciPy employs column-major order for its coo_matrix). +func (rcv *SparseTensorIndexCOO) IsCanonical() bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + return rcv._tab.GetBool(o + rcv._tab.Pos) + } + return false +} + +/// This flag is true if and only if the indices matrix is sorted in +/// row-major order, and does not have duplicated entries. +/// This sort order is the same as of Tensorflow's SparseTensor, +/// but it is inverse order of SciPy's canonical coo_matrix +/// (SciPy employs column-major order for its coo_matrix). +func (rcv *SparseTensorIndexCOO) MutateIsCanonical(n bool) bool { + return rcv._tab.MutateBoolSlot(10, n) +} + +func SparseTensorIndexCOOStart(builder *flatbuffers.Builder) { + builder.StartObject(4) +} +func SparseTensorIndexCOOAddIndicesType(builder *flatbuffers.Builder, indicesType flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(indicesType), 0) +} +func SparseTensorIndexCOOAddIndicesStrides(builder *flatbuffers.Builder, indicesStrides flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(indicesStrides), 0) +} +func SparseTensorIndexCOOStartIndicesStridesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(8, numElems, 8) +} +func SparseTensorIndexCOOAddIndicesBuffer(builder *flatbuffers.Builder, indicesBuffer flatbuffers.UOffsetT) { + builder.PrependStructSlot(2, flatbuffers.UOffsetT(indicesBuffer), 0) +} +func SparseTensorIndexCOOAddIsCanonical(builder *flatbuffers.Builder, isCanonical bool) { + builder.PrependBoolSlot(3, isCanonical, false) +} +func SparseTensorIndexCOOEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndexCSF.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndexCSF.go new file mode 100644 index 0000000000000..2638b8b70da27 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/SparseTensorIndexCSF.go @@ -0,0 +1,290 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Compressed Sparse Fiber (CSF) sparse tensor index. +type SparseTensorIndexCSF struct { + _tab flatbuffers.Table +} + +func GetRootAsSparseTensorIndexCSF(buf []byte, offset flatbuffers.UOffsetT) *SparseTensorIndexCSF { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &SparseTensorIndexCSF{} + x.Init(buf, n+offset) + return x +} + +func FinishSparseTensorIndexCSFBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsSparseTensorIndexCSF(buf []byte, offset flatbuffers.UOffsetT) *SparseTensorIndexCSF { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &SparseTensorIndexCSF{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedSparseTensorIndexCSFBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *SparseTensorIndexCSF) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *SparseTensorIndexCSF) Table() flatbuffers.Table { + return rcv._tab +} + +/// CSF is a generalization of compressed sparse row (CSR) index. +/// See [smith2017knl](http://shaden.io/pub-files/smith2017knl.pdf) +/// +/// CSF index recursively compresses each dimension of a tensor into a set +/// of prefix trees. Each path from a root to leaf forms one tensor +/// non-zero index. CSF is implemented with two arrays of buffers and one +/// arrays of integers. +/// +/// For example, let X be a 2x3x4x5 tensor and let it have the following +/// 8 non-zero values: +/// ```text +/// X[0, 0, 0, 1] := 1 +/// X[0, 0, 0, 2] := 2 +/// X[0, 1, 0, 0] := 3 +/// X[0, 1, 0, 2] := 4 +/// X[0, 1, 1, 0] := 5 +/// X[1, 1, 1, 0] := 6 +/// X[1, 1, 1, 1] := 7 +/// X[1, 1, 1, 2] := 8 +/// ``` +/// As a prefix tree this would be represented as: +/// ```text +/// 0 1 +/// / \ | +/// 0 1 1 +/// / / \ | +/// 0 0 1 1 +/// /| /| | /| | +/// 1 2 0 2 0 0 1 2 +/// ``` +/// The type of values in indptrBuffers +func (rcv *SparseTensorIndexCSF) IndptrType(obj *Int) *Int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(Int) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// CSF is a generalization of compressed sparse row (CSR) index. +/// See [smith2017knl](http://shaden.io/pub-files/smith2017knl.pdf) +/// +/// CSF index recursively compresses each dimension of a tensor into a set +/// of prefix trees. Each path from a root to leaf forms one tensor +/// non-zero index. CSF is implemented with two arrays of buffers and one +/// arrays of integers. +/// +/// For example, let X be a 2x3x4x5 tensor and let it have the following +/// 8 non-zero values: +/// ```text +/// X[0, 0, 0, 1] := 1 +/// X[0, 0, 0, 2] := 2 +/// X[0, 1, 0, 0] := 3 +/// X[0, 1, 0, 2] := 4 +/// X[0, 1, 1, 0] := 5 +/// X[1, 1, 1, 0] := 6 +/// X[1, 1, 1, 1] := 7 +/// X[1, 1, 1, 2] := 8 +/// ``` +/// As a prefix tree this would be represented as: +/// ```text +/// 0 1 +/// / \ | +/// 0 1 1 +/// / / \ | +/// 0 0 1 1 +/// /| /| | /| | +/// 1 2 0 2 0 0 1 2 +/// ``` +/// The type of values in indptrBuffers +/// indptrBuffers stores the sparsity structure. +/// Each two consecutive dimensions in a tensor correspond to a buffer in +/// indptrBuffers. A pair of consecutive values at `indptrBuffers[dim][i]` +/// and `indptrBuffers[dim][i + 1]` signify a range of nodes in +/// `indicesBuffers[dim + 1]` who are children of `indicesBuffers[dim][i]` node. +/// +/// For example, the indptrBuffers for the above X is: +/// ```text +/// indptrBuffer(X) = [ +/// [0, 2, 3], +/// [0, 1, 3, 4], +/// [0, 2, 4, 5, 8] +/// ]. +/// ``` +func (rcv *SparseTensorIndexCSF) IndptrBuffers(obj *Buffer, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 16 + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *SparseTensorIndexCSF) IndptrBuffersLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// indptrBuffers stores the sparsity structure. +/// Each two consecutive dimensions in a tensor correspond to a buffer in +/// indptrBuffers. A pair of consecutive values at `indptrBuffers[dim][i]` +/// and `indptrBuffers[dim][i + 1]` signify a range of nodes in +/// `indicesBuffers[dim + 1]` who are children of `indicesBuffers[dim][i]` node. +/// +/// For example, the indptrBuffers for the above X is: +/// ```text +/// indptrBuffer(X) = [ +/// [0, 2, 3], +/// [0, 1, 3, 4], +/// [0, 2, 4, 5, 8] +/// ]. +/// ``` +/// The type of values in indicesBuffers +func (rcv *SparseTensorIndexCSF) IndicesType(obj *Int) *Int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + x := rcv._tab.Indirect(o + rcv._tab.Pos) + if obj == nil { + obj = new(Int) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// The type of values in indicesBuffers +/// indicesBuffers stores values of nodes. +/// Each tensor dimension corresponds to a buffer in indicesBuffers. +/// For example, the indicesBuffers for the above X is: +/// ```text +/// indicesBuffer(X) = [ +/// [0, 1], +/// [0, 1, 1], +/// [0, 0, 1, 1], +/// [1, 2, 0, 2, 0, 0, 1, 2] +/// ]. +/// ``` +func (rcv *SparseTensorIndexCSF) IndicesBuffers(obj *Buffer, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 16 + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *SparseTensorIndexCSF) IndicesBuffersLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// indicesBuffers stores values of nodes. +/// Each tensor dimension corresponds to a buffer in indicesBuffers. +/// For example, the indicesBuffers for the above X is: +/// ```text +/// indicesBuffer(X) = [ +/// [0, 1], +/// [0, 1, 1], +/// [0, 0, 1, 1], +/// [1, 2, 0, 2, 0, 0, 1, 2] +/// ]. +/// ``` +/// axisOrder stores the sequence in which dimensions were traversed to +/// produce the prefix tree. +/// For example, the axisOrder for the above X is: +/// ```text +/// axisOrder(X) = [0, 1, 2, 3]. +/// ``` +func (rcv *SparseTensorIndexCSF) AxisOrder(j int) int32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.GetInt32(a + flatbuffers.UOffsetT(j*4)) + } + return 0 +} + +func (rcv *SparseTensorIndexCSF) AxisOrderLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// axisOrder stores the sequence in which dimensions were traversed to +/// produce the prefix tree. +/// For example, the axisOrder for the above X is: +/// ```text +/// axisOrder(X) = [0, 1, 2, 3]. +/// ``` +func (rcv *SparseTensorIndexCSF) MutateAxisOrder(j int, n int32) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.MutateInt32(a+flatbuffers.UOffsetT(j*4), n) + } + return false +} + +func SparseTensorIndexCSFStart(builder *flatbuffers.Builder) { + builder.StartObject(5) +} +func SparseTensorIndexCSFAddIndptrType(builder *flatbuffers.Builder, indptrType flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(indptrType), 0) +} +func SparseTensorIndexCSFAddIndptrBuffers(builder *flatbuffers.Builder, indptrBuffers flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(indptrBuffers), 0) +} +func SparseTensorIndexCSFStartIndptrBuffersVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(16, numElems, 8) +} +func SparseTensorIndexCSFAddIndicesType(builder *flatbuffers.Builder, indicesType flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(indicesType), 0) +} +func SparseTensorIndexCSFAddIndicesBuffers(builder *flatbuffers.Builder, indicesBuffers flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(indicesBuffers), 0) +} +func SparseTensorIndexCSFStartIndicesBuffersVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(16, numElems, 8) +} +func SparseTensorIndexCSFAddAxisOrder(builder *flatbuffers.Builder, axisOrder flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(axisOrder), 0) +} +func SparseTensorIndexCSFStartAxisOrderVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func SparseTensorIndexCSFEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Struct_.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Struct_.go new file mode 100644 index 0000000000000..393f954532c8b --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Struct_.go @@ -0,0 +1,52 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// A Struct_ in the flatbuffer metadata is the same as an Arrow Struct +/// (according to the physical memory layout). We used Struct_ here as +/// Struct is a reserved word in Flatbuffers +type Struct_ struct { + _tab flatbuffers.Table +} + +func GetRootAsStruct_(buf []byte, offset flatbuffers.UOffsetT) *Struct_ { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Struct_{} + x.Init(buf, n+offset) + return x +} + +func FinishStruct_Buffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsStruct_(buf []byte, offset flatbuffers.UOffsetT) *Struct_ { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Struct_{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedStruct_Buffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Struct_) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Struct_) Table() flatbuffers.Table { + return rcv._tab +} + +func Struct_Start(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func Struct_End(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Tensor.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Tensor.go new file mode 100644 index 0000000000000..e1af1d65c7945 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Tensor.go @@ -0,0 +1,162 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +type Tensor struct { + _tab flatbuffers.Table +} + +func GetRootAsTensor(buf []byte, offset flatbuffers.UOffsetT) *Tensor { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Tensor{} + x.Init(buf, n+offset) + return x +} + +func FinishTensorBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsTensor(buf []byte, offset flatbuffers.UOffsetT) *Tensor { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Tensor{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedTensorBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Tensor) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Tensor) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Tensor) TypeType() Type { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return Type(rcv._tab.GetByte(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *Tensor) MutateTypeType(n Type) bool { + return rcv._tab.MutateByteSlot(4, byte(n)) +} + +/// The type of data contained in a value cell. Currently only fixed-width +/// value types are supported, no strings or nested types +func (rcv *Tensor) Type(obj *flatbuffers.Table) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + rcv._tab.Union(obj, o) + return true + } + return false +} + +/// The type of data contained in a value cell. Currently only fixed-width +/// value types are supported, no strings or nested types +/// The dimensions of the tensor, optionally named +func (rcv *Tensor) Shape(obj *TensorDim, j int) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + x := rcv._tab.Vector(o) + x += flatbuffers.UOffsetT(j) * 4 + x = rcv._tab.Indirect(x) + obj.Init(rcv._tab.Bytes, x) + return true + } + return false +} + +func (rcv *Tensor) ShapeLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// The dimensions of the tensor, optionally named +/// Non-negative byte offsets to advance one value cell along each dimension +/// If omitted, default to row-major order (C-like). +func (rcv *Tensor) Strides(j int) int64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.GetInt64(a + flatbuffers.UOffsetT(j*8)) + } + return 0 +} + +func (rcv *Tensor) StridesLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +/// Non-negative byte offsets to advance one value cell along each dimension +/// If omitted, default to row-major order (C-like). +func (rcv *Tensor) MutateStrides(j int, n int64) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.MutateInt64(a+flatbuffers.UOffsetT(j*8), n) + } + return false +} + +/// The location and size of the tensor's data +func (rcv *Tensor) Data(obj *Buffer) *Buffer { + o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) + if o != 0 { + x := o + rcv._tab.Pos + if obj == nil { + obj = new(Buffer) + } + obj.Init(rcv._tab.Bytes, x) + return obj + } + return nil +} + +/// The location and size of the tensor's data +func TensorStart(builder *flatbuffers.Builder) { + builder.StartObject(5) +} +func TensorAddTypeType(builder *flatbuffers.Builder, typeType Type) { + builder.PrependByteSlot(0, byte(typeType), 0) +} +func TensorAddType(builder *flatbuffers.Builder, type_ flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(type_), 0) +} +func TensorAddShape(builder *flatbuffers.Builder, shape flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(shape), 0) +} +func TensorStartShapeVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func TensorAddStrides(builder *flatbuffers.Builder, strides flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(strides), 0) +} +func TensorStartStridesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(8, numElems, 8) +} +func TensorAddData(builder *flatbuffers.Builder, data flatbuffers.UOffsetT) { + builder.PrependStructSlot(4, flatbuffers.UOffsetT(data), 0) +} +func TensorEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/TensorDim.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/TensorDim.go new file mode 100644 index 0000000000000..791dc9b63c16b --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/TensorDim.go @@ -0,0 +1,82 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// ---------------------------------------------------------------------- +/// Data structures for dense tensors +/// Shape data for a single axis in a tensor +type TensorDim struct { + _tab flatbuffers.Table +} + +func GetRootAsTensorDim(buf []byte, offset flatbuffers.UOffsetT) *TensorDim { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &TensorDim{} + x.Init(buf, n+offset) + return x +} + +func FinishTensorDimBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsTensorDim(buf []byte, offset flatbuffers.UOffsetT) *TensorDim { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &TensorDim{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedTensorDimBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *TensorDim) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *TensorDim) Table() flatbuffers.Table { + return rcv._tab +} + +/// Length of dimension +func (rcv *TensorDim) Size() int64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return rcv._tab.GetInt64(o + rcv._tab.Pos) + } + return 0 +} + +/// Length of dimension +func (rcv *TensorDim) MutateSize(n int64) bool { + return rcv._tab.MutateInt64Slot(4, n) +} + +/// Name of the dimension, optional +func (rcv *TensorDim) Name() []byte { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.ByteVector(o + rcv._tab.Pos) + } + return nil +} + +/// Name of the dimension, optional +func TensorDimStart(builder *flatbuffers.Builder) { + builder.StartObject(2) +} +func TensorDimAddSize(builder *flatbuffers.Builder, size int64) { + builder.PrependInt64Slot(0, size, 0) +} +func TensorDimAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(name), 0) +} +func TensorDimEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Time.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Time.go new file mode 100644 index 0000000000000..96e9452c642de --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Time.go @@ -0,0 +1,93 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Time is either a 32-bit or 64-bit signed integer type representing an +/// elapsed time since midnight, stored in either of four units: seconds, +/// milliseconds, microseconds or nanoseconds. +/// +/// The integer `bitWidth` depends on the `unit` and must be one of the following: +/// * SECOND and MILLISECOND: 32 bits +/// * MICROSECOND and NANOSECOND: 64 bits +/// +/// The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds +/// (exclusive), adjusted for the time unit (for example, up to 86400000 +/// exclusive for the MILLISECOND unit). +/// This definition doesn't allow for leap seconds. Time values from +/// measurements with leap seconds will need to be corrected when ingesting +/// into Arrow (for example by replacing the value 86400 with 86399). +type Time struct { + _tab flatbuffers.Table +} + +func GetRootAsTime(buf []byte, offset flatbuffers.UOffsetT) *Time { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Time{} + x.Init(buf, n+offset) + return x +} + +func FinishTimeBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsTime(buf []byte, offset flatbuffers.UOffsetT) *Time { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Time{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedTimeBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Time) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Time) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Time) Unit() TimeUnit { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return TimeUnit(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 1 +} + +func (rcv *Time) MutateUnit(n TimeUnit) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +func (rcv *Time) BitWidth() int32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.GetInt32(o + rcv._tab.Pos) + } + return 32 +} + +func (rcv *Time) MutateBitWidth(n int32) bool { + return rcv._tab.MutateInt32Slot(6, n) +} + +func TimeStart(builder *flatbuffers.Builder) { + builder.StartObject(2) +} +func TimeAddUnit(builder *flatbuffers.Builder, unit TimeUnit) { + builder.PrependInt16Slot(0, int16(unit), 1) +} +func TimeAddBitWidth(builder *flatbuffers.Builder, bitWidth int32) { + builder.PrependInt32Slot(1, bitWidth, 32) +} +func TimeEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/TimeUnit.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/TimeUnit.go new file mode 100644 index 0000000000000..8bab89ce7ee8b --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/TimeUnit.go @@ -0,0 +1,35 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +type TimeUnit int16 + +const ( + TimeUnitSECOND TimeUnit = 0 + TimeUnitMILLISECOND TimeUnit = 1 + TimeUnitMICROSECOND TimeUnit = 2 + TimeUnitNANOSECOND TimeUnit = 3 +) + +var EnumNamesTimeUnit = map[TimeUnit]string{ + TimeUnitSECOND: "SECOND", + TimeUnitMILLISECOND: "MILLISECOND", + TimeUnitMICROSECOND: "MICROSECOND", + TimeUnitNANOSECOND: "NANOSECOND", +} + +var EnumValuesTimeUnit = map[string]TimeUnit{ + "SECOND": TimeUnitSECOND, + "MILLISECOND": TimeUnitMILLISECOND, + "MICROSECOND": TimeUnitMICROSECOND, + "NANOSECOND": TimeUnitNANOSECOND, +} + +func (v TimeUnit) String() string { + if s, ok := EnumNamesTimeUnit[v]; ok { + return s + } + return "TimeUnit(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Timestamp.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Timestamp.go new file mode 100644 index 0000000000000..e46a4fe34f4ab --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Timestamp.go @@ -0,0 +1,200 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Timestamp is a 64-bit signed integer representing an elapsed time since a +/// fixed epoch, stored in either of four units: seconds, milliseconds, +/// microseconds or nanoseconds, and is optionally annotated with a timezone. +/// +/// Timestamp values do not include any leap seconds (in other words, all +/// days are considered 86400 seconds long). +/// +/// Timestamps with a non-empty timezone +/// ------------------------------------ +/// +/// If a Timestamp column has a non-empty timezone value, its epoch is +/// 1970-01-01 00:00:00 (January 1st 1970, midnight) in the *UTC* timezone +/// (the Unix epoch), regardless of the Timestamp's own timezone. +/// +/// Therefore, timestamp values with a non-empty timezone correspond to +/// physical points in time together with some additional information about +/// how the data was obtained and/or how to display it (the timezone). +/// +/// For example, the timestamp value 0 with the timezone string "Europe/Paris" +/// corresponds to "January 1st 1970, 00h00" in the UTC timezone, but the +/// application may prefer to display it as "January 1st 1970, 01h00" in +/// the Europe/Paris timezone (which is the same physical point in time). +/// +/// One consequence is that timestamp values with a non-empty timezone +/// can be compared and ordered directly, since they all share the same +/// well-known point of reference (the Unix epoch). +/// +/// Timestamps with an unset / empty timezone +/// ----------------------------------------- +/// +/// If a Timestamp column has no timezone value, its epoch is +/// 1970-01-01 00:00:00 (January 1st 1970, midnight) in an *unknown* timezone. +/// +/// Therefore, timestamp values without a timezone cannot be meaningfully +/// interpreted as physical points in time, but only as calendar / clock +/// indications ("wall clock time") in an unspecified timezone. +/// +/// For example, the timestamp value 0 with an empty timezone string +/// corresponds to "January 1st 1970, 00h00" in an unknown timezone: there +/// is not enough information to interpret it as a well-defined physical +/// point in time. +/// +/// One consequence is that timestamp values without a timezone cannot +/// be reliably compared or ordered, since they may have different points of +/// reference. In particular, it is *not* possible to interpret an unset +/// or empty timezone as the same as "UTC". +/// +/// Conversion between timezones +/// ---------------------------- +/// +/// If a Timestamp column has a non-empty timezone, changing the timezone +/// to a different non-empty value is a metadata-only operation: +/// the timestamp values need not change as their point of reference remains +/// the same (the Unix epoch). +/// +/// However, if a Timestamp column has no timezone value, changing it to a +/// non-empty value requires to think about the desired semantics. +/// One possibility is to assume that the original timestamp values are +/// relative to the epoch of the timezone being set; timestamp values should +/// then adjusted to the Unix epoch (for example, changing the timezone from +/// empty to "Europe/Paris" would require converting the timestamp values +/// from "Europe/Paris" to "UTC", which seems counter-intuitive but is +/// nevertheless correct). +/// +/// Guidelines for encoding data from external libraries +/// ---------------------------------------------------- +/// +/// Date & time libraries often have multiple different data types for temporal +/// data. In order to ease interoperability between different implementations the +/// Arrow project has some recommendations for encoding these types into a Timestamp +/// column. +/// +/// An "instant" represents a physical point in time that has no relevant timezone +/// (for example, astronomical data). To encode an instant, use a Timestamp with +/// the timezone string set to "UTC", and make sure the Timestamp values +/// are relative to the UTC epoch (January 1st 1970, midnight). +/// +/// A "zoned date-time" represents a physical point in time annotated with an +/// informative timezone (for example, the timezone in which the data was +/// recorded). To encode a zoned date-time, use a Timestamp with the timezone +/// string set to the name of the timezone, and make sure the Timestamp values +/// are relative to the UTC epoch (January 1st 1970, midnight). +/// +/// (There is some ambiguity between an instant and a zoned date-time with the +/// UTC timezone. Both of these are stored the same in Arrow. Typically, +/// this distinction does not matter. If it does, then an application should +/// use custom metadata or an extension type to distinguish between the two cases.) +/// +/// An "offset date-time" represents a physical point in time combined with an +/// explicit offset from UTC. To encode an offset date-time, use a Timestamp +/// with the timezone string set to the numeric timezone offset string +/// (e.g. "+03:00"), and make sure the Timestamp values are relative to +/// the UTC epoch (January 1st 1970, midnight). +/// +/// A "naive date-time" (also called "local date-time" in some libraries) +/// represents a wall clock time combined with a calendar date, but with +/// no indication of how to map this information to a physical point in time. +/// Naive date-times must be handled with care because of this missing +/// information, and also because daylight saving time (DST) may make +/// some values ambiguous or nonexistent. A naive date-time may be +/// stored as a struct with Date and Time fields. However, it may also be +/// encoded into a Timestamp column with an empty timezone. The timestamp +/// values should be computed "as if" the timezone of the date-time values +/// was UTC; for example, the naive date-time "January 1st 1970, 00h00" would +/// be encoded as timestamp value 0. +type Timestamp struct { + _tab flatbuffers.Table +} + +func GetRootAsTimestamp(buf []byte, offset flatbuffers.UOffsetT) *Timestamp { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Timestamp{} + x.Init(buf, n+offset) + return x +} + +func FinishTimestampBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsTimestamp(buf []byte, offset flatbuffers.UOffsetT) *Timestamp { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Timestamp{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedTimestampBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Timestamp) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Timestamp) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Timestamp) Unit() TimeUnit { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return TimeUnit(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *Timestamp) MutateUnit(n TimeUnit) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +/// The timezone is an optional string indicating the name of a timezone, +/// one of: +/// +/// * As used in the Olson timezone database (the "tz database" or +/// "tzdata"), such as "America/New_York". +/// * An absolute timezone offset of the form "+XX:XX" or "-XX:XX", +/// such as "+07:30". +/// +/// Whether a timezone string is present indicates different semantics about +/// the data (see above). +func (rcv *Timestamp) Timezone() []byte { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.ByteVector(o + rcv._tab.Pos) + } + return nil +} + +/// The timezone is an optional string indicating the name of a timezone, +/// one of: +/// +/// * As used in the Olson timezone database (the "tz database" or +/// "tzdata"), such as "America/New_York". +/// * An absolute timezone offset of the form "+XX:XX" or "-XX:XX", +/// such as "+07:30". +/// +/// Whether a timezone string is present indicates different semantics about +/// the data (see above). +func TimestampStart(builder *flatbuffers.Builder) { + builder.StartObject(2) +} +func TimestampAddUnit(builder *flatbuffers.Builder, unit TimeUnit) { + builder.PrependInt16Slot(0, int16(unit), 0) +} +func TimestampAddTimezone(builder *flatbuffers.Builder, timezone flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(timezone), 0) +} +func TimestampEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Type.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Type.go new file mode 100644 index 0000000000000..a44d340b6db4c --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Type.go @@ -0,0 +1,107 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +/// ---------------------------------------------------------------------- +/// Top-level Type value, enabling extensible type-specific metadata. We can +/// add new logical types to Type without breaking backwards compatibility +type Type byte + +const ( + TypeNONE Type = 0 + TypeNull Type = 1 + TypeInt Type = 2 + TypeFloatingPoint Type = 3 + TypeBinary Type = 4 + TypeUtf8 Type = 5 + TypeBool Type = 6 + TypeDecimal Type = 7 + TypeDate Type = 8 + TypeTime Type = 9 + TypeTimestamp Type = 10 + TypeInterval Type = 11 + TypeList Type = 12 + TypeStruct_ Type = 13 + TypeUnion Type = 14 + TypeFixedSizeBinary Type = 15 + TypeFixedSizeList Type = 16 + TypeMap Type = 17 + TypeDuration Type = 18 + TypeLargeBinary Type = 19 + TypeLargeUtf8 Type = 20 + TypeLargeList Type = 21 + TypeRunEndEncoded Type = 22 + TypeBinaryView Type = 23 + TypeUtf8View Type = 24 + TypeListView Type = 25 + TypeLargeListView Type = 26 +) + +var EnumNamesType = map[Type]string{ + TypeNONE: "NONE", + TypeNull: "Null", + TypeInt: "Int", + TypeFloatingPoint: "FloatingPoint", + TypeBinary: "Binary", + TypeUtf8: "Utf8", + TypeBool: "Bool", + TypeDecimal: "Decimal", + TypeDate: "Date", + TypeTime: "Time", + TypeTimestamp: "Timestamp", + TypeInterval: "Interval", + TypeList: "List", + TypeStruct_: "Struct_", + TypeUnion: "Union", + TypeFixedSizeBinary: "FixedSizeBinary", + TypeFixedSizeList: "FixedSizeList", + TypeMap: "Map", + TypeDuration: "Duration", + TypeLargeBinary: "LargeBinary", + TypeLargeUtf8: "LargeUtf8", + TypeLargeList: "LargeList", + TypeRunEndEncoded: "RunEndEncoded", + TypeBinaryView: "BinaryView", + TypeUtf8View: "Utf8View", + TypeListView: "ListView", + TypeLargeListView: "LargeListView", +} + +var EnumValuesType = map[string]Type{ + "NONE": TypeNONE, + "Null": TypeNull, + "Int": TypeInt, + "FloatingPoint": TypeFloatingPoint, + "Binary": TypeBinary, + "Utf8": TypeUtf8, + "Bool": TypeBool, + "Decimal": TypeDecimal, + "Date": TypeDate, + "Time": TypeTime, + "Timestamp": TypeTimestamp, + "Interval": TypeInterval, + "List": TypeList, + "Struct_": TypeStruct_, + "Union": TypeUnion, + "FixedSizeBinary": TypeFixedSizeBinary, + "FixedSizeList": TypeFixedSizeList, + "Map": TypeMap, + "Duration": TypeDuration, + "LargeBinary": TypeLargeBinary, + "LargeUtf8": TypeLargeUtf8, + "LargeList": TypeLargeList, + "RunEndEncoded": TypeRunEndEncoded, + "BinaryView": TypeBinaryView, + "Utf8View": TypeUtf8View, + "ListView": TypeListView, + "LargeListView": TypeLargeListView, +} + +func (v Type) String() string { + if s, ok := EnumNamesType[v]; ok { + return s + } + return "Type(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Union.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Union.go new file mode 100644 index 0000000000000..1af02111e46e2 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Union.go @@ -0,0 +1,100 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// A union is a complex type with children in Field +/// By default ids in the type vector refer to the offsets in the children +/// optionally typeIds provides an indirection between the child offset and the type id +/// for each child `typeIds[offset]` is the id used in the type vector +type Union struct { + _tab flatbuffers.Table +} + +func GetRootAsUnion(buf []byte, offset flatbuffers.UOffsetT) *Union { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Union{} + x.Init(buf, n+offset) + return x +} + +func FinishUnionBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsUnion(buf []byte, offset flatbuffers.UOffsetT) *Union { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Union{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedUnionBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Union) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Union) Table() flatbuffers.Table { + return rcv._tab +} + +func (rcv *Union) Mode() UnionMode { + o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) + if o != 0 { + return UnionMode(rcv._tab.GetInt16(o + rcv._tab.Pos)) + } + return 0 +} + +func (rcv *Union) MutateMode(n UnionMode) bool { + return rcv._tab.MutateInt16Slot(4, int16(n)) +} + +func (rcv *Union) TypeIds(j int) int32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.GetInt32(a + flatbuffers.UOffsetT(j*4)) + } + return 0 +} + +func (rcv *Union) TypeIdsLength() int { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + return rcv._tab.VectorLen(o) + } + return 0 +} + +func (rcv *Union) MutateTypeIds(j int, n int32) bool { + o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) + if o != 0 { + a := rcv._tab.Vector(o) + return rcv._tab.MutateInt32(a+flatbuffers.UOffsetT(j*4), n) + } + return false +} + +func UnionStart(builder *flatbuffers.Builder) { + builder.StartObject(2) +} +func UnionAddMode(builder *flatbuffers.Builder, mode UnionMode) { + builder.PrependInt16Slot(0, int16(mode), 0) +} +func UnionAddTypeIds(builder *flatbuffers.Builder, typeIds flatbuffers.UOffsetT) { + builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(typeIds), 0) +} +func UnionStartTypeIdsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { + return builder.StartVector(4, numElems, 4) +} +func UnionEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/UnionMode.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/UnionMode.go new file mode 100644 index 0000000000000..e76bdc6cd8668 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/UnionMode.go @@ -0,0 +1,29 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import "strconv" + +type UnionMode int16 + +const ( + UnionModeSparse UnionMode = 0 + UnionModeDense UnionMode = 1 +) + +var EnumNamesUnionMode = map[UnionMode]string{ + UnionModeSparse: "Sparse", + UnionModeDense: "Dense", +} + +var EnumValuesUnionMode = map[string]UnionMode{ + "Sparse": UnionModeSparse, + "Dense": UnionModeDense, +} + +func (v UnionMode) String() string { + if s, ok := EnumNamesUnionMode[v]; ok { + return s + } + return "UnionMode(" + strconv.FormatInt(int64(v), 10) + ")" +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Utf8.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Utf8.go new file mode 100644 index 0000000000000..9fc98b7078548 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Utf8.go @@ -0,0 +1,50 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Unicode with UTF-8 encoding +type Utf8 struct { + _tab flatbuffers.Table +} + +func GetRootAsUtf8(buf []byte, offset flatbuffers.UOffsetT) *Utf8 { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Utf8{} + x.Init(buf, n+offset) + return x +} + +func FinishUtf8Buffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsUtf8(buf []byte, offset flatbuffers.UOffsetT) *Utf8 { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Utf8{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedUtf8Buffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Utf8) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Utf8) Table() flatbuffers.Table { + return rcv._tab +} + +func Utf8Start(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func Utf8End(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} diff --git a/dev/flight-integration/message/org/apache/arrow/flatbuf/Utf8View.go b/dev/flight-integration/message/org/apache/arrow/flatbuf/Utf8View.go new file mode 100644 index 0000000000000..0927757f28ae8 --- /dev/null +++ b/dev/flight-integration/message/org/apache/arrow/flatbuf/Utf8View.go @@ -0,0 +1,56 @@ +// Code generated by the FlatBuffers compiler. DO NOT EDIT. + +package flatbuf + +import ( + flatbuffers "github.com/google/flatbuffers/go" +) + +/// Logically the same as Utf8, but the internal representation uses a view +/// struct that contains the string length and either the string's entire data +/// inline (for small strings) or an inlined prefix, an index of another buffer, +/// and an offset pointing to a slice in that buffer (for non-small strings). +/// +/// Since it uses a variable number of data buffers, each Field with this type +/// must have a corresponding entry in `variadicBufferCounts`. +type Utf8View struct { + _tab flatbuffers.Table +} + +func GetRootAsUtf8View(buf []byte, offset flatbuffers.UOffsetT) *Utf8View { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Utf8View{} + x.Init(buf, n+offset) + return x +} + +func FinishUtf8ViewBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.Finish(offset) +} + +func GetSizePrefixedRootAsUtf8View(buf []byte, offset flatbuffers.UOffsetT) *Utf8View { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Utf8View{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + +func FinishSizePrefixedUtf8ViewBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) { + builder.FinishSizePrefixed(offset) +} + +func (rcv *Utf8View) Init(buf []byte, i flatbuffers.UOffsetT) { + rcv._tab.Bytes = buf + rcv._tab.Pos = i +} + +func (rcv *Utf8View) Table() flatbuffers.Table { + return rcv._tab +} + +func Utf8ViewStart(builder *flatbuffers.Builder) { + builder.StartObject(0) +} +func Utf8ViewEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { + return builder.EndObject() +} From c6d76da50e5c437e32963ea80ca2dc384b826ec4 Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Thu, 19 Sep 2024 13:29:38 -0400 Subject: [PATCH 10/12] add support for field metadata and ValidateStatementExecution cases --- dev/flight-integration/cases/flight_sql.go | 383 ++++++++++++++++----- 1 file changed, 292 insertions(+), 91 deletions(-) diff --git a/dev/flight-integration/cases/flight_sql.go b/dev/flight-integration/cases/flight_sql.go index f26954a67c170..35b7a871a60f7 100644 --- a/dev/flight-integration/cases/flight_sql.go +++ b/dev/flight-integration/cases/flight_sql.go @@ -47,6 +47,30 @@ func init() { fkCatalog = "fk_catalog" fkDbSchema = "fk_db_schema" fkTable = "fk_table" + + stmtQuery = "SELECT STATEMENT" + stmtQueryHandle = "SELECT STATEMENT HANDLE" + stmtUpdate = "UPDATE STATEMENT" + stmtUpdateRows = int64(10000) + + queryFields = []field{ + { + Name: "id", + Type: flatbuf.TypeInt, + GetTypeTable: int64TypeTable, + Nullable: true, + Metadata: map[string]string{ + "ARROW:FLIGHT:SQL:TABLE_NAME": "test", + "ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT": "1", + "ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE": "0", + "ARROW:FLIGHT:SQL:TYPE_NAME": "type_test", + "ARROW:FLIGHT:SQL:SCHEMA_NAME": "schema_test", + "ARROW:FLIGHT:SQL:IS_SEARCHABLE": "1", + "ARROW:FLIGHT:SQL:CATALOG_NAME": "catalog_test", + "ARROW:FLIGHT:SQL:PRECISION": "100", + }, + }, + } ) testcases := []struct { @@ -183,7 +207,7 @@ func init() { {Name: "column_size", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}, {Name: "literal_prefix", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, {Name: "literal_suffix", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable, Nullable: true}, - {Name: "create_params", Type: flatbuf.TypeList, GetTypeTable: createParamsTypeTable, Nullable: true}, // TODO: list elements + {Name: "create_params", Type: flatbuf.TypeList, GetTypeTable: createParamsTypeTable, Nullable: true}, {Name: "nullable", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, {Name: "case_sensitive", Type: flatbuf.TypeBool, GetTypeTable: boolTypeTable, Nullable: false}, {Name: "searchable", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: false}, @@ -203,64 +227,105 @@ func init() { Command: &flight.CommandGetSqlInfo{Info: []uint32{0, 3}}, Fields: []field{ {Name: "info_name", Type: flatbuf.TypeInt, GetTypeTable: uint32TypeTable, Nullable: false}, - {Name: "value", Type: flatbuf.TypeUnion, GetTypeTable: sqlInfoValuesTypeTable, Nullable: false}, // TODO: Union elements + {Name: "value", Type: flatbuf.TypeUnion, GetTypeTable: sqlInfoValuesTypeTable, Nullable: false}, }, }, } steps := make([]scenario.ScenarioStep, 0) + + // ValidateMetadataRetrieval for _, tc := range testcases { name := proto.MessageName(tc.Command).Name() steps = append( steps, scenario.ScenarioStep{Name: fmt.Sprintf("GetFlightInfo/%s", name), ServerHandler: scenario.Handler{GetFlightInfo: echoFlightInfo}}, - scenario.ScenarioStep{ - Name: fmt.Sprintf("DoGet/%s", name), - ServerHandler: scenario.Handler{ - DoGet: func(t *flight.Ticket, fs flight.FlightService_DoGetServer) error { - var anycmd anypb.Any - if err := proto.Unmarshal(t.Ticket, &anycmd); err != nil { - return status.Errorf(codes.InvalidArgument, "unable to parse ticket: %s", err.Error()) - } - - cmd := proto.Clone(tc.Command) - proto.Reset(cmd) - - if err := anycmd.UnmarshalTo(cmd); err != nil { - return status.Errorf(codes.InvalidArgument, "unable to unmarshal proto.Any: %s", err.Error()) - } - - return fs.Send(&flight.FlightData{DataHeader: buildFlatbufferSchema(tc.Fields)}) - }, - }, - }, - scenario.ScenarioStep{ - Name: fmt.Sprintf("GetSchema/%s", name), - ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { - var anycmd anypb.Any - if err := proto.Unmarshal(fd.Cmd, &anycmd); err != nil { - return nil, status.Errorf(codes.InvalidArgument, "unable to parse command: %s", err.Error()) - } - - cmd := proto.Clone(tc.Command) - proto.Reset(cmd) - - if err := anycmd.UnmarshalTo(cmd); err != nil { - return nil, status.Errorf(codes.InvalidArgument, "unable to unmarshal proto.Any: %s", err.Error()) - } - - schema := writeFlatbufferPayload(tc.Fields) - - return &flight.SchemaResult{Schema: schema}, nil - }}, - }) + scenario.ScenarioStep{Name: fmt.Sprintf("DoGet/%s", name), ServerHandler: scenario.Handler{DoGet: doGetFieldsForCommandFn(tc.Command, tc.Fields)}}, + scenario.ScenarioStep{Name: fmt.Sprintf("GetSchema/%s", name), ServerHandler: scenario.Handler{GetSchema: getSchemaFieldsForCommandFn(tc.Command, tc.Fields)}}) } + // ValidateStatementExecution + steps = append( + steps, + scenario.ScenarioStep{ + Name: "GetFlightInfo/CommandStatementQuery", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + var cmd flight.CommandStatementQuery + if err := deserializeProtobufPayload(fd.Cmd, &cmd); err != nil { + return nil, status.Errorf(codes.InvalidArgument, "failed to deserialize FlightDescriptor.Cmd: %s", err) + } + + if cmd.GetQuery() != stmtQuery { + return nil, status.Errorf(codes.InvalidArgument, "expected query: %s, found: %s", stmtQuery, cmd.GetQuery()) + } + + if len(cmd.GetTransactionId()) != 0 { + return nil, status.Errorf(codes.InvalidArgument, "expected no TransactionID") + } + + handle, err := createStatementQueryTicket([]byte(stmtQueryHandle)) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to create Ticket: %s", err) + } + + return &flight.FlightInfo{ + Endpoint: []*flight.FlightEndpoint{{ + Ticket: &flight.Ticket{Ticket: handle}, + }}, + }, nil + }}}, + scenario.ScenarioStep{Name: "DoGet/TicketStatementQuery", ServerHandler: scenario.Handler{DoGet: func(t *flight.Ticket, fs flight.FlightService_DoGetServer) error { + var cmd flight.TicketStatementQuery + if err := deserializeProtobufPayload(t.Ticket, &cmd); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize Ticket.Ticket: %s", err) + } + + if string(cmd.GetStatementHandle()) != stmtQueryHandle { + return status.Errorf(codes.InvalidArgument, "expected handle: %s, found: %s", stmtQueryHandle, cmd.GetStatementHandle()) + } + + return fs.Send(&flight.FlightData{DataHeader: buildFlatbufferSchema(queryFields)}) + }}}, + scenario.ScenarioStep{Name: "GetSchema/CommandStatementQuery", ServerHandler: scenario.Handler{GetSchema: getSchemaFieldsForCommandFn(&flight.CommandStatementQuery{}, queryFields)}}, + + scenario.ScenarioStep{ + Name: "DoPut/CommandStatementUpdate", + ServerHandler: scenario.Handler{DoPut: func(fs flight.FlightService_DoPutServer) error { + data, err := fs.Recv() + if err != nil { + return status.Errorf(codes.Internal, "unable to read from stream: %s", err) + } + + desc := data.FlightDescriptor + var cmd flight.CommandStatementUpdate + if err := deserializeProtobufPayload(desc.Cmd, &cmd); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize FlightDescriptor.Cmd: %s", err) + } + + if cmd.GetQuery() != stmtUpdate { + return status.Errorf(codes.InvalidArgument, "expected query: %s, found: %s", stmtUpdate, cmd.GetQuery()) + } + + if len(cmd.GetTransactionId()) != 0 { + return status.Errorf(codes.InvalidArgument, "expected no TransactionID") + } + + appMetadata, err := proto.Marshal(&flight.DoPutUpdateResult{RecordCount: stmtUpdateRows}) + if err != nil { + return status.Errorf(codes.Internal, "failed to marshal DoPutUpdateResult: %s", err) + } + + return fs.Send(&flight.PutResult{AppMetadata: appMetadata}) + }}}, + ) + scenario.Register( scenario.Scenario{ Name: "flight_sql", Steps: steps, RunClient: func(ctx context.Context, client flight.FlightServiceClient, t *tester.Tester) { + + // ValidateMetadataRetrieval for _, tc := range testcases { // pack the command desc, err := descForCommand(tc.Command) @@ -278,66 +343,60 @@ func init() { t.Require().NoError(err) // validate first message is properly formatted schema message - data, err := stream.Recv() - t.Require().NoError(err) - - msg := flatbuf.GetRootAsMessage(data.DataHeader, 0) - t.Require().Equal(flatbuf.MessageHeaderSchema, msg.HeaderType()) - - fields, ok := parseFlatbufferSchemaFields(msg) - t.Require().True(ok) - t.Require().Len(fields, len(tc.Fields)) - - for _, expectedField := range tc.Fields { - field, found := matchFieldByName(fields, expectedField.Name) - t.Require().Truef(found, "no matching field with expected name \"%s\" found in flatbuffer schema", expectedField.Name) - - t.Assert().Equal(expectedField.Name, string(field.Name())) - t.Assert().Equal(expectedField.Type, field.TypeType()) - t.Assert().Equal(expectedField.Nullable, field.Nullable()) - } + requireStreamHeaderMatchesFields(t, stream, tc.Fields) // drain rest of stream - for { - data, err = stream.Recv() - if err == io.EOF { - break - } - t.Require().NoError(err) - - // no more schema messages - t.Assert().Contains( - []flatbuf.MessageHeader{ - flatbuf.MessageHeaderRecordBatch, - flatbuf.MessageHeaderDictionaryBatch, - }, - flatbuf.GetRootAsMessage(data.DataHeader, 0).HeaderType(), - ) - } + requireDrainStream(t, stream) // issue GetSchema res, err := client.GetSchema(ctx, desc) t.Require().NoError(err) // expect schema to be serialized as full IPC stream Schema message - metadata := extractFlatbufferPayload(res.Schema) + requireSchemaResultMatchesFields(t, res, tc.Fields) + } - msg = flatbuf.GetRootAsMessage(metadata, 0) - t.Require().Equal(flatbuf.MessageHeaderSchema, msg.HeaderType()) + // ValidateStatementExecution + cmdQuery := flight.CommandStatementQuery{Query: stmtQuery} + descQuery, err := descForCommand(&cmdQuery) + t.Require().NoError(err) - fields, ok = parseFlatbufferSchemaFields(msg) - t.Require().True(ok) - t.Require().Len(fields, len(tc.Fields)) + infoQuery, err := client.GetFlightInfo(ctx, descQuery) + t.Require().NoError(err) - for _, expectedField := range tc.Fields { - field, found := matchFieldByName(fields, expectedField.Name) - t.Require().Truef(found, "no matching field with expected name \"%s\" found in flatbuffer schema", expectedField.Name) + t.Require().Greater(len(infoQuery.Endpoint), 0) - t.Assert().Equal(expectedField.Name, string(field.Name())) - t.Assert().Equal(expectedField.Type, field.TypeType()) - t.Assert().Equal(expectedField.Nullable, field.Nullable()) - } - } + // fetch result streamQuery + streamQuery, err := client.DoGet(ctx, infoQuery.Endpoint[0].Ticket) + t.Require().NoError(err) + + // validate result stream + requireStreamHeaderMatchesFields(t, streamQuery, queryFields) + requireDrainStream(t, streamQuery) + + schemaResultQuery, err := client.GetSchema(ctx, descQuery) + t.Require().NoError(err) + + // expect schema to be serialized as full IPC stream Schema message + requireSchemaResultMatchesFields(t, schemaResultQuery, queryFields) + + cmdUpdate := flight.CommandStatementUpdate{Query: stmtUpdate} + descUpdate, err := descForCommand(&cmdUpdate) + t.Require().NoError(err) + + streamUpdate, err := client.DoPut(ctx) + t.Require().NoError(err) + + t.Require().NoError(streamUpdate.Send(&flight.FlightData{FlightDescriptor: descUpdate})) + t.Require().NoError(streamUpdate.CloseSend()) + + putResult, err := streamUpdate.Recv() + t.Require().NoError(err) + + var updateResult flight.DoPutUpdateResult + t.Require().NoError(proto.Unmarshal(putResult.GetAppMetadata(), &updateResult)) + + t.Assert().Equal(stmtUpdateRows, updateResult.GetRecordCount()) }, }, ) @@ -347,6 +406,7 @@ type field struct { Name string Type flatbuf.Type Nullable bool + Metadata map[string]string GetTypeTable func(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) } @@ -581,14 +641,33 @@ func buildFlatbufferSchema(fields []field) []byte { func buildFlatbufferField(b *flatbuffers.Builder, f field) flatbuffers.UOffsetT { nameOffset := b.CreateString(f.Name) - typOffset, childrenOffset := f.GetTypeTable(b) + var kvOffsets []flatbuffers.UOffsetT + for k, v := range f.Metadata { + kk := b.CreateString(k) + vv := b.CreateString(v) + flatbuf.KeyValueStart(b) + flatbuf.KeyValueAddKey(b, kk) + flatbuf.KeyValueAddValue(b, vv) + kvOffsets = append(kvOffsets, flatbuf.KeyValueEnd(b)) + } + + var metadataOffset flatbuffers.UOffsetT + if len(kvOffsets) > 0 { + flatbuf.FieldStartCustomMetadataVector(b, len(kvOffsets)) + for i := len(kvOffsets) - 1; i >= 0; i-- { + b.PrependUOffsetT(kvOffsets[i]) + } + metadataOffset = b.EndVector(len(kvOffsets)) + } + flatbuf.FieldStart(b) flatbuf.FieldAddName(b, nameOffset) flatbuf.FieldAddTypeType(b, f.Type) flatbuf.FieldAddType(b, typOffset) flatbuf.FieldAddChildren(b, childrenOffset) + flatbuf.FieldAddCustomMetadata(b, metadataOffset) flatbuf.FieldAddNullable(b, f.Nullable) return flatbuf.FieldEnd(b) } @@ -658,3 +737,125 @@ func echoFlightInfo(ctx context.Context, fd *flight.FlightDescriptor) (*flight.F }}, }, nil } + +func doGetFieldsForCommandFn(cmd proto.Message, fields []field) func(t *flight.Ticket, fs flight.FlightService_DoGetServer) error { + return func(t *flight.Ticket, fs flight.FlightService_DoGetServer) error { + cmd := proto.Clone(cmd) + proto.Reset(cmd) + + if err := deserializeProtobufPayload(t.Ticket, cmd); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize Ticket.Ticket: %s", err) + } + + return fs.Send(&flight.FlightData{DataHeader: buildFlatbufferSchema(fields)}) + } +} + +func getSchemaFieldsForCommandFn(cmd proto.Message, fields []field) func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + return func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + cmd := proto.Clone(cmd) + proto.Reset(cmd) + + if err := deserializeProtobufPayload(fd.Cmd, cmd); err != nil { + return nil, status.Errorf(codes.InvalidArgument, "failed to deserialize FlightDescriptor.Cmd: %s", err) + } + + schema := writeFlatbufferPayload(fields) + + return &flight.SchemaResult{Schema: schema}, nil + } +} + +func deserializeProtobufPayload(b []byte, dst proto.Message) error { + var anycmd anypb.Any + if err := proto.Unmarshal(b, &anycmd); err != nil { + return fmt.Errorf("unable to unmarshal payload to proto.Any: %s", err) + } + + if err := anycmd.UnmarshalTo(dst); err != nil { + return fmt.Errorf("unable to unmarshal proto.Any: %s", err) + } + + return nil +} + +func createStatementQueryTicket(handle []byte) ([]byte, error) { + query := &flight.TicketStatementQuery{StatementHandle: handle} + + var ticket anypb.Any + if err := ticket.MarshalFrom(query); err != nil { + return nil, fmt.Errorf("unable to marshal ticket proto to proto.Any: %s", err) + } + + b, err := proto.Marshal(&ticket) + if err != nil { + return nil, fmt.Errorf("unable to marshal proto.Any to bytes: %s", err) + } + + return b, nil +} + +func requireStreamHeaderMatchesFields[T interface { + Recv() (*flight.FlightData, error) +}](t *tester.Tester, stream T, expectedFields []field) { + + data, err := stream.Recv() + t.Require().NoError(err) + + msg := flatbuf.GetRootAsMessage(data.DataHeader, 0) + t.Require().Equal(flatbuf.MessageHeaderSchema, msg.HeaderType()) + + fields, ok := parseFlatbufferSchemaFields(msg) + t.Require().True(ok) + t.Require().Len(fields, len(expectedFields)) + + for _, expectedField := range expectedFields { + field, found := matchFieldByName(fields, expectedField.Name) + t.Require().Truef(found, "no matching field with expected name \"%s\" found in flatbuffer schema", expectedField.Name) + + t.Assert().Equal(expectedField.Name, string(field.Name())) + t.Assert().Equal(expectedField.Type, field.TypeType()) + t.Assert().Equal(expectedField.Nullable, field.Nullable()) + } +} + +func requireDrainStream[T interface { + Recv() (*flight.FlightData, error) +}](t *tester.Tester, stream T) { + for { + data, err := stream.Recv() + if err == io.EOF { + break + } + t.Require().NoError(err) + + // no more schema messages + t.Assert().Contains( + []flatbuf.MessageHeader{ + flatbuf.MessageHeaderRecordBatch, + flatbuf.MessageHeaderDictionaryBatch, + }, + flatbuf.GetRootAsMessage(data.DataHeader, 0).HeaderType(), + ) + } +} + +func requireSchemaResultMatchesFields(t *tester.Tester, res *flight.SchemaResult, expectedFields []field) { + metadata := extractFlatbufferPayload(res.Schema) + + msg := flatbuf.GetRootAsMessage(metadata, 0) + t.Require().Equal(flatbuf.MessageHeaderSchema, msg.HeaderType()) + + fields, ok := parseFlatbufferSchemaFields(msg) + t.Require().True(ok) + t.Require().Len(fields, len(expectedFields)) + + for _, expectedField := range expectedFields { + field, found := matchFieldByName(fields, expectedField.Name) + t.Require().Truef(found, "no matching field with expected name \"%s\" found in flatbuffer schema", expectedField.Name) + + t.Assert().Equal(expectedField.Name, string(field.Name())) + t.Assert().Equal(expectedField.Type, field.TypeType()) + t.Assert().Equal(expectedField.Nullable, field.Nullable()) + } +} From 5b136f6b48e64ce068f254ef0cde379cb08044d5 Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Thu, 19 Sep 2024 13:43:10 -0400 Subject: [PATCH 11/12] clean up composed types --- dev/flight-integration/cases/flight_sql.go | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/dev/flight-integration/cases/flight_sql.go b/dev/flight-integration/cases/flight_sql.go index 35b7a871a60f7..18de5b2e37631 100644 --- a/dev/flight-integration/cases/flight_sql.go +++ b/dev/flight-integration/cases/flight_sql.go @@ -454,29 +454,11 @@ func boolTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UO } func createParamsTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { - childOffset := buildFlatbufferField(b, field{Name: "item", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable}) - - flatbuf.ListStart(b) - listOffset := flatbuf.ListEnd(b) - - flatbuf.FieldStartChildrenVector(b, 1) - b.PrependUOffsetT(childOffset) - childVecOffset := b.EndVector(1) - - return listOffset, childVecOffset + return listTypeTable(b, field{Name: "item", Type: flatbuf.TypeUtf8, GetTypeTable: utf8TypeTable}) } func int32ListTypeTable(b *flatbuffers.Builder) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { - childOffset := buildFlatbufferField(b, field{Name: "item", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}) // TODO: nullable? - - flatbuf.ListStart(b) - listOffset := flatbuf.ListEnd(b) - - flatbuf.FieldStartChildrenVector(b, 1) - b.PrependUOffsetT(childOffset) - childVecOffset := b.EndVector(1) - - return listOffset, childVecOffset + return listTypeTable(b, field{Name: "item", Type: flatbuf.TypeInt, GetTypeTable: int32TypeTable, Nullable: true}) } func listTypeTable(b *flatbuffers.Builder, child field) (flatbuffers.UOffsetT, flatbuffers.UOffsetT) { From 7d08b609dc8f79b99534e2875d2e5089d15638ed Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Thu, 19 Sep 2024 17:24:04 -0400 Subject: [PATCH 12/12] complete flight_sql scenario --- dev/flight-integration/cases/flight_sql.go | 432 +++++++++++++++++++-- 1 file changed, 410 insertions(+), 22 deletions(-) diff --git a/dev/flight-integration/cases/flight_sql.go b/dev/flight-integration/cases/flight_sql.go index 18de5b2e37631..5454c6426531d 100644 --- a/dev/flight-integration/cases/flight_sql.go +++ b/dev/flight-integration/cases/flight_sql.go @@ -19,6 +19,7 @@ package cases import ( "context" "encoding/binary" + "errors" "fmt" "io" @@ -53,6 +54,15 @@ func init() { stmtUpdate = "UPDATE STATEMENT" stmtUpdateRows = int64(10000) + stmtPreparedQuery = "SELECT PREPARED STATEMENT" + stmtPreparedQueryHandle = "SELECT PREPARED STATEMENT HANDLE" + stmtPreparedUpdate = "UPDATE PREPARED STATEMENT" + stmtPreparedUpdateHandle = "UPDATE PREPARED STATEMENT HANDLE" + stmtPreparedUpdateRows = int64(20000) + + createPreparedStatementActionType = "CreatePreparedStatement" + closePreparedStatementActionType = "ClosePreparedStatement" + queryFields = []field{ { Name: "id", @@ -319,6 +329,213 @@ func init() { }}}, ) + // ValidatePreparedStatementExecution + steps = append( + steps, + scenario.ScenarioStep{ + Name: "DoAction/ActionCreatePreparedStatementRequest", + ServerHandler: scenario.Handler{DoAction: func(a *flight.Action, fs flight.FlightService_DoActionServer) error { + var req flight.ActionCreatePreparedStatementRequest + if err := deserializeProtobufPayload(a.Body, &req); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize Action.Body: %s", err) + } + + if req.GetQuery() != stmtPreparedQuery { + return status.Errorf(codes.InvalidArgument, "expected query: %s, found: %s", stmtPreparedQuery, req.GetQuery()) + } + + if len(req.GetTransactionId()) != 0 { + return status.Errorf(codes.InvalidArgument, "expected no TransactionID") + } + + body, err := serializeProtobufWrappedInAny(&flight.ActionCreatePreparedStatementResult{PreparedStatementHandle: []byte(stmtPreparedQueryHandle)}) + if err != nil { + return status.Errorf(codes.Internal, "failed to ActionCreatePreparedStatementResult: %s", err) + } + + return fs.Send(&flight.Result{Body: body}) + }}}, + scenario.ScenarioStep{ + Name: "DoPut/CommandPreparedStatementQuery", + ServerHandler: scenario.Handler{DoPut: func(fs flight.FlightService_DoPutServer) error { + data, err := fs.Recv() + if err != nil { + return status.Errorf(codes.Internal, "unable to read from stream: %s", err) + } + + msg := flatbuf.GetRootAsMessage(data.DataHeader, 0) + if msg.HeaderType() != flatbuf.MessageHeaderSchema { + return status.Errorf(codes.Internal, "invalid stream, expected first message to be Schema: %s", err) + } + + fields, ok := parseFlatbufferSchemaFields(msg) + if !ok { + return status.Errorf(codes.Internal, "failed to parse flatbuffer schema") + } + + // TODO: maybe don't use tester here + t := tester.NewTester() + assertSchemaMatchesFields(t, fields, queryFields) + if len(t.Errors()) > 0 { + return status.Errorf(codes.Internal, "flatbuffer schema mismatch: %s", errors.Join(t.Errors()...)) + } + + desc := data.FlightDescriptor + var cmd flight.CommandPreparedStatementQuery + if err := deserializeProtobufPayload(desc.Cmd, &cmd); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize FlightDescriptor.Cmd: %s", err) + } + + if string(cmd.GetPreparedStatementHandle()) != stmtPreparedQueryHandle { + return status.Errorf(codes.InvalidArgument, "expected handle: %s, found: %s", stmtPreparedQueryHandle, cmd.GetPreparedStatementHandle()) + } + + appMetadata, err := proto.Marshal(&flight.DoPutPreparedStatementResult{PreparedStatementHandle: cmd.GetPreparedStatementHandle()}) + if err != nil { + return status.Errorf(codes.Internal, "failed to marshal DoPutPreparedStatementResult: %s", err) + } + + return fs.Send(&flight.PutResult{AppMetadata: appMetadata}) + }}}, + scenario.ScenarioStep{ + Name: "GetFlightInfo/CommandPreparedStatementQuery", + ServerHandler: scenario.Handler{GetFlightInfo: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.FlightInfo, error) { + var cmd flight.CommandPreparedStatementQuery + if err := deserializeProtobufPayload(fd.Cmd, &cmd); err != nil { + return nil, status.Errorf(codes.InvalidArgument, "failed to deserialize FlightDescriptor.Cmd: %s", err) + } + + if string(cmd.GetPreparedStatementHandle()) != stmtPreparedQueryHandle { + return nil, status.Errorf(codes.InvalidArgument, "expected handle: %s, found: %s", stmtPreparedQueryHandle, cmd.GetPreparedStatementHandle()) + } + + return &flight.FlightInfo{ + Endpoint: []*flight.FlightEndpoint{{ + Ticket: &flight.Ticket{Ticket: fd.Cmd}, + }}, + }, nil + }}}, + scenario.ScenarioStep{ + Name: "DoGet/CommandPreparedStatementQuery", + ServerHandler: scenario.Handler{DoGet: func(t *flight.Ticket, fs flight.FlightService_DoGetServer) error { + var cmd flight.CommandPreparedStatementQuery + if err := deserializeProtobufPayload(t.Ticket, &cmd); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize Ticket.Ticket: %s", err) + } + + if string(cmd.GetPreparedStatementHandle()) != stmtPreparedQueryHandle { + return status.Errorf(codes.InvalidArgument, "expected handle: %s, found: %s", stmtPreparedQueryHandle, cmd.GetPreparedStatementHandle()) + } + + return fs.Send(&flight.FlightData{DataHeader: buildFlatbufferSchema(queryFields)}) + }}}, + scenario.ScenarioStep{ + Name: "GetSchema/CommandPreparedStatementQuery", + ServerHandler: scenario.Handler{GetSchema: func(ctx context.Context, fd *flight.FlightDescriptor) (*flight.SchemaResult, error) { + var cmd flight.CommandPreparedStatementQuery + if err := deserializeProtobufPayload(fd.Cmd, &cmd); err != nil { + return nil, status.Errorf(codes.InvalidArgument, "failed to deserialize FlightDescriptor.Cmd: %s", err) + } + + if string(cmd.GetPreparedStatementHandle()) != stmtPreparedQueryHandle { + return nil, status.Errorf(codes.InvalidArgument, "expected handle: %s, found: %s", stmtPreparedQueryHandle, cmd.GetPreparedStatementHandle()) + } + + return &flight.SchemaResult{Schema: writeFlatbufferPayload(queryFields)}, nil + }}}, + scenario.ScenarioStep{ + Name: "DoAction/ActionClosePreparedStatementRequest", + ServerHandler: scenario.Handler{DoAction: func(a *flight.Action, fs flight.FlightService_DoActionServer) error { + var req flight.ActionClosePreparedStatementRequest + if err := deserializeProtobufPayload(a.Body, &req); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize Action.Body: %s", err) + } + + if string(req.GetPreparedStatementHandle()) != stmtPreparedQueryHandle { + return status.Errorf(codes.InvalidArgument, "expected handle: %s, found: %s", stmtPreparedQueryHandle, req.GetPreparedStatementHandle()) + } + + return fs.Send(&flight.Result{}) + }}}, + + scenario.ScenarioStep{ + Name: "DoAction/ActionCreatePreparedStatementRequest", + ServerHandler: scenario.Handler{DoAction: func(a *flight.Action, fs flight.FlightService_DoActionServer) error { + var req flight.ActionCreatePreparedStatementRequest + if err := deserializeProtobufPayload(a.Body, &req); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize Action.Body: %s", err) + } + + if req.GetQuery() != stmtPreparedUpdate { + return status.Errorf(codes.InvalidArgument, "expected query: %s, found: %s", stmtPreparedUpdate, req.GetQuery()) + } + + if len(req.GetTransactionId()) != 0 { + return status.Errorf(codes.InvalidArgument, "expected no TransactionID") + } + + body, err := serializeProtobufWrappedInAny(&flight.ActionCreatePreparedStatementResult{PreparedStatementHandle: []byte(stmtPreparedUpdateHandle)}) + if err != nil { + return status.Errorf(codes.Internal, "failed to ActionCreatePreparedStatementResult: %s", err) + } + + return fs.Send(&flight.Result{Body: body}) + }}}, + scenario.ScenarioStep{ + Name: "DoPut/CommandPreparedStatementUpdate", + ServerHandler: scenario.Handler{DoPut: func(fs flight.FlightService_DoPutServer) error { + data, err := fs.Recv() + if err != nil { + return status.Errorf(codes.Internal, "unable to read from stream: %s", err) + } + + msg := flatbuf.GetRootAsMessage(data.DataHeader, 0) + if msg.HeaderType() != flatbuf.MessageHeaderSchema { + return status.Errorf(codes.Internal, "invalid stream, expected first message to be Schema: %s", err) + } + + fields, ok := parseFlatbufferSchemaFields(msg) + if !ok { + return status.Errorf(codes.Internal, "failed to parse flatbuffer schema") + } + + if len(fields) != 0 { + return status.Errorf(codes.InvalidArgument, "bind schema not expected") + } + + desc := data.FlightDescriptor + var cmd flight.CommandPreparedStatementUpdate + if err := deserializeProtobufPayload(desc.Cmd, &cmd); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize FlightDescriptor.Cmd: %s", err) + } + + if string(cmd.GetPreparedStatementHandle()) != stmtPreparedUpdateHandle { + return status.Errorf(codes.InvalidArgument, "expected handle: %s, found: %s", stmtPreparedUpdateHandle, cmd.GetPreparedStatementHandle()) + } + + appMetadata, err := proto.Marshal(&flight.DoPutUpdateResult{RecordCount: stmtPreparedUpdateRows}) + if err != nil { + return status.Errorf(codes.Internal, "failed to marshal DoPutPreparedStatementResult: %s", err) + } + + return fs.Send(&flight.PutResult{AppMetadata: appMetadata}) + }}}, + scenario.ScenarioStep{ + Name: "DoAction/ActionClosePreparedStatementRequest", + ServerHandler: scenario.Handler{DoAction: func(a *flight.Action, fs flight.FlightService_DoActionServer) error { + var req flight.ActionClosePreparedStatementRequest + if err := deserializeProtobufPayload(a.Body, &req); err != nil { + return status.Errorf(codes.InvalidArgument, "failed to deserialize Action.Body: %s", err) + } + + if string(req.GetPreparedStatementHandle()) != stmtPreparedUpdateHandle { + return status.Errorf(codes.InvalidArgument, "expected handle: %s, found: %s", stmtPreparedUpdateHandle, req.GetPreparedStatementHandle()) + } + + return fs.Send(&flight.Result{}) + }}}, + ) + scenario.Register( scenario.Scenario{ Name: "flight_sql", @@ -326,6 +543,7 @@ func init() { RunClient: func(ctx context.Context, client flight.FlightServiceClient, t *tester.Tester) { // ValidateMetadataRetrieval + //////////////////////////// for _, tc := range testcases { // pack the command desc, err := descForCommand(tc.Command) @@ -346,7 +564,16 @@ func init() { requireStreamHeaderMatchesFields(t, stream, tc.Fields) // drain rest of stream - requireDrainStream(t, stream) + requireDrainStream(t, stream, func(t *tester.Tester, data *flight.FlightData) { + // no more schema messages + t.Assert().Contains( + []flatbuf.MessageHeader{ + flatbuf.MessageHeaderRecordBatch, + flatbuf.MessageHeaderDictionaryBatch, + }, + flatbuf.GetRootAsMessage(data.DataHeader, 0).HeaderType(), + ) + }) // issue GetSchema res, err := client.GetSchema(ctx, desc) @@ -357,6 +584,7 @@ func init() { } // ValidateStatementExecution + ///////////////////////////// cmdQuery := flight.CommandStatementQuery{Query: stmtQuery} descQuery, err := descForCommand(&cmdQuery) t.Require().NoError(err) @@ -372,7 +600,16 @@ func init() { // validate result stream requireStreamHeaderMatchesFields(t, streamQuery, queryFields) - requireDrainStream(t, streamQuery) + requireDrainStream(t, streamQuery, func(t *tester.Tester, data *flight.FlightData) { + // no more schema messages + t.Assert().Contains( + []flatbuf.MessageHeader{ + flatbuf.MessageHeaderRecordBatch, + flatbuf.MessageHeaderDictionaryBatch, + }, + flatbuf.GetRootAsMessage(data.DataHeader, 0).HeaderType(), + ) + }) schemaResultQuery, err := client.GetSchema(ctx, descQuery) t.Require().NoError(err) @@ -397,6 +634,134 @@ func init() { t.Require().NoError(proto.Unmarshal(putResult.GetAppMetadata(), &updateResult)) t.Assert().Equal(stmtUpdateRows, updateResult.GetRecordCount()) + + // ValidatePreparedStatementExecution + ///////////////////////////////////// + prepareAction, err := packAction(createPreparedStatementActionType, &flight.ActionCreatePreparedStatementRequest{Query: stmtPreparedQuery}) + t.Require().NoError(err) + + prepareStream, err := client.DoAction(ctx, prepareAction) + t.Require().NoError(err) + + t.Require().NoError(prepareStream.CloseSend()) + + actionResult, err := prepareStream.Recv() + t.Require().NoError(err) + + var prepareResult flight.ActionCreatePreparedStatementResult + t.Require().NoError(deserializeProtobufPayload(actionResult.Body, &prepareResult)) + + t.Require().Equal(stmtPreparedQueryHandle, string(prepareResult.GetPreparedStatementHandle())) + requireDrainStream(t, prepareStream, nil) + + putPreparedStream, err := client.DoPut(ctx) + t.Require().NoError(err) + + descPutPrepared, err := descForCommand(&flight.CommandPreparedStatementQuery{PreparedStatementHandle: prepareResult.GetPreparedStatementHandle()}) + t.Require().NoError(err) + + t.Require().NoError(putPreparedStream.Send(&flight.FlightData{FlightDescriptor: descPutPrepared, DataHeader: buildFlatbufferSchema(queryFields)})) + t.Require().NoError(putPreparedStream.CloseSend()) + + putResult, err = putPreparedStream.Recv() + t.Require().NoError(err) + + // TODO: legacy server doesn't provide a response + + var doPutPreparedResult flight.DoPutPreparedStatementResult + t.Require().NoError(proto.Unmarshal(putResult.GetAppMetadata(), &doPutPreparedResult)) + t.Require().Equal(stmtPreparedQueryHandle, string(doPutPreparedResult.GetPreparedStatementHandle())) + + descPutPrepared, err = descForCommand(&flight.CommandPreparedStatementQuery{PreparedStatementHandle: doPutPreparedResult.GetPreparedStatementHandle()}) + t.Require().NoError(err) + + infoPreparedQuery, err := client.GetFlightInfo(ctx, descPutPrepared) + t.Require().NoError(err) + + t.Require().Greater(len(infoPreparedQuery.Endpoint), 0) + + streamPreparedQuery, err := client.DoGet(ctx, infoPreparedQuery.Endpoint[0].Ticket) + t.Require().NoError(err) + + // validate result stream + requireStreamHeaderMatchesFields(t, streamPreparedQuery, queryFields) + requireDrainStream(t, streamQuery, func(t *tester.Tester, data *flight.FlightData) { + // no more schema messages + t.Assert().Contains( + []flatbuf.MessageHeader{ + flatbuf.MessageHeaderRecordBatch, + flatbuf.MessageHeaderDictionaryBatch, + }, + flatbuf.GetRootAsMessage(data.DataHeader, 0).HeaderType(), + ) + }) + + { + schema, err := client.GetSchema(ctx, descPutPrepared) + t.Require().NoError(err) + + requireSchemaResultMatchesFields(t, schema, queryFields) + } + + { + action, err := packAction(closePreparedStatementActionType, &flight.ActionClosePreparedStatementRequest{PreparedStatementHandle: []byte(stmtPreparedQueryHandle)}) + t.Require().NoError(err) + + stream, err := client.DoAction(ctx, action) + t.Require().NoError(err) + + t.Require().NoError(stream.CloseSend()) + requireDrainStream(t, stream, nil) + } + + { + action, err := packAction(createPreparedStatementActionType, &flight.ActionCreatePreparedStatementRequest{Query: stmtPreparedUpdate}) + t.Require().NoError(err) + + stream, err := client.DoAction(ctx, action) + t.Require().NoError(err) + + t.Require().NoError(stream.CloseSend()) + + result, err := stream.Recv() + t.Require().NoError(err) + + var actionResult flight.ActionCreatePreparedStatementResult + t.Require().NoError(deserializeProtobufPayload(result.Body, &actionResult)) + + t.Require().Equal(stmtPreparedUpdateHandle, string(actionResult.GetPreparedStatementHandle())) + requireDrainStream(t, stream, nil) + } + + { + stream, err := client.DoPut(ctx) + t.Require().NoError(err) + + desc, err := descForCommand(&flight.CommandPreparedStatementUpdate{PreparedStatementHandle: []byte(stmtPreparedUpdateHandle)}) + t.Require().NoError(err) + + t.Require().NoError(stream.Send(&flight.FlightData{FlightDescriptor: desc, DataHeader: buildFlatbufferSchema(nil)})) + t.Require().NoError(stream.CloseSend()) + + putResult, err := stream.Recv() + t.Require().NoError(err) + + var updateResult flight.DoPutUpdateResult + t.Require().NoError(proto.Unmarshal(putResult.GetAppMetadata(), &updateResult)) + + t.Assert().Equal(stmtPreparedUpdateRows, updateResult.GetRecordCount()) + } + + { + action, err := packAction(closePreparedStatementActionType, &flight.ActionClosePreparedStatementRequest{PreparedStatementHandle: []byte(stmtPreparedUpdateHandle)}) + t.Require().NoError(err) + + stream, err := client.DoAction(ctx, action) + t.Require().NoError(err) + + t.Require().NoError(stream.CloseSend()) + requireDrainStream(t, stream, nil) + } }, }, ) @@ -777,6 +1142,33 @@ func createStatementQueryTicket(handle []byte) ([]byte, error) { return b, nil } +func serializeProtobufWrappedInAny(msg proto.Message) ([]byte, error) { + var anycmd anypb.Any + if err := anycmd.MarshalFrom(msg); err != nil { + return nil, fmt.Errorf("unable to marshal proto message to proto.Any: %s", err) + } + + b, err := proto.Marshal(&anycmd) + if err != nil { + return nil, fmt.Errorf("unable to marshal proto.Any to bytes: %s", err) + } + + return b, nil +} + +func packAction(actionType string, msg proto.Message) (*flight.Action, error) { + var action flight.Action + body, err := serializeProtobufWrappedInAny(msg) + if err != nil { + return nil, fmt.Errorf("failed to serialize action body: %s", err) + } + + action.Type = actionType + action.Body = body + + return &action, nil +} + func requireStreamHeaderMatchesFields[T interface { Recv() (*flight.FlightData, error) }](t *tester.Tester, stream T, expectedFields []field) { @@ -791,19 +1183,27 @@ func requireStreamHeaderMatchesFields[T interface { t.Require().True(ok) t.Require().Len(fields, len(expectedFields)) + assertSchemaMatchesFields(t, fields, expectedFields) +} + +func assertSchemaMatchesFields(t *tester.Tester, fields []flatbuf.Field, expectedFields []field) { for _, expectedField := range expectedFields { field, found := matchFieldByName(fields, expectedField.Name) - t.Require().Truef(found, "no matching field with expected name \"%s\" found in flatbuffer schema", expectedField.Name) + t.Assert().Truef(found, "no matching field with expected name \"%s\" found in flatbuffer schema", expectedField.Name) + if !found { + continue + } t.Assert().Equal(expectedField.Name, string(field.Name())) t.Assert().Equal(expectedField.Type, field.TypeType()) t.Assert().Equal(expectedField.Nullable, field.Nullable()) + // TODO: metadata? } } -func requireDrainStream[T interface { - Recv() (*flight.FlightData, error) -}](t *tester.Tester, stream T) { +func requireDrainStream[E any, S interface { + Recv() (E, error) +}](t *tester.Tester, stream S, eval func(*tester.Tester, E)) { for { data, err := stream.Recv() if err == io.EOF { @@ -811,14 +1211,9 @@ func requireDrainStream[T interface { } t.Require().NoError(err) - // no more schema messages - t.Assert().Contains( - []flatbuf.MessageHeader{ - flatbuf.MessageHeaderRecordBatch, - flatbuf.MessageHeaderDictionaryBatch, - }, - flatbuf.GetRootAsMessage(data.DataHeader, 0).HeaderType(), - ) + if eval != nil { + eval(t, data) + } } } @@ -832,12 +1227,5 @@ func requireSchemaResultMatchesFields(t *tester.Tester, res *flight.SchemaResult t.Require().True(ok) t.Require().Len(fields, len(expectedFields)) - for _, expectedField := range expectedFields { - field, found := matchFieldByName(fields, expectedField.Name) - t.Require().Truef(found, "no matching field with expected name \"%s\" found in flatbuffer schema", expectedField.Name) - - t.Assert().Equal(expectedField.Name, string(field.Name())) - t.Assert().Equal(expectedField.Type, field.TypeType()) - t.Assert().Equal(expectedField.Nullable, field.Nullable()) - } + assertSchemaMatchesFields(t, fields, expectedFields) }