Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,16 @@ object SQLConf {
.doc("When true, use legacy MySqlServer SMALLINT and REAL type mapping.")
.booleanConf
.createWithDefault(false)

val LONG_TIMESTAMP_CONVERSION_IN_SECONDS =
buildConf("spark.sql.legacy.longTimestampConversionInSeconds")
.internal()
.doc("When false, Byte/Short/Int/Long value is interpreted as milliseconds " +
"during the timestamp conversion ." +
"when true, the value will be interpreted as seconds " +
"to be consistent with decimal/double. ")
.booleanConf
.createWithDefault(true)
}

/**
Expand Down Expand Up @@ -2004,6 +2014,8 @@ class SQLConf extends Serializable with Logging {
def legacyMsSqlServerNumericMappingEnabled: Boolean =
getConf(LEGACY_MSSQLSERVER_NUMERIC_MAPPING_ENABLED)

def longTimestampConversionInSeconds: Boolean = getConf(LONG_TIMESTAMP_CONVERSION_IN_SECONDS)

/** ********************** SQLConf functionality methods ************ */

/** Set Spark SQL configuration properties. */
Expand Down