twalthr commented on a change in pull request #17011: URL: https://github.com/apache/flink/pull/17011#discussion_r698472194
########## File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableDescriptor.java ########## @@ -51,14 +51,14 @@ * TableEnvironment#createTemporaryTable(String, TableDescriptor)}. */ @PublicEvolving -public final class TableDescriptor { +public class TableDescriptor { private final @Nullable Schema schema; private final Map<String, String> options; private final List<String> partitionKeys; private final @Nullable String comment; - private TableDescriptor( + public TableDescriptor( Review comment: `protected` ########## File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/factories/TableFactoryHarness.java ########## @@ -108,39 +101,24 @@ /** Factory identifier for {@link Factory}. */ public static final String IDENTIFIER = "harness"; - public static final ConfigOption<String> SOURCE = - ConfigOptions.key("source") - .stringType() - .noDefaultValue() - .withDescription("Serialized instance of DynamicTableSource (Base64-encoded)"); - - public static final ConfigOption<String> SINK = - ConfigOptions.key("sink") - .stringType() - .noDefaultValue() - .withDescription("Serialized instance of DynamicTableSink (Base64-encoded)"); - // --------------------------------------------------------------------------------------------- - /** Creates a {@link TableDescriptor} for the given {@param schema} and {@param source}. */ - public static TableDescriptor forSource(Schema schema, SourceBase source) { - return TableDescriptor.forConnector(IDENTIFIER) - .schema(schema) - .option(SOURCE, source.serialize()) - .build(); - } - - /** Creates a {@link TableDescriptor} for the given {@param schema} and {@param sink}. */ - public static TableDescriptor forSink(Schema schema, SinkBase sink) { - return TableDescriptor.forConnector(IDENTIFIER) - .schema(schema) - .option(SINK, sink.serialize()) - .build(); + /** + * Creates a builder for a new {@link TableDescriptor} specialized for this harness. + * + * <p>Use this method to create a {@link TableDescriptor} and passing in the source / sink + * implementation you want to use. The descriptor can for example be used with {@link + * TableEnvironment#createTable(String, TableDescriptor)} to register a table. + */ + public static HarnessTableDescriptor.Builder forHarness() { Review comment: nit: `newBuilder()`? `TableFactoryHarness.forHarness` reads cumbersome ########## File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/DefaultCatalogTable.java ########## @@ -33,14 +33,14 @@ /** Default implementation of a {@link CatalogTable}. */ @Internal -class DefaultCatalogTable implements CatalogTable { +public class DefaultCatalogTable implements CatalogTable { private final Schema schema; private final @Nullable String comment; private final List<String> partitionKeys; private final Map<String, String> options; - DefaultCatalogTable( + public DefaultCatalogTable( Review comment: `protected` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org