public SqlMonotonicity getMonotonicity(String columnName) { return table.getMonotonicity(columnName); }
public RelDataType getRowType() { return table.getRowType(); }
public SqlAccessType getAllowedAccess() { return table.getAllowedAccess(); } }
List<String> qualifiedNames = table.getQualifiedName(); if (qualifiedNames != null) { RelDataType rowType = table.getRowType(); List<RelDataTypeField> fields = rowType.getFieldList(); for (int i = 0; i < fields.size(); i++) { final String fieldName = fields.get(i).getName(); final SqlMonotonicity monotonicity = table.getMonotonicity(fieldName); if (monotonicity != SqlMonotonicity.NotMonotonic) { monotonicExprs.add(
private List<RelCollation> deduceMonotonicity(SqlValidatorTable table) { final RelDataType rowType = table.getRowType(); final List<RelCollation> collationList = new ArrayList<RelCollation>(); // Deduce which fields the table is sorted on. int i = -1; for (RelDataTypeField field : rowType.getFieldList()) { ++i; final SqlMonotonicity monotonicity = table.getMonotonicity(field.getName()); if (monotonicity != SqlMonotonicity.NotMonotonic) { final RelFieldCollation.Direction direction = monotonicity.isDecreasing() ? RelFieldCollation.Direction.Descending : RelFieldCollation.Direction.Ascending; collationList.add( RelCollationImpl.of( new RelFieldCollation( i, direction, RelFieldCollation.NullDirection.UNSPECIFIED))); } } return collationList; }
/** * Validates access to a table. * * @param table Table * @param requiredAccess Access requested on table */ private void validateAccess( SqlNode node, SqlValidatorTable table, SqlAccessEnum requiredAccess) { if (table != null) { SqlAccessType access = table.getAllowedAccess(); if (!access.allowsAccess(requiredAccess)) { throw newValidationError(node, RESOURCE.accessNotAllowed(requiredAccess.name(), table.getQualifiedName().toString())); } } }
public List<String> getQualifiedName() { return table.getQualifiedName(); }
private List<RelCollation> deduceMonotonicity(SqlValidatorTable table) { final RelDataType rowType = table.getRowType(); final List<RelCollation> collationList = new ArrayList<RelCollation>(); // Deduce which fields the table is sorted on. int i = -1; for (RelDataTypeField field : rowType.getFieldList()) { ++i; final SqlMonotonicity monotonicity = table.getMonotonicity(field.getName()); if (monotonicity != SqlMonotonicity.NOT_MONOTONIC) { final RelFieldCollation.Direction direction = monotonicity.isDecreasing() ? RelFieldCollation.Direction.DESCENDING : RelFieldCollation.Direction.ASCENDING; collationList.add( RelCollationImpl.of( new RelFieldCollation( i, direction, RelFieldCollation.NullDirection.UNSPECIFIED))); } } return collationList; }
/** * Validates access to a table. * * @param table Table * @param requiredAccess Access requested on table */ private void validateAccess( SqlNode node, SqlValidatorTable table, SqlAccessEnum requiredAccess) { if (table != null) { SqlAccessType access = table.getAllowedAccess(); if (!access.allowsAccess(requiredAccess)) { throw newValidationError( node, EigenbaseResource.instance().AccessNotAllowed.ex( requiredAccess.name(), table.getQualifiedName().toString())); } } }
public List<String> getQualifiedName() { return table.getQualifiedName(); }
public RelDataType getRowType() { return table.getRowType(); }
public SqlMonotonicity getMonotonicity(String columnName) { return table.getMonotonicity(columnName); }
final SqlValidatorTable table = namespace.getTable(); if (table != null) { origin.addAll(table.getQualifiedName()); } else { return null;
public SqlAccessType getAllowedAccess() { return table.getAllowedAccess(); } }
protected RelDataType validateImpl() { return table.getRowType(); }
public SqlMonotonicity getMonotonicity(String columnName) { final SqlValidatorTable table = getTable(); return table.getMonotonicity(columnName); } }
final SqlValidatorTable table = namespace.getTable(); if (table != null) { origin.addAll(table.getQualifiedName()); } else { return null;
public RelOptTable getTableForMember(List<String> names) { final SqlValidatorTable table = catalogReader.getTable(names); final RelDataType rowType = table.getRowType(); final List<RelCollation> collationList = deduceMonotonicity(table); if (names.size() < 3) { String[] newNames2 = {"CATALOG", "SALES", ""}; List<String> newNames = new ArrayList<String>(); int i = 0; while (newNames.size() < newNames2.length) { newNames.add(i, newNames2[i]); ++i; } names = newNames; } return createColumnSet(table, names, rowType, collationList); }
public SqlMonotonicity getMonotonicity(String columnName) { final SqlValidatorTable table = getTable(); return table.getMonotonicity(columnName); } }
if (validator.shouldExpandIdentifiers()) { List<String> qualifiedNames = table.getQualifiedName(); if (qualifiedNames != null) {