You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/23 10:31:05 UTC

[GitHub] [spark] kyoty opened a new pull request #32313: [SPARK-35205] Refractor method operationType.getOperationType by using a hashMap.

kyoty opened a new pull request #32313:
URL: https://github.com/apache/spark/pull/32313


   ### What changes were proposed in this pull request?
   SImply the `getOperationType ` method.
   Introduce a `HashMap` to cache the existed enumeration types, so as to avoid  a linear search in a for loop.
   
   ### Why are the changes needed?
   
   `OperationType.getOperationType`  can be called in OperationHandler.constructor:
   ```java
   public OperationHandle(TOperationHandle tOperationHandle, TProtocolVersion protocol) {
       super(tOperationHandle.getOperationId());
       this.opType = OperationType.getOperationType(tOperationHandle.getOperationType());
       this.hasResultSet = tOperationHandle.isHasResultSet();
       this.protocol = protocol;
     }
   ```
   `OperationHandle ` is widely used, It's better to improve the execution efficiency of  `OperationType.getOperationType`
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Just a refractor, using Existing UTs
   


-- 
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.

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


[GitHub] [spark] AmplabJenkins commented on pull request #32313: [SPARK-35205] Refractor method operationType.getOperationType by using a hashMap.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32313:
URL: https://github.com/apache/spark/pull/32313#issuecomment-825565547


   Can one of the admins verify this patch?


-- 
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.

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


[GitHub] [spark] kyoty closed pull request #32313: [SPARK-35205] Refractor method operationType.getOperationType by using a hashMap.

Posted by GitBox <gi...@apache.org>.
kyoty closed pull request #32313:
URL: https://github.com/apache/spark/pull/32313


   


-- 
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


[GitHub] [spark] github-actions[bot] commented on pull request #32313: [SPARK-35205] Refractor method operationType.getOperationType by using a hashMap.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #32313:
URL: https://github.com/apache/spark/pull/32313#issuecomment-890613490


   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


-- 
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