[ 
https://issues.apache.org/jira/browse/FLINK-6097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15930890#comment-15930890
 ] 

ASF GitHub Bot commented on FLINK-6097:
---------------------------------------

Github user sunjincheng121 commented on the issue:

    https://github.com/apache/flink/pull/3560
  
    HI, @KurtYoung Thanks for your attention to this PR. Good question, the 
purpose of this change is just like this JIRA's description:
    I want `ProjectionTranslator # identifyFieldReferences`  to guaranteed the 
order of the extracted field references same as input order. using `Set` just 
want to eliminate duplicate field references, and `List` also can do this, it 
is no harm to keep the `ProjectionTranslator # identifyFieldReferences` 
method's output order consistent with input.
    If the disorder results of  `ProjectionTranslator # 
identifyFieldReferences` can work, then the orderly results must also work very 
well, because the order is also a  situation of disorder. 
    What to you think?
    
    Thanks,
    SunJincheng
    



> Guaranteed the order of the extracted field references
> ------------------------------------------------------
>
>                 Key: FLINK-6097
>                 URL: https://issues.apache.org/jira/browse/FLINK-6097
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>
> The current `ProjectionTranslator # identifyFieldReferences` method uses the` 
> Set` temporary save field, when the number of elements in the Set is less 
> than 5, the Set takes the Se1, Se2, Se3, Se4 data structures. When the number 
> of elements is greater than or equal to 5, the Set takes HashSet # 
> HashTrieSet and which will cause the data to be out of order. although the 
> out of order is also working, but I think the order is better than out of 
> order. So I want to improve it,Orderly extraction field.i.e.Guaranteed the 
> order of the extracted field references as input order.
> e.g.:
> Add the following elements in turn:
> {code}
> A, b, c, d, e
> Set (a)
> Class scala.collection.immutable.Set $ Set1
> Set (a, b)
> Class scala.collection.immutable.Set $ Set2
> Set (a, b, c)
> Class scala.collection.immutable.Set $ Set3
> Set (a, b, c, d)
> Class scala.collection.immutable.Set $ Set4
> Set (e, a, b, c, d) -> I want (a, b, c, d, e)
> Class scala.collection.immutable.HashSet $ HashTrieSet
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to