@Test
  public void testUnionType() throws Exception {
    String sql ="SELECT typeof(a) AS t, modeof(a) AS m, drilltypeof(a) AS dt\n" +
                "FROM cp.`jsoninput/union/c.json`";
    try {
      testBuilder()
        .optionSettingQueriesForTestQuery("alter session set `exec.enable_union_type` = true")
        .sqlQuery(sql)
        .ordered()
        .baselineColumns("t",       "m",        "dt")
        .baselineValues( "VARCHAR", "NULLABLE", "UNION")
        .baselineValues( "BIGINT",  "NULLABLE", "UNION")
        .baselineValues( "FLOAT8",  "NULLABLE", "UNION")
        // The following should probably provide the type of the list,
        // and report cardinality as ARRAY.
        .baselineValues( "LIST",    "NULLABLE", "UNION")
        .baselineValues( "NULL",    "NULLABLE", "UNION")
        .go();
    }
    finally {
      client.resetSession(ExecConstants.ENABLE_UNION_TYPE_KEY);
    }
  }
@Test
  public void testUnionType() throws Exception {
    String sql ="SELECT typeof(a) AS t, modeof(a) AS m, drilltypeof(a) AS dt\n" +
                "FROM cp.`jsoninput/union/c.json`";
    try {
      testBuilder()
        .optionSettingQueriesForTestQuery("alter session set `exec.enable_union_type` = true")
        .sqlQuery(sql)
        .ordered()
        .baselineColumns("t",       "m",        "dt")
        .baselineValues( "VARCHAR", "NULLABLE", "UNION")
        .baselineValues( "BIGINT",  "NULLABLE", "UNION")
        .baselineValues( "FLOAT8",  "NULLABLE", "UNION")
       
       
        .baselineValues( "LIST",    "NULLABLE", "UNION")
        .baselineValues( "NULL",    "NULLABLE", "UNION")
        .go();
    }
    finally {
      client.resetSession(ExecConstants.ENABLE_UNION_TYPE_KEY);
    }
  }
@test public void testuniontype() throws exception { string sql ="select typeof(a) as t, modeof(a) as m, drilltypeof(a) as dt\n" + "from cp.`jsoninput/union/c.json`"; try { testbuilder() .optionsettingqueriesfortestquery("alter session set `exec.enable_union_type` = true") .sqlquery(sql) .ordered() .baselinecolumns("t", "m", "dt") .baselinevalues( "varchar", "nullable", "union") .baselinevalues( "bigint", "nullable", "union") .baselinevalues( "float8", "nullable", "union") .baselinevalues( "list", "nullable", "union") .baselinevalues( "null", "nullable", "union") .go(); } finally { client.resetsession(execconstants.enable_union_type_key); } }