Skip to content

Commit d6ca0ee

Browse files
style(clang-tidy): fix issues it found in CI
Curiously, the changed includes seem to allow `clang-tidy` to see issues that it previously didn't see. This commit fixes them. Signed-off-by: Ingo Müller <ingomueller@google.com>
1 parent 23a46cc commit d6ca0ee

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

include/substrait/common/Exceptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ inline constexpr const char* kNotImplemented = "NOT_IMPLEMENTED";
3535

3636
class SubstraitException : public std::exception {
3737
public:
38-
enum class Type {
38+
enum class Type : int8_t {
3939
// Errors where the root cause of the problem is either because of bad input
4040
// or an unsupported pattern of use are classified with USER. Examples
4141
// of errors in this category include syntax errors, unavailable names or

include/substrait/common/Io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace io::substrait {
1313
/*
1414
* \brief The four different ways plans can be represented on disk.
1515
*/
16-
enum class PlanFileFormat {
16+
enum class PlanFileFormat : int8_t {
1717
kBinary = 0,
1818
kJson = 1,
1919
kProtoText = 2,

include/substrait/expression/DecimalLiteral.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <utility>
88

99
namespace substrait::proto {
10-
class Expression_Literal_Decimal;
10+
class Expression_Literal_Decimal; // NOLINT
1111
}
1212

1313
namespace io::substrait::expression {

src/substrait/textplan/SymbolTable.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace io::substrait::textplan {
2121

22-
enum class SymbolType {
22+
enum class SymbolType : int8_t {
2323
kExtensionSpace = 0,
2424
kFunction = 1,
2525
kPlanRelation = 2,
@@ -36,7 +36,7 @@ enum class SymbolType {
3636
kUnknown = -1,
3737
};
3838

39-
enum class RelationType {
39+
enum class RelationType : int8_t {
4040
// Logical
4141
kUnknown = 0,
4242
kRead = 1,
@@ -64,12 +64,12 @@ enum class RelationType {
6464
kExtensionMulti = 102,
6565
};
6666

67-
enum class RelationDetailType {
67+
enum class RelationDetailType : int8_t {
6868
kUnknown = 0,
6969
kExpression = 1,
7070
};
7171

72-
enum class SourceType {
72+
enum class SourceType : int8_t {
7373
kUnknown = 0,
7474
kLocalFiles = 1,
7575
kNamedTable = 2,
@@ -81,7 +81,7 @@ const std::string& symbolTypeName(SymbolType type);
8181

8282
struct SymbolInfo {
8383
std::string name;
84-
std::string alias{}; // If present, use this instead of name.
84+
std::string alias; // If present, use this instead of name.
8585
const SymbolInfo* schema{nullptr}; // The related schema symbol if present.
8686
Location sourceLocation;
8787
Location permanentLocation{Location::kUnknownLocation};

src/substrait/textplan/parser/SubstraitPlanRelationVisitor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
namespace substrait::proto {
2121
class Expression;
22-
class Expression_Literal;
23-
class Expression_Literal_Map_KeyValue;
24-
class Type_Struct;
22+
class Expression_Literal; // NOLINT
23+
class Expression_Literal_Map_KeyValue; // NOLINT
24+
class Type_Struct; // NOLINT
2525
} // namespace substrait::proto
2626

2727
namespace io::substrait::textplan {

src/substrait/textplan/parser/SubstraitPlanSubqueryRelationVisitor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
namespace substrait::proto {
2121
class Expression;
22-
class Expression_Literal;
23-
class Expression_Literal_Map_KeyValue;
24-
class Type_Struct;
22+
class Expression_Literal; // NOLINT
23+
class Expression_Literal_Map_KeyValue; // NOLINT
24+
class Type_Struct; // NOLINT
2525
} // namespace substrait::proto
2626

2727
namespace io::substrait::textplan {

0 commit comments

Comments
 (0)