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

    https://github.com/apache/spark/pull/23086#discussion_r236850263
  
    --- Diff: sql/core/src/main/java/org/apache/spark/sql/sources/v2/Table.java 
---
    @@ -0,0 +1,51 @@
    +/*
    + * 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.sources.v2;
    +
    +import org.apache.spark.annotation.Evolving;
    +import org.apache.spark.sql.sources.v2.reader.Scan;
    +import org.apache.spark.sql.sources.v2.reader.ScanBuilder;
    +import org.apache.spark.sql.types.StructType;
    +
    +/**
    + * An interface representing a logical structured data set of a data 
source. For example, the
    + * implementation can be a directory on the file system, a topic of Kafka, 
or a table in the
    + * catalog, etc.
    + *
    + * This interface can mixin the following interfaces to support different 
operations:
    + * <ul>
    + *   <li>{@link SupportsBatchRead}: this table can be read in batch 
queries.</li>
    + * </ul>
    + */
    +@Evolving
    +public interface Table {
    --- End diff --
    
    It would be helpful for a `Table` to also expose a name or identifier of 
some kind. The `TableIdentifier` passed into `DataSourceV2Relation` is only 
used in `name` to identify the relation's table. If the name (or location for 
path-based tables) were supplied by the table instead, it would remove the need 
to pass it in the relation.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to