[ https://issues.apache.org/jira/browse/FLINK-2170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16262546#comment-16262546 ]
ASF GitHub Bot commented on FLINK-2170: --------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/5043#discussion_r152571674 --- Diff: flink-core/src/main/java/org/apache/flink/api/java/typeutils/RowTypeInfo.java --- @@ -355,4 +355,21 @@ public void addComparatorField(int fieldId, TypeComparator<?> comparator) { comparatorOrders); } } + + /** + * Creates a {@link RowTypeInfo} with projected fields. + * + * @param rowType The original RowTypeInfo whose fields are projected + * @param fieldMapping The field mapping of the projection + * @return A RowTypeInfo with projected fields. + */ + public static RowTypeInfo projectFields(RowTypeInfo rowType, int[] fieldMapping) { --- End diff -- I think it is cleaner to have this as a static method than an instance method. A static method makes it explicit that this creates a new (immutable) `RowTypeInfo`. > Add OrcTableSource > ------------------ > > Key: FLINK-2170 > URL: https://issues.apache.org/jira/browse/FLINK-2170 > Project: Flink > Issue Type: New Feature > Components: Table API & SQL > Affects Versions: 0.9 > Reporter: Fabian Hueske > Assignee: Usman Younas > Priority: Minor > Labels: starter > > Add a {{OrcTableSource}} to read data from an ORC file. The > {{OrcTableSource}} should implement the {{ProjectableTableSource}} > (FLINK-3848) and {{FilterableTableSource}} (FLINK-3849) interfaces. -- This message was sent by Atlassian JIRA (v6.4.14#64029)