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 2022/01/17 05:52:20 UTC

[GitHub] [arrow] jduo commented on a change in pull request #11982: ARROW-15313: [C++][Java][FlightRPC] Implement type info method to flight-sql

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



##########
File path: format/FlightSql.proto
##########
@@ -867,6 +867,69 @@ 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 (The name of the data type, for example: VARCHAR, INTEGER, etc),
+ *   data_type: int not null (The SQL data type),
+ *   column_size: int (The maximum column size that the server supports for this data type.
+ *                     For numeric data, this is the maximum precision.
+ *                     For string data, this is the length in characters.
+ *                     For datetime data types, this is 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: utf8 (A list of keywords, separated by commas, corresponding
+ *                        to each parameter that the application may specify in parentheses
+ *                        when using the name that is returned in the TYPE_NAME field.
+ *                        NULL is returned if there are no parameters for the data type definition.),
+ *   nullable: int not null (Shows if the data type accepts a NULL value),
+ *   case_sensitive: bool not null (Shows if a character data type is case-sensitive in collations and comparisons),
+ *   searchable: int not null (Shows how the data type is used in a WHERE clause),
+ *   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: int (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: int (The maximum scale of the data type on the data source.
+ *                       NULL is returned if scale is not applicable.),
+ *   sql_data_type: int not null (The value of the SQL data type as it appears in the

Review comment:
       This field represents the SQL type for most types. The exceptions are datetime and and interval types, where this holds the generic SQL_DATETIME or SQL_INTERVAL type. It's an indication to the user that they can get a more specific subtype of these by using the sql_datetime_sub field.




-- 
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