impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Tauber-Marshall (Code Review)" <>
Subject [hs2client-CR] Initial structure for the C++ hiveserver2 client.
Date Tue, 10 May 2016 21:36:57 GMT
Thomas Tauber-Marshall has posted comments on this change.

Change subject: Initial structure for the C++ hiveserver2 client.

Patch Set 15:

File src/hs2client/

Line 77: column_descs
> call clear before this line

Line 78:   for (hs2::TColumnDesc tcolumn_desc: resp.schema.columns) {
> const reference here as well
File src/hs2client/operation.h:

Line 105: explicit
> just curious, where did you find this to be necessary?
Its just a general piece of advice to make single parameter constructors explicit. I suppose
it doesn't really matter for this case.
File src/hs2client/

Line 166: return NULL;
> let's not return pointers here. Even if we did though, the behavior of this

Line 178: return new PrimitiveType
> At first I thought this was going to be a memory leak, but I see this gets 
File src/hs2client/types.h:

Line 40:   int int_value;
       :   std::string string_value;
       :   // True iff this qualifier represents an int value.
       :   bool is_int;
       :   // True iff this qualifier represents an string value.
       :   bool is_string;
> all can be const

Line 89: PrimitiveType
> what about just creating subclasses of PrimitiveType and nixing the qualifi

Line 92: qualifiers
> if we keep this, let's have this take a const ref map

Line 95: TypeId
> const

Line 96:   std::map<std::string, TypeQualifier> qualifiers() const { return qualifiers_;
> return a const reference

Line 100: TypeId
> const TypeId

Line 101: std::map<std::string, TypeQualifier> qualifiers_
> const map

Line 105: ColumnDesc
> (Adding this comment for other readers) As Thomas and I discussed, we can e

Line 107: ColumnDesc
> Yeah, let's make this a class (consistent with ColumnType) then these can a

Line 111: unique_ptr
> I don't think this needs to hold memory allocated on the heap, i.e. this ca

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I7be82d5897ad6093116915b17924674c4ae508a0
Gerrit-PatchSet: 15
Gerrit-Project: hs2client
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Thomas Tauber-Marshall <>
Gerrit-Reviewer: Wes McKinney <>
Gerrit-HasComments: Yes

View raw message