ramitg254 commented on code in PR #6337:
URL: https://github.com/apache/hive/pull/6337#discussion_r2910788725
##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java:
##########
@@ -776,9 +781,15 @@ private List<FieldSchema> getColsInternal(boolean forMs) {
* @return List<FieldSchema>
*/
public List<FieldSchema> getAllCols() {
- ArrayList<FieldSchema> f_list = new ArrayList<FieldSchema>();
- f_list.addAll(getCols());
- f_list.addAll(getPartCols());
+ ArrayList<FieldSchema> f_list = new ArrayList<FieldSchema>(getCols());
+ Set<String> colNames = f_list.stream()
+ .map(FieldSchema::getName)
+ .collect(Collectors.toSet());
+ for (FieldSchema f : getPartCols(true)) {
Review Comment:
just tried to use stream instead of for loop
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]