kylepbit commented on a change in pull request #9368:
URL: https://github.com/apache/arrow/pull/9368#discussion_r660925732



##########
File path: format/FlightSQL.proto
##########
@@ -0,0 +1,295 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.
+ */
+
+syntax = "proto3";
+
+option java_package = "org.apache.arrow.flight.sql.impl";
+package arrow.flight.protocol.sql;
+
+/*
+ * Represents a metadata request. Used in the command member of 
FlightDescriptor
+ * for the following RPC calls:
+ *  - GetSchema: return the schema of the query.
+ *  - GetFlightInfo: execute the query.
+ *
+ * The returned schema will be:
+ * <
+ *  info_name: utf8,
+ *  value: dense_union<string_value: string, int_value: int32, bigint_value: 
int64, int32_bitmask: int32>
+ * >
+ * where there is one row per requested piece of metadata information.
+ */
+message CommandGetSqlInfo {
+  /*
+   * 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.
+   *
+   * // TODO: Flesh out the available set of metadata below.
+   *
+   * Initially, Flight SQL will support the following information types:
+   * - Server Information
+   * - Syntax Information
+   *
+   * 1. Server Information: Provides basic information about the Flight SQL 
Server.
+   *
+   * The name of the Flight SQL Server.
+   * FLIGHT_SQL_SERVER_NAME
+   *
+   * The native version of the Flight SQL Server.
+   * FLIGHT_SQL_SERVER_VERSION
+   *
+   * The Arrow version of the Flight SQL Server.
+   * FLIGHT_SQL_SERVER_ARROW_VERSION
+   *
+   * Indicates whether the Flight SQL Server is read only.
+   * FLIGHT_SQL_SERVER_READ_ONLY
+   *
+   * 2. SQL Syntax Information: provides information about SQL syntax 
supported by the Flight SQL Server.
+   *
+   * Indicates whether the Flight SQL Server supports CREATE and DROP of 
catalogs.
+   * In a SQL environment, a catalog is a collection of schemas.
+   * SQL_DDL_CATALOG
+   *
+   * Indicates whether the Flight SQL Server supports CREATE and DROP of 
schemas.
+   * In a SQL environment, a catalog is a collection of tables, views, indexes 
etc.
+   * SQL_DDL_SCHEMA
+   *
+   * Indicates whether the Flight SQL Server supports CREATE and DROP of 
tables.
+   * In a SQL environment, a table is a collection of rows of information. 
Each row of information
+   * may have one or more columns of data.
+   * SQL_DDL_TABLE
+   *
+   * Indicates the case sensitivity of catalog, table and schema names.
+   * SQL_IDENTIFIER_CASE
+   *
+   * Indicates the supported character(s) used to surround a delimited 
identifier.
+   * SQL_IDENTIFIER_QUOTE_CHAR
+   *
+   * Indicates case sensitivity of quoted identifiers.
+   * SQL_QUOTED_IDENTIFIER_CASE
+   *
+   */
+  repeated string info = 1;
+
+  // Implementation specific custom SqlInfo values.
+  repeated string custom_info = 2;
+}
+
+/*
+ Represents a request to retrieve the list of catalogs 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 query.
+ *
+ * The returned schema will be:
+ * <
+ *  catalog_name: utf8
+ * >
+ * The returned data should be ordered by catalog_name.
+ */
+message CommandGetCatalogs {
+}
+
+/*
+ * Represents a request to retrieve the list of schemas 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 query.
+ *
+ * The returned schema will be:
+ * <
+ *  catalog_name: utf8,
+ *  schema_name: utf8
+ * >

Review comment:
       I can go either way, the data overhead for repetition can be non-trivial 
so I like the idea of making it something else, I chose this for simplicity.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to