Skip to content

Refactor data type handling with type interfaces#872

Open
jt2594838 wants to merge 128 commits into
developfrom
add_interfaces_for_type
Open

Refactor data type handling with type interfaces#872
jt2594838 wants to merge 128 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.42650% with 677 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.37%. Comparing base (86252e5) to head (2f4ac13).
⚠️ Report is 15 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 44.08% 52 Missing ⚠️
...rg/apache/tsfile/read/common/type/TypeFactory.java 45.16% 17 Missing ⚠️
...org/apache/tsfile/read/common/type/DoubleType.java 89.36% 15 Missing ⚠️
...org/apache/tsfile/read/common/type/ObjectType.java 88.09% 15 Missing ⚠️
.../org/apache/tsfile/read/common/type/FloatType.java 90.00% 14 Missing ⚠️
...a/org/apache/tsfile/read/common/type/BlobType.java 90.22% 13 Missing ⚠️
...rg/apache/tsfile/read/common/type/BooleanType.java 90.78% 13 Missing ⚠️
... and 32 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #872      +/-   ##
===========================================
+ Coverage    60.52%   62.37%   +1.84%     
===========================================
  Files          735      754      +19     
  Lines        48439    49765    +1326     
  Branches      7679     7641      -38     
===========================================
+ Hits         29319    31042    +1723     
+ Misses       17718    17314     -404     
- Partials      1402     1409       +7     

☔ 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