Skip to content

Commit 3c06e2a

Browse files
committed
fix: inaccurate comments
1 parent f989a81 commit 3c06e2a

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/iceberg/transform_function.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include <cassert>
2323
#include <chrono>
24+
#include <utility>
2425

2526
#include "iceberg/type.h"
2627
#include "iceberg/util/murmurhash3_internal.h"

src/iceberg/transform_function.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ class YearTransform : public TransformFunction {
106106
/// \param source_type Must be a timestamp type.
107107
explicit YearTransform(std::shared_ptr<Type> const& source_type);
108108

109-
/// \brief Extracts the year from each timestamp in the input array.
109+
/// \brief Extracts the year from each date timestamp in the input array, as years from
110+
/// 1970.
110111
Result<ArrowArray> Transform(const ArrowArray& input) override;
111112

112-
/// \brief Extracts the year from a timestamp literal.
113+
/// \brief Extract a date or timestamp year, as years from 1970.
113114
Result<std::optional<Literal>> Transform(const Literal& literal) override;
114115

115116
/// \brief Returns INT32 as the output type.
@@ -128,10 +129,11 @@ class MonthTransform : public TransformFunction {
128129
/// \param source_type Must be a timestamp type.
129130
explicit MonthTransform(std::shared_ptr<Type> const& source_type);
130131

131-
/// \brief Extracts the month (1-12) from each timestamp in the input array.
132+
/// \brief Extracts the month from each date or timestamp in the input array, as months
133+
/// from 1970-01-01.
132134
Result<ArrowArray> Transform(const ArrowArray& input) override;
133135

134-
/// \brief Extracts the month (1-12) from a timestamp literal.
136+
/// \brief Extract a date or timestamp month, as months from 1970-01-01.
135137
Result<std::optional<Literal>> Transform(const Literal& literal) override;
136138

137139
/// \brief Returns INT32 as the output type.
@@ -150,10 +152,11 @@ class DayTransform : public TransformFunction {
150152
/// \param source_type Must be a timestamp type.
151153
explicit DayTransform(std::shared_ptr<Type> const& source_type);
152154

153-
/// \brief Extracts the day (1-31) from each timestamp in the input array.
155+
/// \brief Extracts the day from each date or timestamp in the input array, as days from
156+
/// 1970-01-01.
154157
Result<ArrowArray> Transform(const ArrowArray& input) override;
155158

156-
/// \brief Extracts the day (1-31) from a timestamp literal.
159+
/// \brief Extract a date or timestamp day, as days from 1970-01-01.
157160
Result<std::optional<Literal>> Transform(const Literal& literal) override;
158161

159162
/// \brief Returns INT32 as the output type.
@@ -172,10 +175,11 @@ class HourTransform : public TransformFunction {
172175
/// \param source_type Must be a timestamp type.
173176
explicit HourTransform(std::shared_ptr<Type> const& source_type);
174177

175-
/// \brief Extracts the hour (0-23) from each timestamp in the input array.
178+
/// \brief Extracts the hour from each timestamp in the input array, as hours from
179+
/// 1970-01-01 00:00:00.
176180
Result<ArrowArray> Transform(const ArrowArray& input) override;
177181

178-
/// \brief Extracts the hour (0-23) from a timestamp literal.
182+
/// \brief Extract a timestamp hour, as hours from 1970-01-01 00:00:00.
179183
Result<std::optional<Literal>> Transform(const Literal& literal) override;
180184

181185
/// \brief Returns INT32 as the output type.

0 commit comments

Comments
 (0)