Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1346#discussion_r15511199
  
    --- Diff: 
sql/core/src/main/java/org/apache/spark/sql/api/java/types/DataType.java ---
    @@ -0,0 +1,212 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.sql.api.java.types;
    +
    +import java.util.HashSet;
    +import java.util.List;
    +import java.util.Set;
    +
    +/**
    + * The base type of all Spark SQL data types.
    + *
    + * To get/create specific data type, users should use singleton objects 
and factory methods
    + * provided by this class.
    + */
    +public abstract class DataType {
    +
    +  /**
    +   * Gets the StringType object.
    +   */
    +  public static final StringType StringType = new StringType();
    +
    +  /**
    +   * Gets the BinaryType object.
    +   */
    +  public static final BinaryType BinaryType = new BinaryType();
    +
    +  /**
    +   * Gets the BooleanType object.
    +   */
    +  public static final BooleanType BooleanType = new BooleanType();
    +
    +  /**
    +   * Gets the TimestampType object.
    +   */
    +  public static final TimestampType TimestampType = new TimestampType();
    +
    +  /**
    +   * Gets the DecimalType object.
    +   */
    +  public static final DecimalType DecimalType = new DecimalType();
    +
    +  /**
    +   * Gets the DoubleType object.
    +   */
    +  public static final DoubleType DoubleType = new DoubleType();
    +
    +  /**
    +   * Gets the FloatType object.
    +   */
    +  public static final FloatType FloatType = new FloatType();
    +
    +  /**
    +   * Gets the ByteType object.
    +   */
    +  public static final ByteType ByteType = new ByteType();
    +
    +  /**
    +   * Gets the IntegerType object.
    +   */
    +  public static final IntegerType IntegerType = new IntegerType();
    +
    +  /**
    +   * Gets the LongType object.
    +   */
    +  public static final LongType LongType = new LongType();
    +
    +  /**
    +   * Gets the ShortType object.
    +   */
    +  public static final ShortType ShortType = new ShortType();
    +
    +  /**
    +   * Creates an ArrayType by specifying the data type of elements ({@code 
elementType}).
    +   * The field of {@code containsNull} is set to {@code false}.
    +   *
    +   * @param elementType
    +   * @return
    +   */
    +  public static ArrayType createArrayType(DataType elementType) {
    +    if (elementType == null) {
    +      throw new IllegalArgumentException("elementType should not be 
null.");
    +    }
    +
    +    return new ArrayType(elementType, false);
    +  }
    +
    +  /**
    +   * Creates an ArrayType by specifying the data type of elements ({@code 
elementType}) and
    +   * whether the array contains null values ({@code containsNull}).
    +   * @param elementType
    +   * @param containsNull
    +   * @return
    +   */
    +  public static ArrayType createArrayType(DataType elementType, boolean 
containsNull) {
    +    if (elementType == null) {
    +      throw new IllegalArgumentException("elementType should not be 
null.");
    +    }
    +
    +    return new ArrayType(elementType, containsNull);
    +  }
    +
    +  /**
    +   * Creates a MapType by specifying the data type of keys ({@code 
keyType}) and values
    +   * ({@code keyType}). The field of {@code valueContainsNull} is set to 
{@code true}.
    +   *
    +   * @param keyType
    +   * @param valueType
    +   * @return
    --- End diff --
    
    remove the  return tag if you are not going to say anything about it. also 
remove it for other functions in this pr.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to