slinkydeveloper commented on a change in pull request #17768:
URL: https://github.com/apache/flink/pull/17768#discussion_r749307588
##########
File path:
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/filesystem/TestCsvFileSystemFormatFactory.java
##########
@@ -120,24 +119,16 @@ public ChangelogMode getChangelogMode() {
@Override
public DecodingFormat<DeserializationSchema<RowData>> createDecodingFormat(
DynamicTableFactory.Context context, ReadableConfig formatOptions)
{
- List<String> schemaFields =
-
DataType.getFieldNames(context.getPhysicalRowDataType()).stream()
- .filter(
- field ->
- !context.getCatalogTable()
- .getPartitionKeys()
- .contains(field))
- .collect(Collectors.toList());
- return new DecodingFormat<DeserializationSchema<RowData>>() {
+ return new ProjectableDecodingFormat<DeserializationSchema<RowData>>()
{
Review comment:
This test format already supports projections, I implemented the new
interface here just to remove above code
##########
File path:
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/filesystem/TestCsvFileSystemFormatFactory.java
##########
@@ -120,24 +119,16 @@ public ChangelogMode getChangelogMode() {
@Override
public DecodingFormat<DeserializationSchema<RowData>> createDecodingFormat(
DynamicTableFactory.Context context, ReadableConfig formatOptions)
{
- List<String> schemaFields =
-
DataType.getFieldNames(context.getPhysicalRowDataType()).stream()
- .filter(
- field ->
- !context.getCatalogTable()
- .getPartitionKeys()
- .contains(field))
- .collect(Collectors.toList());
- return new DecodingFormat<DeserializationSchema<RowData>>() {
+ return new ProjectableDecodingFormat<DeserializationSchema<RowData>>()
{
Review comment:
This test format already supports projections, I implemented the new
interface here to remove the code above
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]