congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
SchemaTableName.getTableName
Code IndexAdd Tabnine to your IDE (free)

How to use
getTableName
method
in
io.prestosql.spi.connector.SchemaTableName

Best Java code snippets using io.prestosql.spi.connector.SchemaTableName.getTableName (Showing top 20 results out of 315)

origin: io.prestosql/presto-plugin-toolkit

public Optional<Set<TablePrivilege>> match(String user, SchemaTableName table)
{
  if (userRegex.map(regex -> regex.matcher(user).matches()).orElse(true) &&
      schemaRegex.map(regex -> regex.matcher(table.getSchemaName()).matches()).orElse(true) &&
      tableRegex.map(regex -> regex.matcher(table.getTableName()).matches()).orElse(true)) {
    return Optional.of(privileges);
  }
  return Optional.empty();
}
origin: io.prestosql/presto-main

  private static Object[] tableRow(String catalog, SchemaTableName name, String type)
  {
    return new Object[] {catalog, name.getSchemaName(), name.getTableName(), type,
        null, null, null, null, null, null};
  }
}
origin: io.prestosql/presto-main

@Override
public ConnectorTableHandle getTableHandle(ConnectorSession connectorSession, SchemaTableName tableName)
{
  if (!TABLES.containsKey(tableName)) {
    return null;
  }
  return new InformationSchemaTableHandle(catalogName, tableName.getSchemaName(), tableName.getTableName());
}
origin: prestosql/presto

public void run(ExtendedHiveMetastore metastore)
{
  if (partitionName.isPresent()) {
    metastore.updatePartitionStatistics(tableName.getSchemaName(), tableName.getTableName(), partitionName.get(), this::updateStatistics);
  }
  else {
    metastore.updateTableStatistics(tableName.getSchemaName(), tableName.getTableName(), this::updateStatistics);
  }
  done = true;
}
origin: prestosql/presto

public void undo(ExtendedHiveMetastore metastore)
{
  if (!done) {
    return;
  }
  if (partitionName.isPresent()) {
    metastore.updatePartitionStatistics(tableName.getSchemaName(), tableName.getTableName(), partitionName.get(), this::resetStatistics);
  }
  else {
    metastore.updateTableStatistics(tableName.getSchemaName(), tableName.getTableName(), this::resetStatistics);
  }
}
origin: io.prestosql/presto-main

public static SystemTableHandle fromSchemaTableName(ConnectorId connectorId, SchemaTableName tableName)
{
  requireNonNull(tableName, "tableName is null");
  return new SystemTableHandle(connectorId, tableName.getSchemaName(), tableName.getTableName());
}
origin: io.prestosql/presto-main

  public static Function<SchemaTableName, QualifiedObjectName> convertFromSchemaTableName(String catalogName)
  {
    return input -> new QualifiedObjectName(catalogName, input.getSchemaName(), input.getTableName());
  }
}
origin: prestosql/presto

private List<HiveColumnHandle> getPartitionColumns(SchemaTableName tableName)
{
  Table sourceTable = metastore.getTable(tableName.getSchemaName(), tableName.getTableName()).get();
  return getPartitionKeyColumnHandles(sourceTable);
}
origin: prestosql/presto

@Override
public ExampleTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)
{
  if (!listSchemaNames(session).contains(tableName.getSchemaName())) {
    return null;
  }
  ExampleTable table = exampleClient.getTable(tableName.getSchemaName(), tableName.getTableName());
  if (table == null) {
    return null;
  }
  return new ExampleTableHandle(connectorId, tableName.getSchemaName(), tableName.getTableName());
}
origin: prestosql/presto

public synchronized void declareIntentionToWrite(ConnectorSession session, WriteMode writeMode, Path stagingPathRoot, String filePrefix, SchemaTableName schemaTableName)
{
  setShared();
  if (writeMode == WriteMode.DIRECT_TO_TARGET_EXISTING_DIRECTORY) {
    Map<List<String>, Action<PartitionAndMore>> partitionActionsOfTable = partitionActions.get(schemaTableName);
    if (partitionActionsOfTable != null && !partitionActionsOfTable.isEmpty()) {
      throw new PrestoException(NOT_SUPPORTED, "Can not insert into a table with a partition that has been modified in the same transaction when Presto is configured to skip temporary directories.");
    }
  }
  HdfsContext context = new HdfsContext(session, schemaTableName.getSchemaName(), schemaTableName.getTableName());
  declaredIntentionsToWrite.add(new DeclaredIntentionToWrite(writeMode, context, stagingPathRoot, filePrefix, schemaTableName));
}
origin: io.prestosql/presto-main

