Returns true if the embedded relation is either a DML relation or if the field order defined in this RelRoot is the same as the field order of the embedded relation, otherwise false. Positive example (same order): RelRoot: { rel: Project(name, empno) TableScan(EMP)
()
| 232 | * are in the same order as in the embedded relation, otherwise false |
| 233 | */ |
| 234 | public boolean isRefTrivial() { |
| 235 | if (SqlKind.DML.contains(kind)) { |
| 236 | // DML statements return a single count column. |
| 237 | // The validated type is of the SELECT. |
| 238 | // Still, we regard the mapping as trivial. |
| 239 | return true; |
| 240 | } |
| 241 | final RelDataType inputRowType = rel.getRowType(); |
| 242 | return Mappings.isIdentity(fields.leftList(), inputRowType.getFieldCount()); |
| 243 | } |
| 244 | |
| 245 | /** |
| 246 | * Returns true if the embedded relation has a single collation defined which matches the |