public class ShowTableRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.showTable
.
Retrieves detailed information about a table, view, or schema, specified in
tableName
. If the supplied tableName
is a schema the call can return information about either the
schema itself or the tables and views it contains. If tableName
is empty, information about all schemas will be returned.
If the option GET_SIZES
is set to TRUE
, then the number of records in each table is returned (in
sizes
and fullSizes
), along with
the total number of objects across all requested tables (in totalSize
and totalFullSize
).
For a schema, setting the SHOW_CHILDREN
option
to FALSE
returns only information about the schema
itself; setting SHOW_CHILDREN
to TRUE
returns a list of tables and views contained in the
schema, along with their corresponding detail.
To retrieve a list of every table, view, and schema in the database, set
tableName
to '*' and SHOW_CHILDREN
to TRUE
. When doing this, the returned
totalSize
and
totalFullSize
will not include the sizes of non-base tables (e.g., filters,
views, joins, etc.).
Modifier and Type | Class and Description |
---|---|
static class |
ShowTableRequest.Options
A set of string constants for the
ShowTableRequest parameter
options . |
Constructor and Description |
---|
ShowTableRequest()
Constructs a ShowTableRequest object with default parameters.
|
ShowTableRequest(String tableName,
Map<String,String> options)
Constructs a ShowTableRequest object with the specified parameters.
|
Modifier and Type | Method and Description | ||
---|---|---|---|
boolean |
equals(Object obj) |
||
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
Map<String,String> |
getOptions()
Optional parameters.
|
||
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
String |
getTableName()
Name of the table for which to retrieve the information, in
[schema_name.]table_name format, using standard
int hashCode() | ||
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||
ShowTableRequest |
setOptions(Map<String,String> options)
Optional parameters.
|
||
ShowTableRequest |
setTableName(String tableName)
|
public ShowTableRequest()
public ShowTableRequest(String tableName, Map<String,String> options)
tableName
- Name of the table for which to retrieve the
information, in [schema_name.]table_name format, using
standard name resolution rules. If blank,
then returns information about all tables and views.options
- Optional parameters.
DEPENDENCIES
:
Include view dependencies in the output.
Supported values:
The default value is FALSE
.
FORCE_SYNCHRONOUS
: If TRUE
then the table sizes will wait for read lock
before returning.
Supported values:
The default value is TRUE
.
GET_CACHED_SIZES
: If TRUE
then the number of records in each table, along
with a cumulative count, will be returned;
blank, otherwise. This version will return the
sizes cached at rank 0, which may be stale if
there is a multihead insert occuring.
Supported values:
The default value is FALSE
.
GET_SIZES
: If TRUE
then the number of records in
each table, along with a cumulative count, will
be returned; blank, otherwise.
Supported values:
The default value is FALSE
.
NO_ERROR_IF_NOT_EXISTS
: If FALSE
will return an error if the provided
tableName
does not exist. If TRUE
then it will return an empty
result.
Supported values:
The default value is FALSE
.
SHOW_CHILDREN
: If
tableName
is a schema, then TRUE
will return information about
the tables and views in the schema, and FALSE
will return information
about the schema itself. If tableName
is
a table or view, SHOW_CHILDREN
must be FALSE
. If tableName
is empty, then
SHOW_CHILDREN
must
be TRUE
.
Supported values:
The default value is TRUE
.
GET_COLUMN_INFO
:
If TRUE
then column info
(memory usage, etc) will be returned.
Supported values:
The default value is FALSE
.
Map
.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
tableName
.public ShowTableRequest setTableName(String tableName)
tableName
- The new value for tableName
.this
to mimic the builder pattern.public Map<String,String> getOptions()
DEPENDENCIES
: Include view
dependencies in the output.
Supported values:
The default value is FALSE
.
FORCE_SYNCHRONOUS
: If TRUE
then the table sizes will wait for read lock
before returning.
Supported values:
The default value is TRUE
.
GET_CACHED_SIZES
: If TRUE
then the number of records in each table,
along with a cumulative count, will be returned; blank,
otherwise. This version will return the sizes cached at rank 0,
which may be stale if there is a multihead insert occuring.
Supported values:
The default value is FALSE
.
GET_SIZES
: If TRUE
then the number of records in each table, along with a
cumulative count, will be returned; blank, otherwise.
Supported values:
The default value is FALSE
.
NO_ERROR_IF_NOT_EXISTS
:
If FALSE
will return an error if the
provided tableName
does not exist. If
TRUE
then it will return an empty result.
Supported values:
The default value is FALSE
.
SHOW_CHILDREN
: If tableName
is a schema, then TRUE
will return information about the tables and views in the
schema, and FALSE
will return information
about the schema itself. If tableName
is
a table or view, SHOW_CHILDREN
must be FALSE
. If tableName
is empty, then SHOW_CHILDREN
must be TRUE
.
Supported values:
The default value is TRUE
.
GET_COLUMN_INFO
: If TRUE
then column info (memory usage, etc) will be
returned.
Supported values:
The default value is FALSE
.
Map
.options
.public ShowTableRequest setOptions(Map<String,String> options)
DEPENDENCIES
: Include view
dependencies in the output.
Supported values:
The default value is FALSE
.
FORCE_SYNCHRONOUS
: If TRUE
then the table sizes will wait for read lock
before returning.
Supported values:
The default value is TRUE
.
GET_CACHED_SIZES
: If TRUE
then the number of records in each table,
along with a cumulative count, will be returned; blank,
otherwise. This version will return the sizes cached at rank 0,
which may be stale if there is a multihead insert occuring.
Supported values:
The default value is FALSE
.
GET_SIZES
: If TRUE
then the number of records in each table, along with a
cumulative count, will be returned; blank, otherwise.
Supported values:
The default value is FALSE
.
NO_ERROR_IF_NOT_EXISTS
:
If FALSE
will return an error if the
provided tableName
does not exist. If
TRUE
then it will return an empty result.
Supported values:
The default value is FALSE
.
SHOW_CHILDREN
: If tableName
is a schema, then TRUE
will return information about the tables and views in the
schema, and FALSE
will return information
about the schema itself. If tableName
is
a table or view, SHOW_CHILDREN
must be FALSE
. If tableName
is empty, then SHOW_CHILDREN
must be TRUE
.
Supported values:
The default value is TRUE
.
GET_COLUMN_INFO
: If TRUE
then column info (memory usage, etc) will be
returned.
Supported values:
The default value is FALSE
.
Map
.options
- The new value for options
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2025. All rights reserved.