Package de.fuberlin.wiwiss.d2rq.algebra

Examples of de.fuberlin.wiwiss.d2rq.algebra.ColumnRenamerMap


 
  public void testRenameColumnsWithColumnReplacer() {
    Map<Attribute,Attribute> map = new HashMap<Attribute,Attribute>();
    map.put(new Attribute(null, "foo", "col1"), new Attribute(null, "foo", "col2"));
    assertEquals(SQLExpression.create("foo.col2=foo.col3"),
        SQLExpression.create("foo.col1=foo.col3").renameAttributes(new ColumnRenamerMap(map)));
  }
View Full Code Here


  }
 
  public void testReplaceColumnsInExpressionWithColumnReplacer() {
    Map<Attribute,Attribute> map = new HashMap<Attribute,Attribute>();
    map.put(foo_col1, bar_col2);
    ColumnRenamerMap col1ToCol2 = new ColumnRenamerMap(map);
    assertEquals("bar.col2",
        SQL.replaceColumnsInExpression("foo.col1", col1ToCol2));
    assertEquals("LEN(bar.col2) > 0",
        SQL.replaceColumnsInExpression("LEN(foo.col1) > 0", col1ToCol2));
    assertEquals("foo.col3",
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.d2rq.algebra.ColumnRenamerMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.