Skip to content

Commit 57f2d3d

Browse files
committed
Fix lint errors
1 parent dd0781f commit 57f2d3d

File tree

2 files changed

+30
-27
lines changed

2 files changed

+30
-27
lines changed

cpp/src/parquet/arrow/arrow_schema_test.cc

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,31 +1794,34 @@ TEST_F(TestConvertArrowSchema, ParquetTimeAdjustedToUTC) {
17941794
int physical_length;
17951795
};
17961796

1797-
auto run_test = [this](const std::shared_ptr<ArrowWriterProperties>& arrow_writer_properties, bool time_adjusted_to_utc) {
1798-
std::vector<FieldConstructionArguments> cases = {
1799-
{"time32", ::arrow::time32(::arrow::TimeUnit::MILLI),
1800-
LogicalType::Time(time_adjusted_to_utc, LogicalType::TimeUnit::MILLIS),
1801-
ParquetType::INT32, -1},
1802-
{"time64(microsecond)", ::arrow::time64(::arrow::TimeUnit::MICRO),
1803-
LogicalType::Time(time_adjusted_to_utc, LogicalType::TimeUnit::MICROS),
1804-
ParquetType::INT64, -1},
1805-
{"time64(nanosecond)", ::arrow::time64(::arrow::TimeUnit::NANO),
1806-
LogicalType::Time(time_adjusted_to_utc, LogicalType::TimeUnit::NANOS),
1807-
ParquetType::INT64, -1}};
1808-
1809-
std::vector<std::shared_ptr<Field>> arrow_fields;
1810-
std::vector<NodePtr> parquet_fields;
1811-
for (const FieldConstructionArguments& c : cases) {
1812-
arrow_fields.push_back(::arrow::field(c.name, c.datatype, false));
1813-
parquet_fields.push_back(PrimitiveNode::Make(c.name, Repetition::REQUIRED,
1814-
c.logical_type, c.physical_type,
1815-
c.physical_length));
1816-
}
1817-
1818-
EXPECT_EQ(arrow_writer_properties->write_time_adjusted_to_utc(), time_adjusted_to_utc);
1819-
ASSERT_OK(ConvertSchema(arrow_fields, arrow_writer_properties));
1820-
CheckFlatSchema(parquet_fields);
1821-
};
1797+
auto run_test =
1798+
[this](const std::shared_ptr<ArrowWriterProperties>& arrow_writer_properties,
1799+
bool time_adjusted_to_utc) {
1800+
std::vector<FieldConstructionArguments> cases = {
1801+
{"time32", ::arrow::time32(::arrow::TimeUnit::MILLI),
1802+
LogicalType::Time(time_adjusted_to_utc, LogicalType::TimeUnit::MILLIS),
1803+
ParquetType::INT32, -1},
1804+
{"time64(microsecond)", ::arrow::time64(::arrow::TimeUnit::MICRO),
1805+
LogicalType::Time(time_adjusted_to_utc, LogicalType::TimeUnit::MICROS),
1806+
ParquetType::INT64, -1},
1807+
{"time64(nanosecond)", ::arrow::time64(::arrow::TimeUnit::NANO),
1808+
LogicalType::Time(time_adjusted_to_utc, LogicalType::TimeUnit::NANOS),
1809+
ParquetType::INT64, -1}};
1810+
1811+
std::vector<std::shared_ptr<Field>> arrow_fields;
1812+
std::vector<NodePtr> parquet_fields;
1813+
for (const FieldConstructionArguments& c : cases) {
1814+
arrow_fields.push_back(::arrow::field(c.name, c.datatype, false));
1815+
parquet_fields.push_back(PrimitiveNode::Make(c.name, Repetition::REQUIRED,
1816+
c.logical_type, c.physical_type,
1817+
c.physical_length));
1818+
}
1819+
1820+
EXPECT_EQ(arrow_writer_properties->write_time_adjusted_to_utc(),
1821+
time_adjusted_to_utc);
1822+
ASSERT_OK(ConvertSchema(arrow_fields, arrow_writer_properties));
1823+
CheckFlatSchema(parquet_fields);
1824+
};
18221825

18231826
// Verify write_time_adjusted_to_utc is false by default.
18241827
ArrowWriterProperties::Builder builder;
@@ -1830,7 +1833,6 @@ TEST_F(TestConvertArrowSchema, ParquetTimeAdjustedToUTC) {
18301833

18311834
arrow_writer_properties = builder.set_time_adjusted_to_utc(false)->build();
18321835
run_test(arrow_writer_properties, false);
1833-
18341836
}
18351837

18361838
class TestConvertRoundTrip : public ::testing::Test {

cpp/src/parquet/properties.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,8 @@ class PARQUET_EXPORT ArrowWriterProperties {
12571257
return this;
12581258
}
12591259

1260-
/// \brief Sets whether TIME annotations have isAdjustedTOUTC=false or isAdjustedToUTC=true.
1260+
/// \brief Sets whether TIME annotations have isAdjustedTOUTC=false or
1261+
/// isAdjustedToUTC=true.
12611262
///
12621263
/// Default is false.
12631264
Builder* set_time_adjusted_to_utc(bool adjusted) {

0 commit comments

Comments
 (0)