github-actions[bot] commented on code in PR #26709:
URL: https://github.com/apache/doris/pull/26709#discussion_r1404709568
##########
be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp:
##########
@@ -19,11 +19,17 @@
#include <arrow/builder.h>
+#include <chrono> // IWYU pragma: keep
#include <type_traits>
#include "vec/columns/column_const.h"
#include "vec/io/io_helper.h"
+#define DIVISOR_FOR_SECOND 1
Review Comment:
warning: macro 'DIVISOR_FOR_SECOND' defines an integral constant; prefer an
enum instead [modernize-macro-to-enum]
```cpp
#define DIVISOR_FOR_SECOND 1
^
```
##########
be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp:
##########
@@ -19,11 +19,17 @@
#include <arrow/builder.h>
+#include <chrono> // IWYU pragma: keep
#include <type_traits>
#include "vec/columns/column_const.h"
#include "vec/io/io_helper.h"
+#define DIVISOR_FOR_SECOND 1
+#define DIVISOR_FOR_MILLI 1000
+#define DIVISOR_FOR_MICRO 1000000
+#define DIVISOR_FOR_NANO 1000000000
Review Comment:
warning: macro 'DIVISOR_FOR_NANO' defines an integral constant; prefer an
enum instead [modernize-macro-to-enum]
```cpp
#define DIVISOR_FOR_NANO 1000000000
^
```
##########
be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp:
##########
@@ -112,6 +118,52 @@
}
}
+void DataTypeDateTimeV2SerDe::read_column_from_arrow(IColumn& column,
Review Comment:
warning: method 'read_column_from_arrow' can be made static
[readability-convert-member-functions-to-static]
```suggestion
static void DataTypeDateTimeV2SerDe::read_column_from_arrow(IColumn& column,
```
be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp:122:
```diff
- int end, const
cctz::time_zone& ctz) const {
+ int end, const
cctz::time_zone& ctz) {
```
##########
be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp:
##########
@@ -19,11 +19,17 @@
#include <arrow/builder.h>
+#include <chrono> // IWYU pragma: keep
#include <type_traits>
#include "vec/columns/column_const.h"
#include "vec/io/io_helper.h"
+#define DIVISOR_FOR_SECOND 1
+#define DIVISOR_FOR_MILLI 1000
Review Comment:
warning: macro 'DIVISOR_FOR_MILLI' defines an integral constant; prefer an
enum instead [modernize-macro-to-enum]
```cpp
#define DIVISOR_FOR_MILLI 1000
^
```
##########
be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp:
##########
@@ -19,11 +19,17 @@
#include <arrow/builder.h>
+#include <chrono> // IWYU pragma: keep
#include <type_traits>
#include "vec/columns/column_const.h"
#include "vec/io/io_helper.h"
+#define DIVISOR_FOR_SECOND 1
+#define DIVISOR_FOR_MILLI 1000
+#define DIVISOR_FOR_MICRO 1000000
Review Comment:
warning: macro 'DIVISOR_FOR_MICRO' defines an integral constant; prefer an
enum instead [modernize-macro-to-enum]
```cpp
#define DIVISOR_FOR_MICRO 1000000
^
```
##########
be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp:
##########
@@ -19,11 +19,17 @@
#include <arrow/builder.h>
+#include <chrono> // IWYU pragma: keep
#include <type_traits>
#include "vec/columns/column_const.h"
#include "vec/io/io_helper.h"
+#define DIVISOR_FOR_SECOND 1
+#define DIVISOR_FOR_MILLI 1000
+#define DIVISOR_FOR_MICRO 1000000
+#define DIVISOR_FOR_NANO 1000000000
+
Review Comment:
warning: replace macro with enum [modernize-macro-to-enum]
```suggestion
enum {
DIVISOR_FOR_SECOND = 1,
DIVISOR_FOR_MILLI = 1000,
DIVISOR_FOR_MICRO = 1000000,
DIVISOR_FOR_NANO = 1000000000};
```
--
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]