You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2023/11/25 10:25:20 UTC

[PR] [SPARK-46100][CORE] Reduce stack depth by replace (string|array).size with (string|array).length [spark]

beliefer opened a new pull request, #44011:
URL: https://github.com/apache/spark/pull/44011

   ### What changes were proposed in this pull request?
   There are a lot of `[string|array].size` called.
   In fact, the size calls the underlying length, this behavior increase the stack length.
   We should call `[string|array].length` directly.
   We also get the compile waring `Replace .size with .length on arrays and strings`
   
   This PR just improve the core module.
   
   ### Why are the changes needed?
   Reduce stack depth by replace (string|array).size with (string|array).length
   
   
   ### Does this PR introduce _any_ user-facing change?
   'No'.
   
   
   ### How was this patch tested?
   Exists test cases.
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   'No'.
   


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46100][CORE][PYTHON] Reduce stack depth by replace (string|array).size with (string|array).length [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #44011:
URL: https://github.com/apache/spark/pull/44011#issuecomment-1826478614

   @srowen @LuciferYang Thank you!


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46100][CORE][PYTHON] Reduce stack depth by replace (string|array).size with (string|array).length [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #44011:
URL: https://github.com/apache/spark/pull/44011#issuecomment-1826279786

   > Is this all the similar cases in the project? I think we can fix all cases in one PR :)
   
   It's very hard. I fix the cases in core module paid two hours.


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46100][CORE][PYTHON] Reduce stack depth by replace (string|array).size with (string|array).length [spark]

Posted by "srowen (via GitHub)" <gi...@apache.org>.
srowen commented on PR #44011:
URL: https://github.com/apache/spark/pull/44011#issuecomment-1826415496

   Merged to master


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46100][CORE][PYTHON] Reduce stack depth by replace (string|array).size with (string|array).length [spark]

Posted by "srowen (via GitHub)" <gi...@apache.org>.
srowen closed pull request #44011: [SPARK-46100][CORE][PYTHON] Reduce stack depth by replace (string|array).size with (string|array).length
URL: https://github.com/apache/spark/pull/44011


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46100][CORE][PYTHON] Reduce stack depth by replace (string|array).size with (string|array).length [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #44011:
URL: https://github.com/apache/spark/pull/44011#issuecomment-1826278609

   Is this all the similar cases in the project? I think we can fix all cases in one PR :)


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org