You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "yesamer (via GitHub)" <gi...@apache.org> on 2024/06/24 08:23:00 UTC

[I] The for cycle wrongly behaves when there are nested arrays in the iteration contexts [incubator-kie-issues]

yesamer opened a new issue, #1350:
URL: https://github.com/apache/incubator-kie-issues/issues/1350

   The following FEEL expression:
   
   `for x in [ [1,2], [3,4] ], y in x return y`
   
   should return `[1, 2, 3, 4]` 
   
   but it currently returns `[1, 2, 1, 2]`
   
   


-- 
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: commits-unsubscribe@kie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The for loop wrongly behaves when there are nested arrays in the iteration contexts [incubator-kie-issues]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on issue #1350:
URL: https://github.com/apache/incubator-kie-issues/issues/1350#issuecomment-2271356661

   @yesamer @baldimir 
   Reading spec:
   
   > An iteration context may either be an expression that returns a list of elements, or two expressions that return
   integers connected by “..”. Examples of valid iteration contexts are:
   • [ 1, 2, 3]
   • a list
   • 1..10
   • 50..40
   • x..x+10
   • @”2021-01-01”..@”2022-01-01”
   
   and
   
   > for i in [i1,i2], j in [j1j2] return e = [ r1, r2, r3, r4 ]
   
   it seems that this expression is wrong
   `for x in [ 1, 2, 3, 4 ], y in x return y` (x is always a number)
   
   but his should work
   
   `for x in [ [1,2], [3,4] ], y in x return y` (x is alway a list)
   
   Unfortunately, it seems that our implementation is expecting only statically defined lists.
   
   I'm digging further...
   
   
   
   
   
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The for loop wrongly behaves when there are nested arrays in the iteration contexts [incubator-kie-issues]

Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer commented on issue #1350:
URL: https://github.com/apache/incubator-kie-issues/issues/1350#issuecomment-2249815766

   //cc @bncriju


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The for loop wrongly behaves when there are nested arrays in the iteration contexts [incubator-kie-issues]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on issue #1350:
URL: https://github.com/apache/incubator-kie-issues/issues/1350#issuecomment-2271162020

   @yesamer 
   I've found the point where it fails, but it is int the core logic itself.
   I'm trying also another example
   `for x in [ 1, 2, 3, 4 ], y in x return y` 
   that, apparently, should return `[1, 2, 3, 4]`
   but it also returns `[1, 1, 1, 1]` 


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The for loop wrongly behaves when there are nested arrays in the iteration contexts [incubator-kie-issues]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio closed issue #1350: The for loop wrongly behaves when there are nested arrays in the  iteration contexts
URL: https://github.com/apache/incubator-kie-issues/issues/1350


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org