@Test
  public void outerJoinTest() {
    expectedHeader = new String[] {"date", "date"};
    sql =
        "select t0.date, t1.date from table0 t0 %s join table1 t1 on t0.date=t1.date order by t0.date, t1.date";
    retArray =
        new String[] {
          "2022-01-01,null,",
          "2023-01-01,2023-01-01,",
          "null,2023-05-01,",
          "null,2023-10-01,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
        };
    tableResultSetEqualTest(String.format(sql, FULL), expectedHeader, retArray, DATABASE_NAME);
    retArray =
        new String[] {
          "2022-01-01,null,",
          "2023-01-01,2023-01-01,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,"
        };
    tableResultSetEqualTest(String.format(sql, LEFT), expectedHeader, retArray, DATABASE_NAME);
    retArray =
        new String[] {
          "2023-01-01,2023-01-01,",
          "null,2023-05-01,",
          "null,2023-10-01,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
          "null,null,",
        };
    tableResultSetEqualTest(String.format(sql, RIGHT), expectedHeader, retArray, DATABASE_NAME);

    expectedHeader = new String[] {"attr1", "attr2", "attr1", "attr2"};
    sql =
        "select t0.attr1,t0.attr2,t1.attr1,t1.attr2 from table0 t0 %s join table1 t1 on t0.attr1=t1.attr1 AND t0.attr2=t1.attr2 order by t0.attr1,t0.attr2,t1.attr1,t1.attr2";
    retArray =
        new String[] {
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "d,c,null,null,",
          "d,c,null,null,",
          "d,c,null,null,",
          "t,a,t,a,",
          "t,a,t,a,",
          "t,a,t,a,",
          "vv,null,null,null,",
          "vv,null,null,null,",
          "vv,null,null,null,",
          "yy,zz,null,null,",
          "yy,zz,null,null,",
          "yy,zz,null,null,",
          "null,null,y,z,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
        };
    tableResultSetEqualTest(String.format(sql, FULL), expectedHeader, retArray, DATABASE_NAME);

    retArray =
        new String[] {
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "d,c,null,null,",
          "d,c,null,null,",
          "d,c,null,null,",
          "t,a,t,a,",
          "t,a,t,a,",
          "t,a,t,a,",
          "vv,null,null,null,",
          "vv,null,null,null,",
          "vv,null,null,null,",
          "yy,zz,null,null,",
          "yy,zz,null,null,",
          "yy,zz,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
        };
    tableResultSetEqualTest(String.format(sql, LEFT), expectedHeader, retArray, DATABASE_NAME);

    retArray =
        new String[] {
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "c,d,c,d,",
          "t,a,t,a,",
          "t,a,t,a,",
          "t,a,t,a,",
          "null,null,y,z,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,",
          "null,null,null,null,"
        };
    tableResultSetEqualTest(String.format(sql, RIGHT), expectedHeader, retArray, DATABASE_NAME);
  }
In this IT, table has more than one TAGs and Attributes.
integration-test/src/test/java/org/apache/iotdb/relational/it/db/it/IoTDBMultiTAGsWithAttributesTableIT.java