Yang Jie created SPARK-58220:
--------------------------------
Summary: Fix scaladoc and comment errors across sql/api
Key: SPARK-58220
URL: https://issues.apache.org/jira/browse/SPARK-58220
Project: Spark
Issue Type: Documentation
Components: SQL
Affects Versions: 5.0.0
Reporter: Yang Jie
A sweep of the sql/api module surfaced a batch of scaladoc/comment defects
where the documentation contradicts the code (copy-paste artifacts, wrong
parameter names, examples calling the wrong symbol, stale/incorrect
statements). All are documentation-only; none change behavior.
Examples:
- `SQLContext.tables()` documents a `database` column, but the output schema
emits `namespace`.
- `functions`-style copy-paste: `DataFrameStatFunctions.corr` examples are
swapped between the 2-arg and 3-arg overloads; `Dataset.groupingSets` second
example is malformed and would not compile.
- Wrong semantics: `SparkSession.config(String, String)` `@note` claims "only
supported in Connect mode" (it works in Classic too);
`SparkDateTimeUtils.truncateTimeToPrecision` example uses microseconds for a
nanosecond method.
- `catalog.interface` `Database`/`Function` `@param` docs say "table";
`Catalog.createExternalTable` (and `SQLContext.createExternalTable`)
options-based overloads say "from the given path" though they take no path.
- Others in `DataTypes.java` (createMapType keyType/valueType),
`TimestampNTZType`, `NonEmptyNamespaceException`,
`QueryParsingErrors.cursorInvalidQualifierError`, `StructType`,
`PositionMapper`, `DateTimeFormatterHelper`, `StringConcat`, `SinkProgress`,
`UserDefinedAggregateFunction.bufferSchema`, `DataTypeAstBuilder`.
Fix: correct each comment to match the code. 19 files touched, documentation
only.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]