table.unwrap(RelOptTable.class).getColumnStrategies(); for (final RelDataTypeField field : table.getRowType().getFieldList()) { final RelDataTypeField targetField =
@Override public List<ColumnStrategy> getColumnStrategies() { return relOptTable.getColumnStrategies(); }
/** Converts the ordinal of a field into the ordinal of a stored field. * That is, it subtracts the number of virtual fields that come before it. */ public static int realOrdinal(final RelOptTable table, int i) { List<ColumnStrategy> strategies = table.getColumnStrategies(); int n = 0; for (int j = 0; j < i; j++) { switch (strategies.get(j)) { case VIRTUAL: ++n; } } return i - n; }
/** Converts the ordinal of a field into the ordinal of a stored field. * That is, it subtracts the number of virtual fields that come before it. */ public static int realOrdinal(final RelOptTable table, int i) { List<ColumnStrategy> strategies = table.getColumnStrategies(); int n = 0; for (int j = 0; j < i; j++) { switch (strategies.get(j)) { case VIRTUAL: ++n; } } return i - n; }
public List<ColumnStrategy> getColumnStrategies() { return parent.getColumnStrategies(); } }
public List<ColumnStrategy> getColumnStrategies() { return parent.getColumnStrategies(); } }
/** Creates a blackboard for translating the expressions of generated columns * in an INSERT statement. */ private Blackboard createInsertBlackboard(RelOptTable targetTable, RexNode sourceRef, List<String> targetColumnNames) { final Map<String, RexNode> nameToNodeMap = new HashMap<>(); int j = 0; // Assign expressions for non-generated columns. final List<ColumnStrategy> strategies = targetTable.getColumnStrategies(); final List<String> targetFields = targetTable.getRowType().getFieldNames(); for (String targetColumnName : targetColumnNames) { final int i = targetFields.indexOf(targetColumnName); switch (strategies.get(i)) { case STORED: case VIRTUAL: break; default: nameToNodeMap.put(targetColumnName, rexBuilder.makeFieldAccess(sourceRef, j++)); } } return createBlackboard(null, nameToNodeMap, false); }
/** Creates a blackboard for translating the expressions of generated columns * in an INSERT statement. */ private Blackboard createInsertBlackboard(RelOptTable targetTable, RexNode sourceRef, List<String> targetColumnNames) { final Map<String, RexNode> nameToNodeMap = new HashMap<>(); int j = 0; // Assign expressions for non-generated columns. final List<ColumnStrategy> strategies = targetTable.getColumnStrategies(); final List<String> targetFields = targetTable.getRowType().getFieldNames(); for (String targetColumnName : targetColumnNames) { final int i = targetFields.indexOf(targetColumnName); switch (strategies.get(i)) { case STORED: case VIRTUAL: break; default: nameToNodeMap.put(targetColumnName, rexBuilder.makeFieldAccess(sourceRef, j++)); } } return createBlackboard(null, nameToNodeMap, false); }
final List<ColumnStrategy> strategies = targetTable.getColumnStrategies(); for (String columnName : targetColumnNames) { final int i = tableRowType.getFieldNames().indexOf(columnName);
final List<ColumnStrategy> strategies = targetTable.getColumnStrategies(); for (String columnName : targetColumnNames) { final int i = tableRowType.getFieldNames().indexOf(columnName);
table.unwrap(RelOptTable.class).getColumnStrategies(); for (final RelDataTypeField field : table.getRowType().getFieldList()) { final RelDataTypeField targetField =
table.unwrap(RelOptTable.class).getColumnStrategies(); for (final RelDataTypeField field : table.getRowType().getFieldList()) { final RelDataTypeField targetField =