[SPARK-36227][SQL][DOCS][3.2] Remove TimestampNTZ from API docs

### What changes were proposed in this pull request?

Although we try to remove TimestampNTZ from Branch 3.2 in , it still shows up in our API doc:
https://dist.apache.org/repos/dist/dev/spark/v3.2.0-rc1-docs/_site/api/scala/org/apache/spark/sql/types/TimestampNTZType.html
https://dist.apache.org/repos/dist/dev/spark/v3.2.0-rc1-docs/_site/api/java/org/apache/spark/sql/types/DataType.html

This PR is to clean it up in the API docs by
* making the TimestampNTZ type private
* remove TimestampNTZ in DataTypes

The changes are only for branch 3.2.

### Why are the changes needed?

Fix API doc
### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Manually check generated docs

Closes #33837 from gengliangwang/privateNTZ.

Authored-by: Gengliang Wang <gengliang@apache.org>
Signed-off-by: Gengliang Wang <gengliang@apache.org>
This commit is contained in:
Gengliang Wang 2021-08-26 18:27:33 +08:00
parent 36be232eea
commit 52b3b2d5bc
2 changed files with 2 additions and 12 deletions

View file

@ -54,11 +54,6 @@ public class DataTypes {
*/ */
public static final DataType TimestampType = TimestampType$.MODULE$; public static final DataType TimestampType = TimestampType$.MODULE$;
/**
* Gets the TimestampNTZType object.
*/
public static final DataType TimestampNTZType = TimestampNTZType$.MODULE$;
/** /**
* Gets the CalendarIntervalType object. * Gets the CalendarIntervalType object.
*/ */

View file

@ -29,10 +29,8 @@ import org.apache.spark.annotation.Unstable
* To represent an absolute point in time, use `TimestampType` instead. * To represent an absolute point in time, use `TimestampType` instead.
* *
* Please use the singleton `DataTypes.TimestampNTZType` to refer the type. * Please use the singleton `DataTypes.TimestampNTZType` to refer the type.
* @since 3.3.0
*/ */
@Unstable private[spark] class TimestampNTZType private() extends AtomicType {
class TimestampNTZType private() extends AtomicType {
/** /**
* Internally, a timestamp is stored as the number of microseconds from * Internally, a timestamp is stored as the number of microseconds from
* the epoch of 1970-01-01T00:00:00.000000(Unix system time zero) * the epoch of 1970-01-01T00:00:00.000000(Unix system time zero)
@ -58,8 +56,5 @@ class TimestampNTZType private() extends AtomicType {
* the TimestampNTZType class. Otherwise, the companion object would be of type * the TimestampNTZType class. Otherwise, the companion object would be of type
* "TimestampNTZType" in byte code. Defined with a private constructor so the companion * "TimestampNTZType" in byte code. Defined with a private constructor so the companion
* object is the only possible instantiation. * object is the only possible instantiation.
*
* @since 3.3.0
*/ */
@Unstable private[spark] case object TimestampNTZType extends TimestampNTZType
case object TimestampNTZType extends TimestampNTZType