public class ASTNodeOrigin
extends java.lang.Object
select x+1 as y from t
, and we're processing a query
select v1.y from v as v1
, and there's a type-checking problem
with the expression x+1
due to an ALTER TABLE on t subsequent to
the creation of v. Then, when reporting the error, we want to provide the
parser location with respect to the definition of v (rather than with respect
to the top-level query, since that represents a completely different
"parser coordinate system").
So, when expanding the definition of v while analyzing the top-level query, we tag each ASTNode with a reference to an ASTNodeOrign describing v and its usage within the query.
Constructor and Description |
---|
ASTNodeOrigin(java.lang.String objectType,
java.lang.String objectName,
java.lang.String objectDefinition,
java.lang.String usageAlias,
ASTNode usageNode) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getObjectDefinition() |
java.lang.String |
getObjectName() |
java.lang.String |
getObjectType() |
java.lang.String |
getUsageAlias() |
ASTNode |
getUsageNode() |
public ASTNodeOrigin(java.lang.String objectType, java.lang.String objectName, java.lang.String objectDefinition, java.lang.String usageAlias, ASTNode usageNode)
public java.lang.String getObjectType()
public java.lang.String getObjectName()
public java.lang.String getObjectDefinition()
select x+1 as y from t
.public java.lang.String getUsageAlias()
public ASTNode getUsageNode()
v as v1
(this can help with
debugging context-dependent expansions)Copyright © 2012 The Apache Software Foundation