001package gudusoft.gsqlparser.dlineage.dataflow.model;
002
003/**
004 * Authoritative classification of <em>what</em> a dlineage table endpoint is, so a
005 * consumer can decide bind-to-catalog vs collapse-through without re-deriving it from
006 * {@code name}/{@code type}/{@code subType} heuristics. This is orthogonal to
007 * {@link EndpointIntroduction} ("how it was introduced"): a {@code CREATE TABLE … AS
008 * SELECT} is a {@code CATALOG_OBJECT} introduced by {@code CTAS}.
009 *
010 * <p>Strictly additive: this is carried only by the new endpoint fields and never
011 * back-fills {@link SubType}. See
012 * docs/tmp/dlineage-authoritative-endpoint-classification.md.
013 *
014 * <p>The full value set is defined here; the §5.6 "minimum complete" scope only
015 * <em>produces</em> {@link #CATALOG_OBJECT}, {@link #LOCAL_TEMP_TABLE},
016 * {@link #GLOBAL_TEMP_TABLE}, {@link #TABLE_VARIABLE}, {@link #TEMPDB_OBJECT} and
017 * {@link #UNKNOWN}. The remaining values ({@code CTE}, {@code DERIVED_RESULTSET},
018 * {@code TVF_RESULT}, {@code CONSTANT}, {@code VARIABLE}) are reserved for later
019 * coverage.
020 */
021public enum EndpointKind {
022        CATALOG_OBJECT, LOCAL_TEMP_TABLE, GLOBAL_TEMP_TABLE, TABLE_VARIABLE,
023        TEMPDB_OBJECT, CTE, DERIVED_RESULTSET, TVF_RESULT, CONSTANT, VARIABLE, UNKNOWN
024}