Class ExpandedColumn
Object
gudusoft.gsqlparser.resolver2.expansion.ExpandedColumn
Represents a column expanded from a star (*) column.
When SELECT * is expanded, each column from the source tables becomes an ExpandedColumn. This class tracks: - The column name - The original star column it came from - The source (which table/namespace) - Whether to include table qualifier
Example:
SELECT * FROM employees
-- Expands to:
ExpandedColumn("id", employees.id, *, true)
ExpandedColumn("name", employees.name, *, true)
ExpandedColumn("salary", employees.salary, *, true)
-
Constructor Summary
ConstructorsConstructorDescriptionExpandedColumn(String columnName, ColumnSource columnSource, TResultColumn originalStarColumn, boolean includeQualifier) Create an expanded column from an unqualified star.ExpandedColumn(String columnName, ColumnSource columnSource, TResultColumn originalStarColumn, String tableQualifier, boolean includeQualifier) Create an expanded column from a qualified star (e.g., t1.*). -
Method Summary
-
Constructor Details
-
ExpandedColumn
public ExpandedColumn(String columnName, ColumnSource columnSource, TResultColumn originalStarColumn, boolean includeQualifier) Create an expanded column from an unqualified star.- Parameters:
columnName- the column namecolumnSource- the column sourceoriginalStarColumn- the original star columnincludeQualifier- whether to include table qualifier
-
ExpandedColumn
public ExpandedColumn(String columnName, ColumnSource columnSource, TResultColumn originalStarColumn, String tableQualifier, boolean includeQualifier) Create an expanded column from a qualified star (e.g., t1.*).- Parameters:
columnName- the column namecolumnSource- the column sourceoriginalStarColumn- the original star columntableQualifier- the table qualifier (e.g., "t1")includeQualifier- whether to include table qualifier
-
-
Method Details
-
getColumnName
-
getColumnSource
-
getOriginalStarColumn
-
getTableQualifier
-
isQualified
-
getQualifiedName
Get the fully qualified column name (e.g., "t1.id").- Returns:
- qualified name if qualifier is set, otherwise just column name
-
getUnqualifiedName
Get the column name without qualifier.- Returns:
- unqualified column name
-
getConfidence
Get the confidence score for this expanded column.- Returns:
- confidence [0.0, 1.0], or 1.0 if no source available
-
toString
-
equals
-
hashCode
-