Skip to content

GH-24157: [C++] Add tests for DayTimeIntervalBuilder - #48709

Merged
kou merged 3 commits into
apache:mainfrom
HyukjinKwon:GH-24157
Jan 9, 2026
Merged

GH-24157: [C++] Add tests for DayTimeIntervalBuilder#48709
kou merged 3 commits into
apache:mainfrom
HyukjinKwon:GH-24157

Conversation

@HyukjinKwon

@HyukjinKwon HyukjinKwon commented Jan 2, 2026

Copy link
Copy Markdown
Member

Rationale for this change

The DayTimeIntervalBuilder class was marked as untested (ARROW-7938). This PR adds dedicated tests to verify the builder's functionality, similar to how TestHalfFloatBuilder tests HalfFloatBuilder.

What changes are included in this PR?

  • Added TestDayTimeIntervalBuilder test class with three test cases:
    • TestAppend: Tests basic append operations including nulls and unsafe append
    • TestBulkAppend: Tests bulk append operations with various signatures
    • TestConstructors: Tests all constructor variations (default, with pool, with explicit type)
  • Removed the TODO comment from builder_time.h since the class is now tested

Are these changes tested?

Yes, the tests I mentioned are added.

Are there any user-facing changes?

No, test-only.

@github-actions

github-actions Bot commented Jan 2, 2026

Copy link
Copy Markdown

⚠️ GitHub issue #24157 has been automatically assigned in GitHub to PR creator.

@HyukjinKwon
HyukjinKwon marked this pull request as draft January 2, 2026 03:27
@HyukjinKwon
HyukjinKwon marked this pull request as ready for review January 2, 2026 03:32
Comment thread cpp/src/arrow/array/array_test.cc
Comment thread cpp/src/arrow/array/array_test.cc
@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jan 6, 2026
@HyukjinKwon

Copy link
Copy Markdown
Member Author

@kou do you mind if I ask to take a quick look please? I thought this is pretty strait forward 🙇 .

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment thread cpp/src/arrow/array/array_test.cc Outdated
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Jan 9, 2026
@HyukjinKwon

Copy link
Copy Markdown
Member Author
/arrow/cpp/src/arrow/flight/sql/odbc/README.md:29: error: Found unknown command '\to' (warning treated as error, aborting now)

Error: `docker compose --file=/home/runner/work/arrow/arrow/compose.yaml run --rm conda-python-docs` exited with a non-zero exit code 1, see the process log above.

is from #48786 fwiw!

@kou
kou merged commit ddab347 into apache:main Jan 9, 2026
46 of 48 checks passed
@kou kou removed the awaiting merge Awaiting merge label Jan 9, 2026
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit ddab347.

There weren't enough matching historic benchmark results to make a call on whether there were regressions.

The full Conbench report has more details.

Mottl pushed a commit to Mottl/arrow that referenced this pull request May 26, 2026
)

### Rationale for this change

The `DayTimeIntervalBuilder` class was marked as untested (ARROW-7938). This PR adds dedicated tests to verify the builder's functionality, similar to how `TestHalfFloatBuilder` tests `HalfFloatBuilder`.

### What changes are included in this PR?

- Added `TestDayTimeIntervalBuilder` test class with three test cases:
  - `TestAppend`: Tests basic append operations including nulls and unsafe append
  - `TestBulkAppend`: Tests bulk append operations with various signatures
  - `TestConstructors`: Tests all constructor variations (default, with pool, with explicit type)
- Removed the TODO comment from `builder_time.h` since the class is now tested

### Are these changes tested?

Yes, the tests I mentioned are added.

### Are there any user-facing changes?

No, test-only.
* GitHub Issue: apache#24157

Lead-authored-by: Hyukjin Kwon <gurwls223@apache.org>
Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants