Package org.teiid.query.sql.lang

Examples of org.teiid.query.sql.lang.JoinPredicate


   * <p>
   * For example:
   * ... m.g1 UNION JOIN m.g2 ON m.g1.e1 = m.g2.e1
   */
  public void testCloneEquivalence(){
    JoinPredicate jp1 = example(JoinType.JOIN_UNION, "e1"); //$NON-NLS-1$
    JoinPredicate jp2 = (JoinPredicate)jp1.clone();
    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, jp1, jp2);
 
View Full Code Here


   * For example:
   * ... m.g1 FULL OUTER JOIN m.g2 ON ((m.g1.e1 = m.g2.e1) AND (m.g1.e2 = m.g2.e2))
   * ... m.g1 FULL OUTER JOIN m.g2 ON m.g1.e400 = m.g2.e400
   */
    public void testNonEquivalence1(){
      JoinPredicate jp1 = example(JoinType.JOIN_FULL_OUTER, "e1", "e2"); //$NON-NLS-1$ //$NON-NLS-2$
      JoinPredicate jp2 = example(JoinType.JOIN_FULL_OUTER, "e400"); //$NON-NLS-1$
        int equals = -1;
        UnitTestUtil.helpTestEquivalence(equals, jp1, jp2);
    }
View Full Code Here

   * For example:
   * ... m.g1 FULL OUTER JOIN m.g2 ON ((m.g1.e1 = m.g2.e1) AND (m.g1.e2 = m.g2.e2))
   * ... m.g1 FULL OUTER JOIN m.g2 ON ((m.g1.e2 = m.g2.e2) AND (m.g1.e1 = m.g2.e1))
   */
    public void testNonEquivalence2(){
      JoinPredicate jp1 = example(JoinType.JOIN_LEFT_OUTER, "e1", "e2"); //$NON-NLS-1$ //$NON-NLS-2$
        JoinPredicate jp2 = example(JoinType.JOIN_LEFT_OUTER, "e2", "e1"); //$NON-NLS-1$ //$NON-NLS-2$
        int equals = -1;
        UnitTestUtil.helpTestEquivalence(equals, jp1, jp2);
    }
View Full Code Here

   * For example:
   * ... m.g1 LEFT OUTER JOIN m.g2 ON m.g1.e1 = m.g2.e1
   * ... m.g1 RIGHT OUTER JOIN m.g2 ON m.g1.e2 = m.g2.e2
   */
    public void testNonEquivalence3(){
      JoinPredicate jp1 = example(JoinType.JOIN_LEFT_OUTER, "e1"); //$NON-NLS-1$
        JoinPredicate jp2 = example(JoinType.JOIN_RIGHT_OUTER, "e1"); //$NON-NLS-1$
        int equals = -1;
        UnitTestUtil.helpTestEquivalence(equals, jp1, jp2);
    }
View Full Code Here

  }
 
  public void testJoinPredicate1() {
    GroupSymbol gs1 = exampleGroupSymbol(1);
    GroupSymbol gs2 = exampleGroupSymbol(2);
    JoinPredicate jp = new JoinPredicate(new UnaryFromClause(gs1), new UnaryFromClause(gs2), JoinType.JOIN_CROSS);
   
    Set groups = new HashSet();
    groups.add(gs1);
    groups.add(gs2);
    helpTestGroups(jp, true, groups);
View Full Code Here

  public void testJoinPredicate2() {
    GroupSymbol gs1 = exampleGroupSymbol(1);
    GroupSymbol gs2 = exampleGroupSymbol(2);
    GroupSymbol gs3 = exampleGroupSymbol(3);
    JoinPredicate jp1 = new JoinPredicate(new UnaryFromClause(gs1), new UnaryFromClause(gs2), JoinType.JOIN_CROSS);
    JoinPredicate jp2 = new JoinPredicate(new UnaryFromClause(gs3), jp1, JoinType.JOIN_CROSS);
   
    Set groups = new HashSet();
    groups.add(gs1);
    groups.add(gs2);
    groups.add(gs3);
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.lang.JoinPredicate

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.