{
replaceVar(node);
}
private ColumnVar replaceVar(ValueColumnBase node) {
ColumnVar var;
if (gparent == parent || gparent instanceof UnionItem) {
var = parent.getVar(node.getVarName());
}
else {
var = gparent.getVarForChildren(node.getVarName());
}
if (var == null) {
node.replaceWith(new SqlNull());
}
else if (var.isImplied() && node.getParentNode() instanceof SqlIsNull) {
node.replaceWith(new IdColumn(var.getAlias(), "subj"));
}
else {
node.setRdbmsVar(var);
}
return var;