static BeamZetaSqlCatalog create(
      SchemaPlus calciteSchema, JavaTypeFactory typeFactory, AnalyzerOptions options) {
    BeamZetaSqlCatalog catalog =
        new BeamZetaSqlCatalog(
            calciteSchema, new SimpleCatalog(calciteSchema.getName()), typeFactory);
    catalog.addFunctionsToCatalog(options);
    return catalog;
  }
@Test
  public void rejectsScalarFunctionImplWithUnsupportedReturnType() throws NoSuchMethodException {
    JdbcConnection jdbcConnection = createJdbcConnection();
    SchemaPlus calciteSchema = jdbcConnection.getCurrentSchemaPlus();
    Method method = ReturnsArrayTimeFn.class.getMethod("eval");
    calciteSchema.add("return_array", ScalarFunctionImpl.create(method));
    thrown.expect(UnsupportedOperationException.class);
    thrown.expectMessage("Calcite type TIME not allowed in function return_array");
    BeamZetaSqlCatalog.create(
        calciteSchema, jdbcConnection.getTypeFactory(), SqlAnalyzer.baseAnalyzerOptions());
  }