private Input createInput(TableMetadata table, Optional<TableLayoutHandle> layout, Set<Column> columns)
{
  SchemaTableName schemaTable = table.getTable();
  Optional<Object> inputMetadata = layout.flatMap(tableLayout -> metadata.getInfo(session, tableLayout));
  return new Input(table.getConnectorId(), schemaTable.getSchemaName(), schemaTable.getTableName(), inputMetadata, ImmutableList.copyOf(columns));
}
origin: io.prestosql/presto-hive

@Override
public synchronized Optional<List<String>> getAllTables(String databaseName)
{
  ImmutableList.Builder<String> tables = ImmutableList.builder();
  for (SchemaTableName schemaTableName : this.relations.keySet()) {
    if (schemaTableName.getSchemaName().equals(databaseName)) {
      tables.add(schemaTableName.getTableName());
    }
  }
  return Optional.of(tables.build());
}
origin: prestosql/presto

@Override
public synchronized Optional<List<String>> getAllTables(String databaseName)
{
  ImmutableList.Builder<String> tables = ImmutableList.builder();
  for (SchemaTableName schemaTableName : this.relations.keySet()) {
    if (schemaTableName.getSchemaName().equals(databaseName)) {
      tables.add(schemaTableName.getTableName());
    }
  }
  return Optional.of(tables.build());
}
origin: io.prestosql/presto-hive

@Override
public synchronized Optional<List<String>> getAllViews(String databaseName)
{
  ImmutableList.Builder<String> tables = ImmutableList.builder();
  for (SchemaTableName schemaTableName : this.views.keySet()) {
    if (schemaTableName.getSchemaName().equals(databaseName)) {
      tables.add(schemaTableName.getTableName());
    }
  }
  return Optional.of(tables.build());
}
origin: io.prestosql/presto-hive

@Override
protected ConnectorTableHandle getTableHandle(ConnectorMetadata metadata, SchemaTableName tableName)
{
  if (tableName.getTableName().startsWith(TEMPORARY_TABLE_PREFIX)) {
    return super.getTableHandle(metadata, tableName);
  }
  throw new SkipException("tests using existing tables are not supported");
}
origin: io.prestosql/presto-hive

private static HiveBasicStatistics getBasicStatisticsForPartition(Transaction transaction, SchemaTableName table, String partitionName)
{
  return transaction
      .getMetastore(table.getSchemaName())
      .getPartitionStatistics(table.getSchemaName(), table.getTableName(), ImmutableSet.of(partitionName))
      .get(partitionName)
      .getBasicStatistics();
}
origin: prestosql/presto

public static void insertIntoTableClusteringKeysInequality(CassandraSession session, SchemaTableName table, Date date, int rowsCount)
{
  for (Integer rowNumber = 1; rowNumber <= rowsCount; rowNumber++) {
    Insert insert = QueryBuilder.insertInto(table.getSchemaName(), table.getTableName())
        .value("key", "key_1")
        .value("clust_one", "clust_one")
        .value("clust_two", rowNumber)
        .value("clust_three", date.getTime() + rowNumber * 10);
    session.execute(insert);
  }
  assertEquals(session.execute("SELECT COUNT(*) FROM " + table).all().get(0).getLong(0), rowsCount);
}
origin: io.prestosql/presto-hive

private static HiveBasicStatistics getBasicStatisticsForTable(Transaction transaction, SchemaTableName table)
{
  return transaction
      .getMetastore(table.getSchemaName())
      .getTableStatistics(table.getSchemaName(), table.getTableName())
      .getBasicStatistics();
}
origin: prestosql/presto

private static HiveBasicStatistics getBasicStatisticsForTable(Transaction transaction, SchemaTableName table)
{
  return transaction
      .getMetastore(table.getSchemaName())
      .getTableStatistics(table.getSchemaName(), table.getTableName())
      .getBasicStatistics();
}
origin: io.prestosql/presto-main

@Override
public Void visitTableScan(TableScanNode node, IoPlanBuilder context)
{
  TableMetadata tableMetadata = metadata.getTableMetadata(session, node.getTable());
  context.addInputTableColumnInfo(new IoPlan.TableColumnInfo(
      new CatalogSchemaTableName(
          tableMetadata.getConnectorId().getCatalogName(),
          tableMetadata.getTable().getSchemaName(),
          tableMetadata.getTable().getTableName()),
      parseConstraints(node.getTable(), node.getCurrentConstraint())));
  return null;
}
io.prestosql.spi.connectorSchemaTableNamegetTableName

Popular methods of SchemaTableName

  • <init>
  • getSchemaName
  • toString
  • toSchemaTablePrefix
  • equals

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now