Skip to content

Commit f26402a

Browse files
committed
Install type_traits.h. cpplint
Change-Id: I008bf0adc806034062d6684fd1615448db246c6b
1 parent 4fc7294 commit f26402a

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

cpp/src/arrow/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ install(FILES
2525
table.h
2626
type.h
2727
type_fwd.h
28+
type_traits.h
2829
test-util.h
2930
DESTINATION include/arrow)
3031

cpp/src/arrow/ipc/json-internal.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <sstream>
2222
#include <string>
2323
#include <type_traits>
24+
#include <vector>
2425

2526
#include "rapidjson/stringbuffer.h"
2627
#include "rapidjson/writer.h"
@@ -53,7 +54,7 @@ static std::string GetBufferTypeName(BufferType type) {
5354
return "VALIDITY";
5455
default:
5556
break;
56-
};
57+
}
5758
return "UNKNOWN";
5859
}
5960

@@ -149,7 +150,7 @@ class JsonSchemaWriter : public TypeVisitor {
149150
break;
150151
default:
151152
break;
152-
};
153+
}
153154
}
154155

155156
template <typename T>
@@ -163,7 +164,7 @@ class JsonSchemaWriter : public TypeVisitor {
163164
case IntervalType::Unit::DAY_TIME:
164165
writer_->String("DAY_TIME");
165166
break;
166-
};
167+
}
167168
}
168169

169170
template <typename T>
@@ -185,7 +186,7 @@ class JsonSchemaWriter : public TypeVisitor {
185186
case TimeUnit::NANO:
186187
writer_->String("NANOSECOND");
187188
break;
188-
};
189+
}
189190
}
190191

191192
template <typename T>
@@ -208,7 +209,7 @@ class JsonSchemaWriter : public TypeVisitor {
208209
case UnionMode::DENSE:
209210
writer_->String("DENSE");
210211
break;
211-
};
212+
}
212213

213214
// Write type ids
214215
writer_->Key("typeIds");
@@ -788,7 +789,6 @@ class JsonSchemaReader {
788789
} else {
789790
std::stringstream ss;
790791
ss << "Invalid union mode: " << mode_str;
791-
;
792792
return Status::Invalid(ss.str());
793793
}
794794

@@ -1013,7 +1013,7 @@ class JsonArrayReader {
10131013
std::stringstream ss;
10141014
ss << type->ToString();
10151015
return Status::NotImplemented(ss.str());
1016-
};
1016+
}
10171017

10181018
#undef TYPE_CASE
10191019
#undef NOT_IMPLEMENTED_CASE

cpp/src/arrow/ipc/json-internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1
2626

2727
#include <memory>
28+
#include <string>
2829

2930
#include "rapidjson/document.h"
3031
#include "rapidjson/stringbuffer.h"

cpp/src/arrow/ipc/json.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
#include "arrow/ipc/json-internal.h"
19-
20-
#define RAPIDJSON_HAS_STDSTRING 1
21-
#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1
22-
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1
23-
24-
#include "rapidjson/stringbuffer.h"
25-
#include "rapidjson/writer.h"
18+
#include "arrow/ipc/json.h"
2619

20+
#include "arrow/ipc/json-internal.h"
2721
#include "arrow/type.h"
2822
#include "arrow/util/status.h"
2923

cpp/src/arrow/ipc/json.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#define ARROW_IPC_JSON_H
2222

2323
#include <memory>
24+
#include <vector>
2425

2526
#include "arrow/type_fwd.h"
2627
#include "arrow/visibility.h"
@@ -79,7 +80,7 @@ class ARROW_EXPORT JsonReader {
7980
Status GetRecordBatch(int i, std::shared_ptr<RecordBatch>* batch);
8081

8182
private:
82-
JsonReader(const std::shared_ptr<io::ReadableFileInterface>& file);
83+
explicit JsonReader(const std::shared_ptr<io::ReadableFileInterface>& file);
8384

8485
std::shared_ptr<io::ReadableFileInterface> file_;
8586
std::shared_ptr<Schema> schema_;

0 commit comments

Comments
 (0)