Skip to content

feat: deprecated datetime#44

Merged
killme2008 merged 2 commits intomainfrom
feat/deprecated-datetime
Apr 21, 2026
Merged

feat: deprecated datetime#44
killme2008 merged 2 commits intomainfrom
feat/deprecated-datetime

Conversation

@killme2008
Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR deprecates ColumnDataType.DateTime (treated by GreptimeDB as an alias of TIMESTAMP_MICROSECOND) and removes internal special-casing by normalizing the type at the TableBuilder boundary.

Changes:

  • Mark ColumnDataType.DateTime as [Obsolete] with updated XML docs, and keep timestamp validation accepting it.
  • Normalize ColumnDataType.DateTime to ColumnDataType.TimestampMicrosecond inside TableBuilder.AddColumn.
  • Remove DateTime handling from internal coercion/Arrow/proto mapping and update tests accordingly.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/GreptimeDB.Ingester.Tests/TypeCoercionTests.cs Updates a coercion test to target TimestampMicrosecond instead of DateTime.
tests/GreptimeDB.Ingester.Tests/RequestBuilderTests.cs Updates request-building test schema to use TimestampMicrosecond.
tests/GreptimeDB.Ingester.Tests/RecordBatchBuilderTests.cs Updates record-batch test schema to use TimestampMicrosecond.
tests/GreptimeDB.Ingester.Tests/ArrowTypeMapperTests.cs Removes DateTime coverage from Arrow type mapping tests.
src/GreptimeDB.Ingester/Types/TypeCoercion.cs Removes DateTime alias coercion path; timestamps now handled only via explicit timestamp types.
src/GreptimeDB.Ingester/Types/ColumnDataType.cs Adds deprecation docs + [Obsolete] for DateTime; keeps IsTimestamp() accepting it.
src/GreptimeDB.Ingester/Table/TableBuilder.cs Normalizes DateTime to TimestampMicrosecond during column creation.
src/GreptimeDB.Ingester/Internal/RequestBuilder.cs Removes DateTime proto encoding/mapping since it should be normalized upstream.
src/GreptimeDB.Ingester/Arrow/RecordBatchBuilder.cs Removes DateTime arrow array building case.
src/GreptimeDB.Ingester/Arrow/ArrowTypeMapper.cs Removes DateTime arrow type mapping and timestamp-unit handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/GreptimeDB.Ingester/Table/TableBuilder.cs
@killme2008 killme2008 merged commit ef9c243 into main Apr 21, 2026
7 checks passed
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.

2 participants