skip to main content
Connection Option Descriptions for Apache Spark SQL : Min Long Varchar Size
  

Try DataDirect Drivers Now

Min Long Varchar Size

Attribute

MinLongVarcharSize (MINLVS)

Purpose

Specifies the minimum count of characters the driver reports for columns mapped as SQL_LONGVARCHAR. If the size of a SQL_LONGVARCHAR column is less than the value specified, the driver will increase the reported size of the column to this value when calling SQLDescribeCol and SQLColumns. This allows you to fetch SQL_LONGVARCHAR columns whose size is smaller than the minimum imposed by some third-party applications, such as SQL Server Linked Server.

Valid Values

x
where:
x
is the minimum size in characters the driver will report for columns mapped to the SQL_LONGVARCHAR type.

Notes

*When returning result set metadata for Varchar columns, the Spark Thrift server reports the column type as (12) STRING and the precision as 2147483647. This issue can cause the settings of the following connection options to produce unexpected results: Max String Size, Min Long Varchar Size, String Describe Type, and Varchar Threshold. For the latest information about this issue, refer to the Apache JIRA SPARK-5918 issue Web page: https://issues.apache.org/jira/browse/SPARK-5918.
*Configuring the VarcharThreshold and MinLongVarcharSize options allows you to fetch SQL_VARCHAR and SQL_LONGVARCHAR columns with sizes that fall between the data-type ranges used by some applications, such as SQL Server Linked Server.

Default

None. If no value is specified, the driver will not change the column size reported for SQL_LONGVARCHAR columns.

GUI Tab

Advanced tab

See also

Varchar Threshold