Skip to content

Fix ASF license headers across TsFile - #1125

Merged
ColinLeeo merged 1 commit into
apache:developfrom
HTHou:codex/fix-asf-license-headers
Nov 18, 2026
Merged

ColinLeeo merged 1 commit into
apache:developfrom
HTHou:codex/fix-asf-license-headers

Conversation

@HTHou

@HTHou HTHou commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Description

Apply the same ASF header cleanup used for the IoTDB release audit to TsFile. The ATR lightweight matcher flagged 75 source files on develop. Maven RAT recognized their Apache-2.0 licenses. IoTDB license header fix

  • Correct the same typo in 59 C++ test headers and restore the ASF wording in 14 Java files and one Python file.
  • Update the FreeMarker template that emits Java filter headers.
  • Document how to preserve and review license headers in CLAUDE.md.

The remaining ATR match failure is the Commons IO-derived FileUtils.java. Its existing license notice follows the source attribution recorded in LICENSE. Commons IO attribution

Verification

  • The ATR header matcher accepted all 74 repaired source files and 1,458 of the 1,459 files in its source scope.
  • Spotless passed for the changed Java, C++, and Python files.
  • FMPP generated 30 Java source files, including eight filters. All 30 passed the ASF header check.
  • Maven RAT passed across 8 reactor modules with the Java and Python profiles enabled, including C++.
  • git diff --check passed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the ASF license-header normalization.

No open issues 🎉

What changed in this PR

Normalizes ASF license-header comments across TsFile’s C++, Java, and Python sources for release-audit checks, without changing runtime behavior.

Changes:

  • Repairs header wording in 59 C++ tests, 14 Java files, and one Python file.
  • Updates the FreeMarker template so generated Java filters receive the complete ASF header.
  • Documents header preservation, third-party notices, and separate ATR/RAT checks.
File Description
python/​tsfile/​dataset/​merge.py Restores standard disclaimer wording.
java/​tsfile/​src/​test/​java/​org/​apache/​tsfile/​read/​filter/​TsBlockFilterTest.java Restores complete ASF header.
java/​tsfile/​src/​test/​java/​org/​apache/​tsfile/​read/​filter/​NumericalOperatorsTest.java Restores complete ASF header.
java/​tsfile/​src/​test/​java/​org/​apache/​tsfile/​read/​filter/​NullOperatorsTest.java Restores complete ASF header.
java/​tsfile/​src/​test/​java/​org/​apache/​tsfile/​read/​filter/​BooleanOperatorsTest.java Restores complete ASF header.
java/​tsfile/​src/​test/​java/​org/​apache/​tsfile/​read/​filter/​BinaryOperatorsTest.java Restores complete ASF header.
java/​tsfile/​src/​main/​java/​org/​apache/​tsfile/​utils/​FilterDeserialize.java Restores complete ASF header.
java/​tsfile/​src/​main/​java/​org/​apache/​tsfile/​read/​TsFileSequenceReader.java Removes HTML paragraph tags from header.
java/​tsfile/​src/​main/​java/​org/​apache/​tsfile/​read/​filter/​operator/​ValueIsNullOperator.java Restores complete ASF header.
java/​tsfile/​src/​main/​java/​org/​apache/​tsfile/​read/​filter/​operator/​ValueIsNotNullOperator.java Restores complete ASF header.
java/​tsfile/​src/​main/​java/​org/​apache/​tsfile/​read/​filter/​basic/​CompareNullFilter.java Restores complete ASF header.
java/​tsfile/​src/​main/​java/​org/​apache/​tsfile/​file/​metadata/​TsFileMetadata.java Removes HTML paragraph tags from header.
java/​tsfile/​src/​main/​java/​org/​apache/​tsfile/​file/​metadata/​TableSchema.java Removes HTML paragraph tags from header.
java/​tsfile/​src/​main/​java/​org/​apache/​tsfile/​file/​metadata/​LogicalTableSchema.java Removes HTML paragraph tags from header.
java/​tsfile/​src/​main/​java/​org/​apache/​tsfile/​compatibility/​CompatibilityUtils.java Removes HTML paragraph tags from header.
java/​tsfile/​src/​main/​codegen/​templates/​FilterTemplate.ftl Emits complete ASF headers for generated filters.
cpp/​test/​writer/​value_page_writer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​writer/​value_chunk_writer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​writer/​tsfile_writer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​writer/​time_page_writer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​writer/​time_chunk_writer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​writer/​table_view/​tsfile_writer_table_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​writer/​page_writer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​writer/​chunk_writer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​utils/​db_utils_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​reader/​tsfile_reader_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​reader/​tree_view/​tsfile_reader_tree_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​reader/​table_view/​tsfile_reader_table_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​reader/​filter/​tag_filter_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​reader/​bloom_filter_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​parser/​path_name_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​file/​write_sink_e2e_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​file/​write_file_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​file/​memory_random_access_write_file_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​zigzag_codec_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​ts2diff_codec_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​sprintz_codec_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​plain_codec_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​int64_rle_codec_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​int64_packer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​int32_rle_codec_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​int32_packer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​gorilla_codec_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​encoding/​dictionary_codec_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​cwrapper/​cwrapper_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​cwrapper/​c_release_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​compress/​snappy_compressor_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​compress/​lzo_compressor_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​compress/​lz4_compressor_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​compress/​gzip_compressor_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​tsfile_common_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​tsblock/​vector/​variable_length_vector_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​tsblock/​vector/​fixed_length_vector_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​tsblock/​tuple_desc_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​tsblock/​tslock_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​tablet_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​statistic_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​schema_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​row_record_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​record_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​device_id_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​datatype/​value_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​datatype/​date_converter_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​container/​sorted_array_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​container/​slice_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​container/​simple_vector_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​container/​murmur_hash3_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​container/​list_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​container/​byte_buffer_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​container/​bit_map_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​container/​array_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​allocator/​page_arena_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​allocator/​my_string_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​allocator/​byte_stream_test.cc Corrects header typo: “a” → “at”.
cpp/​test/​common/​allocator/​alloc_base_test.cc Corrects header typo: “a” → “at”.
CLAUDE.md Expands license-header preservation and review guidance.

Review effort: Balanced

@ColinLeeo
ColinLeeo merged commit 43a73c9 into apache:develop Nov 18, 2026
57 checks passed
@HTHou
HTHou deleted the codex/fix-asf-license-headers branch November 18, 2026 07:29
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