Class ShowTableRequest
- java.lang.Object
-
- com.gpudb.protocol.ShowTableRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class ShowTableRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.showTable.Retrieves detailed information about a table, view, or schema, specified in
tableName. If the suppliedtableNameis a schema the call can return information about either the schema itself or the tables and views it contains. IftableNameis empty, information about all schemas will be returned.If the option
GET_SIZESis set toTRUE, then the number of records in each table is returned (insizesandfullSizes), along with the total number of objects across all requested tables (intotalSizeandtotalFullSize).For a schema, setting the
SHOW_CHILDRENoption toFALSEreturns only information about the schema itself; settingSHOW_CHILDRENtoTRUEreturns 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
tableNameto '*' andSHOW_CHILDRENtoTRUE. When doing this, the returnedtotalSizeandtotalFullSizewill not include the sizes of non-base tables (e.g., filters, views, joins, etc.).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShowTableRequest.OptionsA set of string constants for theShowTableRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description ShowTableRequest()Constructs a ShowTableRequest object with default parameters.ShowTableRequest(String tableName, Map<String,String> options)Constructs a ShowTableRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()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.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetTableName()Name of the table for which to retrieve the information, in [schema_name.]table_name format, using standard name resolution rules.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.ShowTableRequestsetOptions(Map<String,String> options)Optional parameters.ShowTableRequestsetTableName(String tableName)Name of the table for which to retrieve the information, in [schema_name.]table_name format, using standard name resolution rules.StringtoString()
-
-
-
Constructor Detail
-
ShowTableRequest
public ShowTableRequest()
Constructs a ShowTableRequest object with default parameters.
-
ShowTableRequest
public ShowTableRequest(String tableName, Map<String,String> options)
Constructs a ShowTableRequest object with the specified parameters.- Parameters:
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 isFALSE.FORCE_SYNCHRONOUS: IfTRUEthen the table sizes will wait for read lock before returning. Supported values: The default value isTRUE.GET_ACCESS_DATA: IfTRUEthen data about the last read, write, alter and create will be returned. Supported values: The default value isFALSE.GET_CACHED_SIZES: IfTRUEthen 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 occurring. Supported values: The default value isFALSE.GET_SIZES: IfTRUEthen the number of records in each table, along with a cumulative count, will be returned; blank, otherwise. Supported values: The default value isFALSE.REFERENCING_MATERIALIZED_VIEWS: Include view dependents in the output. Supported values: The default value isFALSE.SKIP_ADDITIONAL_INFO: IfTRUEthen the response will not populate the additional_info field. Supported values: The default value isFALSE.NO_ERROR_IF_NOT_EXISTS: IfFALSEwill return an error if the providedtableNamedoes not exist. IfTRUEthen it will return an empty result. Supported values: The default value isFALSE.SKIP_TEMP_SCHEMAS: IfTRUEthen the table list will not include tables from SYS_TEMP and other system temporary schemas. This is the default behavior for non-admin users. Supported values: The default value isFALSE.SHOW_CHILDREN: IftableNameis a schema, thenTRUEwill return information about the tables and views in the schema, andFALSEwill return information about the schema itself. IftableNameis a table or view,SHOW_CHILDRENmust beFALSE. IftableNameis empty, thenSHOW_CHILDRENmust beTRUE. Supported values: The default value isTRUE.GET_COLUMN_INFO: IfTRUEthen column info (memory usage, etc) will be returned. Supported values: The default value isFALSE.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getTableName
public String getTableName()
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.- Returns:
- The current value of
tableName.
-
setTableName
public ShowTableRequest setTableName(String 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.- Parameters:
tableName- The new value fortableName.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.DEPENDENCIES: Include view dependencies in the output. Supported values: The default value isFALSE.FORCE_SYNCHRONOUS: IfTRUEthen the table sizes will wait for read lock before returning. Supported values: The default value isTRUE.GET_ACCESS_DATA: IfTRUEthen data about the last read, write, alter and create will be returned. Supported values: The default value isFALSE.GET_CACHED_SIZES: IfTRUEthen 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 occurring. Supported values: The default value isFALSE.GET_SIZES: IfTRUEthen the number of records in each table, along with a cumulative count, will be returned; blank, otherwise. Supported values: The default value isFALSE.REFERENCING_MATERIALIZED_VIEWS: Include view dependents in the output. Supported values: The default value isFALSE.SKIP_ADDITIONAL_INFO: IfTRUEthen the response will not populate the additional_info field. Supported values: The default value isFALSE.NO_ERROR_IF_NOT_EXISTS: IfFALSEwill return an error if the providedtableNamedoes not exist. IfTRUEthen it will return an empty result. Supported values: The default value isFALSE.SKIP_TEMP_SCHEMAS: IfTRUEthen the table list will not include tables from SYS_TEMP and other system temporary schemas. This is the default behavior for non-admin users. Supported values: The default value isFALSE.SHOW_CHILDREN: IftableNameis a schema, thenTRUEwill return information about the tables and views in the schema, andFALSEwill return information about the schema itself. IftableNameis a table or view,SHOW_CHILDRENmust beFALSE. IftableNameis empty, thenSHOW_CHILDRENmust beTRUE. Supported values: The default value isTRUE.GET_COLUMN_INFO: IfTRUEthen column info (memory usage, etc) will be returned. Supported values: The default value isFALSE.
Map.- Returns:
- The current value of
options.
-
setOptions
public ShowTableRequest setOptions(Map<String,String> options)
Optional parameters.DEPENDENCIES: Include view dependencies in the output. Supported values: The default value isFALSE.FORCE_SYNCHRONOUS: IfTRUEthen the table sizes will wait for read lock before returning. Supported values: The default value isTRUE.GET_ACCESS_DATA: IfTRUEthen data about the last read, write, alter and create will be returned. Supported values: The default value isFALSE.GET_CACHED_SIZES: IfTRUEthen 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 occurring. Supported values: The default value isFALSE.GET_SIZES: IfTRUEthen the number of records in each table, along with a cumulative count, will be returned; blank, otherwise. Supported values: The default value isFALSE.REFERENCING_MATERIALIZED_VIEWS: Include view dependents in the output. Supported values: The default value isFALSE.SKIP_ADDITIONAL_INFO: IfTRUEthen the response will not populate the additional_info field. Supported values: The default value isFALSE.NO_ERROR_IF_NOT_EXISTS: IfFALSEwill return an error if the providedtableNamedoes not exist. IfTRUEthen it will return an empty result. Supported values: The default value isFALSE.SKIP_TEMP_SCHEMAS: IfTRUEthen the table list will not include tables from SYS_TEMP and other system temporary schemas. This is the default behavior for non-admin users. Supported values: The default value isFALSE.SHOW_CHILDREN: IftableNameis a schema, thenTRUEwill return information about the tables and views in the schema, andFALSEwill return information about the schema itself. IftableNameis a table or view,SHOW_CHILDRENmust beFALSE. IftableNameis empty, thenSHOW_CHILDRENmust beTRUE. Supported values: The default value isTRUE.GET_COLUMN_INFO: IfTRUEthen column info (memory usage, etc) will be returned. Supported values: The default value isFALSE.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-