[
https://issues.apache.org/jira/browse/FLINK-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15926431#comment-15926431
]
ASF GitHub Bot commented on FLINK-5698:
---------------------------------------
Github user tonycox commented on a diff in the pull request:
https://github.com/apache/flink/pull/3269#discussion_r106208275
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/util/RexProgramProjectExtractor.scala
---
@@ -84,6 +108,49 @@ object RexProgramProjectExtractor {
}
/**
+ * A RexVisitor to extract used nested input fields
+ */
+class RefFieldAccessorVisitor(
+ names: List[String],
+ usedFields: Array[Int]) extends RexVisitorImpl[Unit](true) {
+
+ private val projectedFields = new util.ArrayList[Array[String]]
+
+ names.foreach { n =>
+ projectedFields.add(Array.empty)
+ }
+
+ private val order: Map[Int, Int] =
names.indices.zip(usedFields).map(_.swap).toMap
--- End diff --
exactly
> Add NestedFieldsProjectableTableSource interface
> ------------------------------------------------
>
> Key: FLINK-5698
> URL: https://issues.apache.org/jira/browse/FLINK-5698
> Project: Flink
> Issue Type: New Feature
> Components: Table API & SQL
> Reporter: Anton Solovev
> Assignee: Anton Solovev
>
> Add a NestedFieldsProjectableTableSource interface for some TableSource
> implementation that support nesting projection push-down.
> The interface could look as follows
> {code}
> def trait NestedFieldsProjectableTableSource {
> def projectNestedFields(fields: Array[String]):
> NestedFieldsProjectableTableSource[T]
> }
> {code}
> This interface works together with ProjectableTableSource
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)