Package dev.frostlake.metastore.model
Class Schema
java.lang.Object
dev.frostlake.metastore.SqlObject
dev.frostlake.metastore.model.Schema
- All Implemented Interfaces:
Taggable
-
Field Summary
Fields inherited from class dev.frostlake.metastore.SqlObject
comment, createdTime, name, owner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddContact(Contact contact) voidvoidvoidaddFileFormat(FileFormat fileFormat) voidaddFunction(Function function) voidaddJoinPolicy(JoinPolicy policy) voidaddMaskingPolicy(MaskingPolicy policy) voidaddMaterializedView(MaterializedView materializedView) voidvoidaddProcedure(Procedure procedure) voidaddProjectionPolicy(ProjectionPolicy policy) voidaddRowAccessPolicy(RowAccessPolicy policy) voidaddSequence(Sequence sequence) voidvoidvoidvoidvoidvoidclone()Create a deep clone of this schema Note: Table data cloning must be handled separately at the storage engine levelvoiddropAggregationPolicy(String name) voiddropContact(String name) voidvoiddropDynamicTable(String name) voiddropFileFormat(String name) voiddropFunction(String name) voiddropFunctionBySignature(String name, List<DataType> argumentTypes) voiddropJoinPolicy(String name) voiddropMaskingPolicy(String name) voiddropMaterializedView(String name) voidvoiddropProcedure(String name) voiddropProcedureBySignature(String name, List<DataType> argumentTypes) voiddropProjectionPolicy(String name) voiddropRowAccessPolicy(String name) voiddropSequence(String name) voidvoiddropStream(String name) voidvoidvoidvoidgetAggregationPolicy(String name) getContact(String name) getCortexSearchService(String name) getDynamicTable(String name) getFileFormat(String name) getFunction(String name) getFunctionBySignature(String name, List<DataType> argumentTypes) getFunctionOverloads(String name) getJoinPolicy(String name) getMaskingPolicy(String name) getMaterializedView(String name) Get the type of this SQL object (e.g., "TABLE", "VIEW", "DATABASE") Subclasses should override to provide their specific typegetPipes()getProcedure(String name) getProcedureBySignature(String name, List<DataType> argumentTypes) getProcedureOverloads(String name) getProjectionPolicy(String name) getRowAccessPolicy(String name) getSequence(String name) The table, or a miss reported asreportedKind 'reportedName'.getTags()getTasks()getViews()booleanhasAggregationPolicy(String name) booleanhasContact(String name) booleanhasCortexSearchService(String name) booleanhasDynamicTable(String name) booleanhasFileFormat(String name) booleanhasFunctionSignature(String name, List<Parameter> parameters) Whether a function of that name already carries this signature (seeaddFunction(dev.frostlake.metastore.model.Function)).booleanhasJoinPolicy(String name) booleanhasMaskingPolicy(String name) booleanhasMaterializedView(String name) booleanhasProcedureSignature(String name, List<Parameter> parameters) Whether a procedure of that name already carries this signature (seeaddProcedure(dev.frostlake.metastore.model.Procedure)).booleanhasProjectionPolicy(String name) booleanhasRowAccessPolicy(String name) booleanbooleanhasStageExact(String name) Whether a stage of EXACTLY this name is here - the check a create makes, where a name that differs only in case is a different stage.booleanbooleanbooleanbooleanhasTemporaryTable(String name) Whether a TEMPORARY table of this name is here, shadowing whatever else holds the name.booleanWhether a view of this name exists, without the throwing lookupgetView(java.lang.String)performs.booleanholdsRelation(String name, RelationKind kind) Whether that kind holds the name here, a temporary object of it included.booleanqualifiedName(String memberName) database.schema.member— the fully spelled name a DDL miss is reported under.voidrejectNameHeldByOtherKind(String name, RelationKind kind, boolean temporary) The kinds that share one namespace in a schema: a table, a view, a materialized view, a dynamic table and a stream (live-verified).relationKindOf(String name) The kind holding that name, or null when none of the five does.voidrenameAggregationPolicy(String oldName, String newName) voidrenameJoinPolicy(String oldName, String newName) voidrenameMaskingPolicy(String oldName, String newName) voidrenameProjectionPolicy(String oldName, String newName) voidrenameRowAccessPolicy(String oldName, String newName) voidvoidsetDatabaseName(String databaseName) voidsetDataRetentionTimeInDays(Integer dataRetentionTimeInDays) voidsetTransientObject(boolean value) tableExact(String name) The table a SQL reference names, matched EXACTLY.Methods inherited from class dev.frostlake.metastore.SqlObject
equals, getComment, getCreatedTime, getName, getOwner, getTagValue, getTagValues, hashCode, rename, setComment, setName, setOwner, setTag, toString, unsetTag, withoutTrailingSemicolon
-
Constructor Details
-
Schema
-
-
Method Details
-
getDataRetentionTimeInDays
-
setDataRetentionTimeInDays
-
getDatabaseName
-
setDatabaseName
-
qualifiedName
database.schema.member— the fully spelled name a DDL miss is reported under. -
isTransientObject
public boolean isTransientObject() -
setTransientObject
public void setTransientObject(boolean value) -
addTable
-
dropTable
-
getTable
-
tableExact
The table a SQL reference names, matched EXACTLY. Live reports a miss asObject 'DB.SCHEMA.MIXEDTBL' does not exist or not authorized.— "Object", not "Table". -
getTable
The table, or a miss reported asreportedKind 'reportedName'. A DDL statement always spells the name in full, while a query or DML statement echoes what the writer wrote and calls a missing FROM-clause name anObject— so the caller, which knows the statement, chooses both. -
hasTable
-
getTables
-
addView
-
dropView
-
getView
-
hasView
Whether a view of this name exists, without the throwing lookupgetView(java.lang.String)performs. -
getViews
-
addMaterializedView
-
dropMaterializedView
-
getMaterializedView
-
hasMaterializedView
-
getMaterializedViews
-
addDynamicTable
-
dropDynamicTable
-
getDynamicTable
-
hasDynamicTable
-
getDynamicTables
-
addContact
-
dropContact
-
getContact
-
hasContact
-
getContacts
-
addJoinPolicy
-
dropJoinPolicy
-
getJoinPolicy
-
hasJoinPolicy
-
getJoinPolicies
-
renameJoinPolicy
-
addAggregationPolicy
-
dropAggregationPolicy
-
getAggregationPolicy
-
hasAggregationPolicy
-
getAggregationPolicies
-
renameAggregationPolicy
-
addProjectionPolicy
-
dropProjectionPolicy
-
getProjectionPolicy
-
hasProjectionPolicy
-
getProjectionPolicies
-
renameProjectionPolicy
-
addMaskingPolicy
-
dropMaskingPolicy
-
getMaskingPolicy
-
hasMaskingPolicy
-
getMaskingPolicies
-
renameMaskingPolicy
-
addRowAccessPolicy
-
dropRowAccessPolicy
-
getRowAccessPolicy
-
hasRowAccessPolicy
-
getRowAccessPolicies
-
renameRowAccessPolicy
-
addProcedure
-
dropProcedure
-
dropProcedureBySignature
-
getProcedure
-
getProcedureBySignature
-
getProcedures
-
getProcedureOverloads
-
addFunction
-
dropFunction
-
dropFunctionBySignature
-
getFunction
-
getFunctionBySignature
-
getFunctions
-
getFunctionOverloads
-
hasFunctionSignature
Whether a function of that name already carries this signature (seeaddFunction(dev.frostlake.metastore.model.Function)). -
hasProcedureSignature
Whether a procedure of that name already carries this signature (seeaddProcedure(dev.frostlake.metastore.model.Procedure)). -
addStream
-
dropStream
-
getStream
-
getStreams
-
addTask
-
dropTask
-
hasTask
-
getTask
-
getTasks
-
addPipe
-
dropPipe
-
getPipe
-
getPipes
-
addSequence
-
dropSequence
-
getSequence
-
getSequences
-
addFileFormat
-
dropFileFormat
-
getFileFormat
-
hasFileFormat
-
getFileFormats
-
clone
Create a deep clone of this schema Note: Table data cloning must be handled separately at the storage engine level -
addStage
-
dropStage
-
getStage
-
hasStage
-
hasStageExact
Whether a stage of EXACTLY this name is here - the check a create makes, where a name that differs only in case is a different stage. -
getStages
-
addCortexSearchService
-
dropCortexSearchService
-
getCortexSearchService
-
hasCortexSearchService
-
getCortexSearchServices
-
addTag
-
dropTag
-
getTag
-
hasTag
-
getTags
-
renameTag
-
rejectNameHeldByOtherKind
The kinds that share one namespace in a schema: a table, a view, a materialized view, a dynamic table and a stream (live-verified). A create over a name another of them holds is refused with the holder's kind,Object 'KT' already exists as TABLE, before the body is compiled and before an OR REPLACE drops anything; IF NOT EXISTS does not skip it.A TEMPORARY table is the exception: it may take the name of a view, a materialized view or a dynamic table, and it then shadows it. A stream's name it may not take. A TEMPORARY view may take a table's name the same way.
- Parameters:
name- the name being createdkind- the kind being createdtemporary- whether the create says TEMPORARY
-
relationKindOf
The kind holding that name, or null when none of the five does. A temporary object counts: a DROP reaches the session's own objects as a read does. -
holdsRelation
Whether that kind holds the name here, a temporary object of it included. -
hasTemporaryTable
Whether a TEMPORARY table of this name is here, shadowing whatever else holds the name. -
getObjectType
Description copied from class:SqlObjectGet the type of this SQL object (e.g., "TABLE", "VIEW", "DATABASE") Subclasses should override to provide their specific type- Specified by:
getObjectTypein classSqlObject- Returns:
- The object type as a string
-