You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/16 22:42:56 UTC

[GitHub] [arrow] lidavidm commented on a change in pull request #11982: [JAVA] Implement type info method to flight-sql

lidavidm commented on a change in pull request #11982:
URL: https://github.com/apache/arrow/pull/11982#discussion_r770970117



##########
File path: format/FlightSql.proto
##########
@@ -867,6 +867,45 @@ enum SqlSupportsConvert {
   SQL_CONVERT_VARCHAR = 19;
 }
 
+/*
+ * Represents a request to retrieve information about data type supported ona 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,
+ *   data_type: int not null,
+ *   column_size: int,
+ *   literal_prefix: utf8,
+ *   literal_suffix: utf8,
+ *   create_params: utf8
+ *   nullable: int not null,
+ *   case_sensitive: bool null,
+ *   searchable: int not null,
+ *   unsigned_attribute: bool,
+ *   fixed_prec_scale: bool null,
+ *   auto_increment: bool,
+ *   local_type_name: utf8,
+ *   minimum_scale: int,
+ *   maximum_scale: int,
+ *   sql_data_type: int not null,
+ *   sql_datetime_sub: int,
+ *   num_prec_radix: int,
+ *   interval_precision. int
+ * >
+ * The returned data should be ordered by data_type and then by type_name.
+ */
+message CommandGetTypeInfo {
+  option (experimental) = true;
+
+  /*
+   * Specifies the data type to search for the info.
+   */
+  optional int32 data_type = 1;

Review comment:
       Where do the valid values of data_type come from?

##########
File path: format/FlightSql.proto
##########
@@ -867,6 +867,45 @@ enum SqlSupportsConvert {
   SQL_CONVERT_VARCHAR = 19;
 }
 
+/*
+ * Represents a request to retrieve information about data type supported ona 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,
+ *   data_type: int not null,
+ *   column_size: int,
+ *   literal_prefix: utf8,
+ *   literal_suffix: utf8,
+ *   create_params: utf8
+ *   nullable: int not null,

Review comment:
       nit: why is this not a bool?

##########
File path: format/FlightSql.proto
##########
@@ -867,6 +867,45 @@ enum SqlSupportsConvert {
   SQL_CONVERT_VARCHAR = 19;
 }
 
+/*
+ * Represents a request to retrieve information about data type supported ona 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,
+ *   data_type: int not null,
+ *   column_size: int,
+ *   literal_prefix: utf8,
+ *   literal_suffix: utf8,
+ *   create_params: utf8
+ *   nullable: int not null,
+ *   case_sensitive: bool null,
+ *   searchable: int not null,
+ *   unsigned_attribute: bool,
+ *   fixed_prec_scale: bool null,
+ *   auto_increment: bool,
+ *   local_type_name: utf8,
+ *   minimum_scale: int,
+ *   maximum_scale: int,
+ *   sql_data_type: int not null,
+ *   sql_datetime_sub: int,
+ *   num_prec_radix: int,
+ *   interval_precision. int

Review comment:
       Can we comment on what each of these fields is meant to be? I suppose they map 1:1 with JDBC, but we should have descriptions inline.
   
   What is (if any) the ODBC equivalent? Does this cover that?




-- 
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-unsubscribe@arrow.apache.org

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