JingsongLi commented on a change in pull request #41: URL: https://github.com/apache/flink-table-store/pull/41#discussion_r826527466
########## File path: flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/TableStoreFactory.java ########## @@ -184,9 +286,42 @@ private static Path tablePath(Map<String, String> options, ObjectIdentifier iden identifier.getObjectName())); } - private static boolean enableChangeTracking(Map<String, String> options) { + @VisibleForTesting + static boolean enableChangeTracking(Map<String, String> options) { return Boolean.parseBoolean( options.getOrDefault( CHANGE_TRACKING.key(), CHANGE_TRACKING.defaultValue().toString())); } + + private static DynamicTableFactory.Context createLogStoreContext( + DynamicTableFactory.Context context) { + return new FactoryUtil.DefaultDynamicTableContext( + context.getObjectIdentifier(), + context.getCatalogTable() + .copy(filterLogStoreOptions(context.getCatalogTable().getOptions())), + filterLogStoreOptions(context.getEnrichmentOptions()), + context.getConfiguration(), + context.getClassLoader(), + context.isTemporary()); + } + + private static LogStoreTableFactory createLogStoreTableFactory() { + return discoverLogStoreFactory( + Thread.currentThread().getContextClassLoader(), + TableStoreFactoryOptions.LOG_SYSTEM.defaultValue()); + } + + private TableStore buildTableStore(Context context) { + ResolvedCatalogTable catalogTable = context.getCatalogTable(); + ResolvedSchema schema = catalogTable.getResolvedSchema(); + return new TableStore( + Configuration.fromMap(filterFileStoreOptions(catalogTable.getOptions()))) + .withTableIdentifier(context.getObjectIdentifier()) + .withPrimaryKeys(context.getPrimaryKeyIndexes()) + .withPartitions( + catalogTable.getPartitionKeys().stream() + .mapToInt(schema.getColumnNames()::indexOf) Review comment: Keep schema consistent, physical type is used below, physical type should be used here as well -- 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