Skip to content

feat: support file type classify#254

Merged
lucasfang merged 1 commit into
alibaba:mainfrom
lucasfang:file_type
Apr 27, 2026
Merged

feat: support file type classify#254
lucasfang merged 1 commit into
alibaba:mainfrom
lucasfang:file_type

Conversation

@lucasfang
Copy link
Copy Markdown
Collaborator

@lucasfang lucasfang commented Apr 27, 2026

Purpose

Adds a FileType abstraction and utility methods to classify Paimon file paths into meta/data/index categories.

Tests

FileTypeTest
TestIsIndex
TestMetaPrefix
TestIndexTypes
TestMetaSpecialNames
TestDefaultData
TestChangelogInAncestorPathNotMisclassified
TestBranchPaths
TestTempWrappedName
TestInvalidTempWrapperFallsBackToOriginalName

API and Format

Documentation

Generative AI tooling

Copilot AI review requested due to automatic review settings April 27, 2026 06:45
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds a FileType abstraction and utility methods to classify Paimon file paths into meta/data/index categories, with unit tests validating expected behavior across common path patterns (including branch and temp-wrapped names).

Changes:

  • Introduces FileType enum and FileTypeUtils API (IsIndex, Classify, ToString).
  • Implements path-based classification logic including temp-file name unwrapping.
  • Adds comprehensive GTest coverage for classification cases.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/paimon/common/utils/file_type.h Declares FileType and FileTypeUtils public API.
src/paimon/common/utils/file_type.cpp Implements classification, string conversion, and temp-name unwrapping.
src/paimon/common/utils/file_type_test.cpp Adds unit tests covering meta/data/index classification and edge cases.

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

Comment thread src/paimon/common/utils/file_type.cpp
Comment thread src/paimon/common/utils/file_type.cpp
Comment thread src/paimon/common/utils/file_type.cpp
Comment thread src/paimon/common/utils/file_type.h
Copy link
Copy Markdown
Collaborator

@lxy-9602 lxy-9602 left a comment

Choose a reason for hiding this comment

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

+1

@lucasfang lucasfang merged commit 579e65e into alibaba:main Apr 27, 2026
13 checks passed
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.

3 participants