cloud-fan commented on code in PR #38113:
URL: https://github.com/apache/spark/pull/38113#discussion_r990131954
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVOptions.scala:
##########
@@ -327,3 +329,45 @@ class CSVOptions(
settings
}
}
+
+object CSVOptions extends DataSourceOptions {
+ val HEADER = newOption("header")
+ val INFER_SCHEMA = newOption("inferSchema")
+ val IGNORE_LEADING_WHITESPACE = newOption("ignoreLeadingWhiteSpace")
+ val IGNORE_TRAILING_WHITESPACE = newOption("ignoreTrailingWhiteSpace")
+ val PREFERS_DATE = newOption("prefersDate")
+ val ESCAPE_QUOTES = newOption("escapeQuotes")
+ val QUOTE_ALL = newOption("quoteAll")
+ val ENFORCE_SCHEMA = newOption("enforceSchema")
+ val QUOTE = newOption("quote")
+ val ESCAPE = newOption("escape")
+ val COMMENT = newOption("comment")
+ val MAX_COLUMNS = newOption("maxColumns")
+ val MAX_CHARS_PER_COLUMN = newOption("maxCharsPerColumn")
+ val MODE = newOption("mode")
+ val CHAR_TO_ESCAPE_QUOTE_ESCAPING = newOption("charToEscapeQuoteEscaping")
+ val LOCALE = newOption("locale")
+ val DATE_FORMAT = newOption("dateFormat")
+ val TIMESTAMP_FORMAT = newOption("timestampFormat")
+ val TIMESTAMP_NTZ_FORMAT = newOption("timestampNTZFormat")
+ val ENABLE_DATETIME_PARSING_FALLBACK =
newOption("enableDateTimeParsingFallback")
+ val MULTI_LINE = newOption("multiLine")
+ val SAMPLING_RATIO = newOption("samplingRatio")
+ val EMPTY_VALUE = newOption("emptynewOption")
+ val LINE_SEP = newOption("lineSep")
+ val INPUT_BUFFER_SIZE = newOption("inputBufferSize")
+ val COLUMN_NAME_OF_CORRUPT_RECORD = newOption("columnNameOfCorruptRecord")
+ val NULL_VALUE = newOption("nullValue")
+ val NAN_VALUE = newOption("nanValue")
+ val POSITIVE_INF = newOption("positiveInf")
+ val NEGATIVE_INF = newOption("negativeInf")
+ val TIME_ZONE = newOption("timeZone")
+ val UNESCAPED_QUOTE_HANDLING = newOption("unescapedQuoteHandling")
+ // Options with alternative
+ val CHARSET = newOption("charset")
+ val ENCODING = newOption("encoding", Some(CHARSET))
+ val CODEC = newOption("codec")
+ val COMPRESSION = newOption("compression", Some(CODEC))
Review Comment:
this looks confusing. why do we need to register an option twice if it has
an alternaive? I thought we only need to do it once as the register API allows
you to specify an alternative.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]