Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed 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 com.facebook.presto.metadata;
 
 
 
 import java.util.List;
 import java.util.Map;
 
 public interface Metadata
 {
     Type getType(TypeSignature signature);
 
     FunctionInfo resolveFunction(QualifiedName nameList<TypeSignatureparameterTypesboolean approximate);
 
     @NotNull
 
     boolean isAggregationFunction(QualifiedName name);
 
     @NotNull
 
     void addFunctions(List<? extends ParametricFunctionfunctions);
 
     FunctionInfo resolveOperator(OperatorType operatorTypeList<? extends TypeargumentTypes)
             throws OperatorNotFoundException;
 
     @NotNull
     List<StringlistSchemaNames(Session sessionString catalogName);

    
Returns a table handle for the specified table name.
 
     @NotNull
     Optional<TableHandlegetTableHandle(Session sessionQualifiedTableName tableName);

    
Return the metadata for the specified table handle.

Throws:
java.lang.RuntimeException if table handle is no longer valid
 
     @NotNull
     TableMetadata getTableMetadata(TableHandle tableHandle);

    
Get the names that match the specified table prefix (never null).
 
     @NotNull
     List<QualifiedTableNamelistTables(Session sessionQualifiedTablePrefix prefix);

    
Returns the handle for the sample weight column.

Throws:
java.lang.RuntimeException if the table handle is no longer valid
 
     @NotNull
Returns true iff this catalog supports creation of sampled tables
 
     boolean canCreateSampledTables(Session sessionString catalogName);

    
Gets all of the columns on the specified table, or an empty map if the columns can not be enumerated.

Throws:
java.lang.RuntimeException if table handle is no longer valid
 
     @NotNull
     Map<StringColumnHandlegetColumnHandles(TableHandle tableHandle);

    
Gets the metadata for the specified table column.

Throws:
java.lang.RuntimeException if table or column handles are no longer valid
 
    @NotNull
    ColumnMetadata getColumnMetadata(TableHandle tableHandleColumnHandle columnHandle);

    
Gets the metadata for all columns that match the specified table prefix.
    @NotNull
Creates a table using the specified table metadata.
    @NotNull
    void createTable(Session sessionString catalogNameTableMetadata tableMetadata);

    
Rename the specified table.
    void renameTable(TableHandle tableHandleQualifiedTableName newTableName);

    
Drops the specified table

Throws:
java.lang.RuntimeException if the table can not be dropped or table handle is no longer valid
    void dropTable(TableHandle tableHandle);

    
Begin the atomic creation of a table with data.
    OutputTableHandle beginCreateTable(Session sessionString catalogNameTableMetadata tableMetadata);

    
Commit a table creation with data after the data is written.
    void commitCreateTable(OutputTableHandle tableHandleCollection<Slicefragments);

    
Begin insert query
    InsertTableHandle beginInsert(Session sessionTableHandle tableHandle);

    
Commit insert query
    void commitInsert(InsertTableHandle tableHandleCollection<Slicefragments);

    
Gets all the loaded catalogs

Returns:
Map of catalog name to connector id
    @NotNull
    Map<StringStringgetCatalogNames();

    
Get the names that match the specified table prefix (never null).
    @NotNull
    List<QualifiedTableNamelistViews(Session sessionQualifiedTablePrefix prefix);

    
Get the view definitions that match the specified table prefix (never null).
    @NotNull
Returns the view definition for the specified view name.
    @NotNull
    Optional<ViewDefinitiongetView(Session sessionQualifiedTableName viewName);

    
Creates the specified view with the specified view definition.
    void createView(Session sessionQualifiedTableName viewNameString viewDataboolean replace);

    
Drops the specified view.
    void dropView(Session sessionQualifiedTableName viewName);
New to GrepCode? Check out our FAQ X