private boolean isRolledUpColumn(SqlIdentifier identifier, SqlValidatorScope scope) { Pair<String, String> pair = findTableColumnPair(identifier, scope); if (pair == null) { return false; } String tableAlias = pair.left; String columnName = pair.right; Table table = findTable(tableAlias); if (table != null) { return table.isRolledUp(columnName); } return false; }
private void checkRollUpInUsing(SqlIdentifier identifier, SqlNode leftOrRight) { leftOrRight = stripAs(leftOrRight); // if it's not a SqlIdentifier then that's fine, it'll be validated somewhere else. if (leftOrRight instanceof SqlIdentifier) { SqlIdentifier from = (SqlIdentifier) leftOrRight; Table table = findTable(catalogReader.getRootSchema(), Util.last(from.names), catalogReader.nameMatcher().isCaseSensitive()); String name = Util.last(identifier.names); if (table != null && table.isRolledUp(name)) { throw newValidationError(identifier, RESOURCE.rolledUpNotAllowed(name, "USING")); } } }
private boolean isRolledUpColumn(SqlIdentifier identifier, SqlValidatorScope scope) { Pair<String, String> pair = findTableColumnPair(identifier, scope); if (pair == null) { return false; } String tableAlias = pair.left; String columnName = pair.right; Table table = findTable(tableAlias); if (table != null) { return table.isRolledUp(columnName); } return false; }
private boolean isRolledUpColumn(SqlIdentifier identifier, SqlValidatorScope scope) { Pair<String, String> pair = findTableColumnPair(identifier, scope); if (pair == null) { return false; } String tableAlias = pair.left; String columnName = pair.right; Table table = findTable(tableAlias); if (table != null) { return table.isRolledUp(columnName); } return false; }
private void checkRollUpInUsing(SqlIdentifier identifier, SqlNode leftOrRight) { leftOrRight = stripAs(leftOrRight); // if it's not a SqlIdentifier then that's fine, it'll be validated somewhere else. if (leftOrRight instanceof SqlIdentifier) { SqlIdentifier from = (SqlIdentifier) leftOrRight; Table table = findTable(catalogReader.getRootSchema(), Util.last(from.names), catalogReader.nameMatcher().isCaseSensitive()); String name = Util.last(identifier.names); if (table != null && table.isRolledUp(name)) { throw newValidationError(identifier, RESOURCE.rolledUpNotAllowed(name, "USING")); } } }
private void checkRollUpInUsing(SqlIdentifier identifier, SqlNode leftOrRight) { leftOrRight = stripAs(leftOrRight); // if it's not a SqlIdentifier then that's fine, it'll be validated somewhere else. if (leftOrRight instanceof SqlIdentifier) { SqlIdentifier from = (SqlIdentifier) leftOrRight; Table table = findTable(catalogReader.getRootSchema(), Util.last(from.names), catalogReader.nameMatcher().isCaseSensitive()); String name = Util.last(identifier.names); if (table != null && table.isRolledUp(name)) { throw newValidationError(identifier, RESOURCE.rolledUpNotAllowed(name, "USING")); } } }