Github user seyfe commented on the issue:

    https://github.com/apache/spark/pull/15032
  
    I looked at HiveInspectors class and you are right. We could replace them 
with
    
    ```
    for (i <- 0 until fieldRefs.size) {
    // or alternatively:
    for (i <- inspectors.indices) {
    ```
    
    in any case, these will create a Range object and do a foreach like:
    `(0 until fieldRefs.size).foreach`
    
    So, I would suggest keeping them as it's but let's get the length and store 
in a local variable so we won't call it in a loop. I will prepare the change.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to