feat: deprecated datetime#44
Merged
killme2008 merged 2 commits intomainfrom Apr 21, 2026
Merged
Conversation
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
There was a problem hiding this comment.
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.DateTimeas[Obsolete]with updated XML docs, and keep timestamp validation accepting it. - Normalize
ColumnDataType.DateTimetoColumnDataType.TimestampMicrosecondinsideTableBuilder.AddColumn. - Remove
DateTimehandling 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.