public static BeamSqlEnvBuilder builder(TableProvider tableProvider) {
    return new BeamSqlEnvBuilder(tableProvider);
  }
@Test
  public void testCreateExternalTableInNestedTableProvider() throws Exception {
    TestTableProvider root = new TestTableProvider();
    TestTableProvider nested = new TestTableProvider();
    TestTableProvider anotherOne = new TestTableProvider();

    BeamSqlEnv env =
        BeamSqlEnv.builder(root)
            .addSchema("nested", nested)
            .addSchema("anotherOne", anotherOne)
            .setPipelineOptions(PipelineOptionsFactory.create())
            .build();

    Connection connection = env.connection;
    connection.createStatement().execute("CREATE EXTERNAL TABLE nested.person (id INT) TYPE test");
    connection.createStatement().execute("INSERT INTO nested.person(id) VALUES (1), (2), (6)");

    ResultSet rs = connection.createStatement().executeQuery("SELECT SUM(id) FROM nested.person");
    rs.next();

    assertEquals(9, rs.getInt(1));
  }