Example #1
0
 @Override
 public boolean equals(Object o) {
   if (!(o instanceof ProjectOp)) return false;
   ProjectOp other = (ProjectOp) o;
   if (!getWrapped().equals(other.getWrapped())) return false;
   return projections.equals(other.projections);
 }
Example #2
0
 public static DatabaseOp extend(
     DatabaseOp wrapped, Map<ColumnName, Expression> extensions, Vendor vendor) {
   if (extensions.isEmpty()) return wrapped;
   List<ProjectionSpec> specs = ProjectionSpec.createFromColumns(wrapped.getColumns());
   for (ColumnName column : extensions.keySet()) {
     specs.add(ProjectionSpec.create(column, extensions.get(column), vendor));
   }
   return ProjectOp.create(wrapped, specs);
 }