Github user sureshthalamati commented on a diff in the pull request:
https://github.com/apache/spark/pull/16209#discussion_r107728867
--- Diff: docs/sql-programming-guide.md ---
@@ -1223,6 +1223,13 @@ the following case-insensitive options:
This is a JDBC writer related option. If specified, this option
allows setting of database-specific table and partition options when creating a
table (e.g., <code>CREATE TABLE t (name string) ENGINE=InnoDB.</code>). This
option applies only to writing.
</td>
</tr>
+
+ <tr>
+ <td><code>createTableColumnTypes</code></td>
+ <td>
+ The database column data types to use instead of the defaults, when
creating the table. Data type information should be specified in the same
format as CREATE TABLE columns syntax (e.g: <code>"name CHAR(64), comments
VARCHAR(1024)")</code>. The specified types should be valid spark sql data
types. This option applies only to writing.
--- End diff --
VARCHAR(1024) is a valid data type in spark sql, it gets translated to
String internally in Spark. The data types specified in this property are
meant for target database, using VARCHAR for example because many RDBMS does
not have String data type.
Thank you for reviewing @viirya .
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]