carloea2 opened a new issue, #9313: URL: https://github.com/apache/texera/issues/9313
### What happened? The R UI parameter inserter reserves assignment targets but misses script-level `for` iterators. Inserting a parameter named `count` before an existing loop can therefore reuse its binding and silently overwrite the supplied value. | Before | Expected | | --- | --- | | Insert `count <- UiParameter(...)$value`; the loop changes its value from 42 to 3. | Insert `count_2 <- UiParameter(...)$value`; the parameter stays 42 and the loop keeps its own `count` binding. | Confirmed by evaluating the actual generated insertion through the companion R SDK using R 4.5.3. Function-local iterators must remain separate from script-level bindings, including unbraced function bodies. ### How to reproduce? 1. Start with an R UDF script containing `for (count in 1:3) NULL` before its final function. 2. Add an integer UI parameter named `count` and supply 42. 3. The current inserter emits a variable named `count`; evaluating the script overwrites the injected parameter with 3. Related to #9277 and the post-merge follow-up to #9279. The automated review overview noted the missing binding case. ### Version/Branch 1.4.0-incubating-SNAPSHOT (main) ### Commit Hash (Optional) a786d472c9f3328e2bdfde20352594b9e2ca5f1f ### What browsers are you seeing the problem on? _No response_ ### Relevant log output ```shell Generated identifier: count Parameter: 3 Loop: 3 Error: result$parameter == 42L is not TRUE # With a distinct generated binding: Generated identifier: count_2 Parameter: 42 Loop: 3 ``` -- 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]
