Skip to content

Refactor data type handling with type interfaces - #872

Open
jt2594838 wants to merge 130 commits into
developfrom
add_interfaces_for_type
Open

Refactor data type handling with type interfaces#872
jt2594838 wants to merge 130 commits into
developfrom
add_interfaces_for_type

Conversation

@jt2594838

Copy link
Copy Markdown
Contributor

Summary

  • introduce type interfaces and services for data-type-specific operations
  • replace direct TSDataType switch logic across read, write, tools, examples, and tests
  • move casting, sizing, numeric, and comparable behavior into type or enum-specific implementations
  • preserve unsupported-type handling and route new user-facing messages through i18n resources

Testing

  • ./mvnw test -P with-java -pl java/tsfile -am -Dtest=TypeCastTest -Dsurefire.failIfNoSpecifiedTests=false
  • Spotless and Checkstyle validation

@codecov-commenter

codecov-commenter commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.79550% with 677 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.49%. Comparing base (86252e5) to head (59d0ae1).
⚠️ Report is 21 commits behind head on develop.

Files with missing lines Patch % Lines
...ain/java/org/apache/tsfile/utils/TypeServices.java 40.16% 146 Missing ⚠️
.../main/java/org/apache/tsfile/enums/TSDataType.java 0.00% 141 Missing ⚠️
.../java/org/apache/tsfile/utils/TsPrimitiveType.java 0.00% 89 Missing ⚠️
.../java/org/apache/tsfile/read/common/type/Type.java 45.26% 52 Missing ⚠️
...rg/apache/tsfile/read/common/type/TypeFactory.java 45.16% 17 Missing ⚠️
...org/apache/tsfile/read/common/type/DoubleType.java 89.65% 15 Missing ⚠️
...org/apache/tsfile/read/common/type/ObjectType.java 88.63% 15 Missing ⚠️
.../org/apache/tsfile/read/common/type/FloatType.java 90.27% 14 Missing ⚠️
...a/org/apache/tsfile/read/common/type/BlobType.java 90.64% 13 Missing ⚠️
...rg/apache/tsfile/read/common/type/BooleanType.java 91.03% 13 Missing ⚠️
... and 32 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #872      +/-   ##
===========================================
+ Coverage    60.52%   62.49%   +1.96%     
===========================================
  Files          735      754      +19     
  Lines        48439    49925    +1486     
  Branches      7679     7667      -12     
===========================================
+ Hits         29319    31199    +1880     
+ Misses       17718    17324     -394     
  Partials      1402     1402              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants