From 1b428c9dce2da5b3676610b3483f6b2d08972b0a Mon Sep 17 00:00:00 2001 From: spricoder Date: Sun, 31 May 2026 11:42:32 +0800 Subject: [PATCH 1/4] fix(cpp): correct typos in comments, build scripts, and debug output Spelling fixes only; no behavioral change. Touches code comments, CMake/`build.sh` messages, the `increament` local parameter in byte_stream.h, a debug `std::cout` string, and grammar-file comments (Arithmetics->Arithmetic, Comparation->Comparison). --- cpp/build.sh | 2 +- cpp/examples/CMakeLists.txt | 2 +- cpp/src/common/allocator/byte_stream.h | 18 +++++++++--------- cpp/src/common/cache/lru_cache.h | 2 +- cpp/src/common/global.cc | 2 +- cpp/src/common/seq_tvlist.inc | 2 +- cpp/src/encoding/int32_sprintz_encoder.h | 2 +- cpp/src/file/CMakeLists.txt | 2 +- cpp/src/file/tsfile_io_writer.cc | 2 +- cpp/src/parser/PathLexer.g4 | 4 ++-- cpp/src/utils/util_define.h | 2 +- cpp/src/writer/CMakeLists.txt | 2 +- cpp/src/writer/page_writer.cc | 2 +- cpp/src/writer/time_page_writer.cc | 2 +- cpp/src/writer/value_page_writer.cc | 2 +- cpp/test/common/row_record_test.cc | 2 +- cpp/test/writer/tsfile_writer_test.cc | 2 +- 17 files changed, 26 insertions(+), 26 deletions(-) diff --git a/cpp/build.sh b/cpp/build.sh index 809e6733b..d2950595b 100644 --- a/cpp/build.sh +++ b/cpp/build.sh @@ -149,7 +149,7 @@ then cd build/minsizerel else echo "" - echo "unknow build type: ${build_type}, valid build types(case intensive): Debug, Release, RelWithDebInfo, MinSizeRel" + echo "unknown build type: ${build_type}, valid build types(case insensitive): Debug, Release, RelWithDebInfo, MinSizeRel" echo "" exit 1 fi diff --git a/cpp/examples/CMakeLists.txt b/cpp/examples/CMakeLists.txt index 1d5072b08..5d995c11f 100644 --- a/cpp/examples/CMakeLists.txt +++ b/cpp/examples/CMakeLists.txt @@ -18,7 +18,7 @@ under the License. ]] cmake_minimum_required(VERSION 3.10) project(examples) -message("Running in exampes directory") +message("Running in examples directory") if (NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") diff --git a/cpp/src/common/allocator/byte_stream.h b/cpp/src/common/allocator/byte_stream.h index 6d08744c3..4d7d49594 100644 --- a/cpp/src/common/allocator/byte_stream.h +++ b/cpp/src/common/allocator/byte_stream.h @@ -55,21 +55,21 @@ class OptionalAtomic { } } - FORCE_INLINE T atomic_faa(const T increament) { + FORCE_INLINE T atomic_faa(const T increment) { if (UNLIKELY(enable_atomic_)) { - return ATOMIC_FAA(&val_, increament); + return ATOMIC_FAA(&val_, increment); } else { T old_val = val_; - val_ = val_ + increament; + val_ = val_ + increment; return old_val; } } - FORCE_INLINE T atomic_aaf(const T increament) { + FORCE_INLINE T atomic_aaf(const T increment) { if (UNLIKELY(enable_atomic_)) { - return ATOMIC_AAF(&val_, increament); + return ATOMIC_AAF(&val_, increment); } else { - val_ = val_ + increament; + val_ = val_ + increment; return val_; } } @@ -378,7 +378,7 @@ class ByteStream { // reader @want_len bytes to @buf, @read_len indicates real len we reader. // if ByteStream do not have so many bytes, it will return E_PARTIAL_READ if - // no other error occure. + // no other error occur. int read_buf(uint8_t* buf, const uint32_t want_len, uint32_t& read_len) { int ret = common::E_OK; bool partial_read = (read_pos_ + want_len > total_size_.load()); @@ -540,7 +540,7 @@ class ByteStream { return b; } if (UNLIKELY(cur_ == nullptr)) { - // this consumer did not initialiazed. + // this consumer did not initialized. cur_ = host_.head_.load(); read_offset_within_cur_page_ = 0; } @@ -717,7 +717,7 @@ FORCE_INLINE int copy_bs_to_buf(ByteStream& bs, char* src_buf, FORCE_INLINE uint32_t get_var_uint_size( uint32_t - ui32) // return: the length of usigned number after varint encoding. + ui32) // return: the length of unsigned number after varint encoding. { uint32_t bytes = 0; while ((ui32 & 0xFFFFFF80) != 0) { diff --git a/cpp/src/common/cache/lru_cache.h b/cpp/src/common/cache/lru_cache.h index 048a16ef6..10786841d 100644 --- a/cpp/src/common/cache/lru_cache.h +++ b/cpp/src/common/cache/lru_cache.h @@ -80,7 +80,7 @@ class Cache { prune(); } /** - for backward compatibity. redirects to tryGetCopy() + for backward compatibility. redirects to tryGetCopy() */ bool tryGet(const Key& kIn, Value& vOut) { return tryGetCopy(kIn, vOut); } diff --git a/cpp/src/common/global.cc b/cpp/src/common/global.cc index a510dbff9..b49b55657 100644 --- a/cpp/src/common/global.cc +++ b/cpp/src/common/global.cc @@ -157,7 +157,7 @@ int init_common() { } bool is_timestamp_column_name(const char* time_col_name) { - // both "time" and "timestamp" refer to timestmap column. + // both "time" and "timestamp" refer to timestamp column. int32_t len = strlen(time_col_name); if (len == 4) { return strncasecmp(time_col_name, "time", 4) == 0; diff --git a/cpp/src/common/seq_tvlist.inc b/cpp/src/common/seq_tvlist.inc index 0e723ea3f..c25e49f45 100644 --- a/cpp/src/common/seq_tvlist.inc +++ b/cpp/src/common/seq_tvlist.inc @@ -170,5 +170,5 @@ int32_t SeqTVList::binary_search_upper(int64_t time) return start; } -} // namepsace storage +} // namespace storage diff --git a/cpp/src/encoding/int32_sprintz_encoder.h b/cpp/src/encoding/int32_sprintz_encoder.h index ead5010bb..e92f25c3e 100644 --- a/cpp/src/encoding/int32_sprintz_encoder.h +++ b/cpp/src/encoding/int32_sprintz_encoder.h @@ -164,7 +164,7 @@ class Int32SprintzEncoder : public SprintzEncoder { } else if (predict_method_ == "fire") { pred = fire(value, prev); } else { - // unsupport + // unsupported ASSERT(false); } diff --git a/cpp/src/file/CMakeLists.txt b/cpp/src/file/CMakeLists.txt index dd425f7c6..b1b203c17 100644 --- a/cpp/src/file/CMakeLists.txt +++ b/cpp/src/file/CMakeLists.txt @@ -16,7 +16,7 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ]] -message("running in src/file diectory") +message("running in src/file directory") message("CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}") set(CMAKE_POSITION_INDEPENDENT_CODE ON) diff --git a/cpp/src/file/tsfile_io_writer.cc b/cpp/src/file/tsfile_io_writer.cc index 343884448..21086da61 100644 --- a/cpp/src/file/tsfile_io_writer.cc +++ b/cpp/src/file/tsfile_io_writer.cc @@ -799,7 +799,7 @@ int TsFileIOWriter::generate_root( if (RET_FAIL(to->push_back(cur_index_node))) { } #if DEBUG_SE - std::cout << "genereate root 2, " + std::cout << "generate root 2, " "alloc_and_init_meta_index_node. cur_index_node=" << *cur_index_node << std::endl; #endif diff --git a/cpp/src/parser/PathLexer.g4 b/cpp/src/parser/PathLexer.g4 index 0f682f4ea..485edbfaf 100644 --- a/cpp/src/parser/PathLexer.g4 +++ b/cpp/src/parser/PathLexer.g4 @@ -52,7 +52,7 @@ TIMESTAMP * 3. Operators */ -// Operators. Arithmetics +// Operators. Arithmetic MINUS : '-'; PLUS : '+'; @@ -60,7 +60,7 @@ DIV : '/'; MOD : '%'; -// Operators. Comparation +// Operators. Comparison OPERATOR_DEQ : '=='; OPERATOR_SEQ : '='; diff --git a/cpp/src/utils/util_define.h b/cpp/src/utils/util_define.h index 3cbe1d4c9..ee96616f1 100644 --- a/cpp/src/utils/util_define.h +++ b/cpp/src/utils/util_define.h @@ -84,7 +84,7 @@ typedef int mode_t; #define TSFILE_API #endif -/* ======== unsued ======== */ +/* ======== unused ======== */ #define UNUSED(v) ((void)(v)) #if __cplusplus >= 201703L #define MAYBE_UNUSED [[maybe_unused]] diff --git a/cpp/src/writer/CMakeLists.txt b/cpp/src/writer/CMakeLists.txt index dddac10b5..87426b13a 100644 --- a/cpp/src/writer/CMakeLists.txt +++ b/cpp/src/writer/CMakeLists.txt @@ -16,7 +16,7 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ]] -message("running in src/write diectory") +message("running in src/write directory") message("CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}") set(CMAKE_POSITION_INDEPENDENT_CODE ON) diff --git a/cpp/src/writer/page_writer.cc b/cpp/src/writer/page_writer.cc index b4822e6a2..7766e14c4 100644 --- a/cpp/src/writer/page_writer.cc +++ b/cpp/src/writer/page_writer.cc @@ -56,7 +56,7 @@ int PageData::init(ByteStream& time_bs, ByteStream& value_bs, } else { // TODO // NOTE: different compressor may have different compress API - // Be carefull about the memory. + // Be careful about the memory. if (RET_FAIL(compressor->reset(true))) { } else if (RET_FAIL(compressor->compress( uncompressed_buf_, uncompressed_size_, compressed_buf_, diff --git a/cpp/src/writer/time_page_writer.cc b/cpp/src/writer/time_page_writer.cc index 1b83ec929..54cd0d8ba 100644 --- a/cpp/src/writer/time_page_writer.cc +++ b/cpp/src/writer/time_page_writer.cc @@ -48,7 +48,7 @@ int TimePageData::init(ByteStream& time_bs, Compressor* compressor) { } else { // TODO // NOTE: different compressor may have different compress API - // Be carefull about the memory. + // Be careful about the memory. if (RET_FAIL(compressor->reset(true))) { } else if (RET_FAIL(compressor->compress( uncompressed_buf_, uncompressed_size_, compressed_buf_, diff --git a/cpp/src/writer/value_page_writer.cc b/cpp/src/writer/value_page_writer.cc index 1c8f05350..a7bcd89c4 100644 --- a/cpp/src/writer/value_page_writer.cc +++ b/cpp/src/writer/value_page_writer.cc @@ -62,7 +62,7 @@ int ValuePageData::init(ByteStream& col_notnull_bitmap_bs, ByteStream& value_bs, } else { // TODO // NOTE: different compressor may have different compress API - // Be carefull about the memory. + // Be careful about the memory. if (RET_FAIL(compressor->reset(true))) { } else if (RET_FAIL(compressor->compress( uncompressed_buf_, uncompressed_size_, compressed_buf_, diff --git a/cpp/test/common/row_record_test.cc b/cpp/test/common/row_record_test.cc index 964d05514..6b8b54a15 100644 --- a/cpp/test/common/row_record_test.cc +++ b/cpp/test/common/row_record_test.cc @@ -55,7 +55,7 @@ TEST(FieldTest, IsLiteral) { TEST(FieldTest, SetValue) { Field field; - common::PageArena pa; // dosen't matter + common::PageArena pa; // doesn't matter int32_t i32_val = 123; field.set_value(common::INT32, &i32_val, common::get_len(common::INT32), pa); diff --git a/cpp/test/writer/tsfile_writer_test.cc b/cpp/test/writer/tsfile_writer_test.cc index 285d926b1..3c6d15165 100644 --- a/cpp/test/writer/tsfile_writer_test.cc +++ b/cpp/test/writer/tsfile_writer_test.cc @@ -660,7 +660,7 @@ TEST_F(TsFileWriterTest, FlushMultipleDevice) { break; } record = qds->get_row_record(); - // if empty chunk is writen, the timestamp should be NULL + // if empty chunk is written, the timestamp should be NULL if (!record) { break; } From cca85f6893c8fd7100848850d35ad91129f00c46 Mon Sep 17 00:00:00 2001 From: spricoder Date: Sun, 31 May 2026 11:42:47 +0800 Subject: [PATCH 2/4] fix(java): correct typos in comments, javadoc, and i18n log messages Spelling fixes only. Includes code comments and Javadoc across the encoding, file, and read packages, and the English i18n message values (occured->occurred, and a duplicated "with with"). Message keys are unchanged, so the en/zh key-set alignment enforced by MessagesTest is preserved. The intentionally-preserved "supproted"/"greather" strings (documented inline for backward compatibility) are left untouched. --- .../java/org/apache/tsfile/block/column/Column.java | 4 ++-- .../org/apache/tsfile/i18n/messages.properties | 10 +++++----- .../java/org/apache/tsfile/TsFileSequenceRead.java | 2 +- .../main/antlr4/org/apache/tsfile/parser/PathLexer.g4 | 4 ++-- .../org/apache/tsfile/common/conf/TSFileConfig.java | 2 +- .../apache/tsfile/encoding/encoder/IntRleEncoder.java | 2 +- .../tsfile/encoding/encoder/IntZigzagEncoder.java | 2 +- .../apache/tsfile/encoding/encoder/LongRleEncoder.java | 2 +- .../tsfile/encoding/encoder/LongZigzagEncoder.java | 2 +- .../org/apache/tsfile/encoding/encoder/RleEncoder.java | 4 ++-- .../org/apache/tsfile/encoding/encoder/SDTEncoder.java | 2 +- .../apache/tsfile/encoding/encoder/SprintzEncoder.java | 2 +- .../org/apache/tsfile/file/header/ChunkHeader.java | 2 +- .../org/apache/tsfile/file/metadata/IDeviceID.java | 2 +- .../tsfile/read/reader/TsFileLastReaderTest.java | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) diff --git a/java/common/src/main/java/org/apache/tsfile/block/column/Column.java b/java/common/src/main/java/org/apache/tsfile/block/column/Column.java index b5105ed6c..c9e30d200 100644 --- a/java/common/src/main/java/org/apache/tsfile/block/column/Column.java +++ b/java/common/src/main/java/org/apache/tsfile/block/column/Column.java @@ -178,9 +178,9 @@ default TsPrimitiveType getTsPrimitiveType(int position) { Column subColumnCopy(int fromIndex); /** - * Create a new colum from the current colum by keeping the same elements only with respect to + * Create a new column from the current column by keeping the same elements only with respect to * {@code positions} that starts at {@code offset} and has length of {@code length}. The - * implementation may return a view over the data in this colum or may return a copy, and the + * implementation may return a view over the data in this column or may return a copy, and the * implementation is allowed to retain the positions array for use in the view. */ Column getPositions(int[] positions, int offset, int length); diff --git a/java/common/src/main/resources/org/apache/tsfile/i18n/messages.properties b/java/common/src/main/resources/org/apache/tsfile/i18n/messages.properties index a4c34dde1..98909f7a6 100644 --- a/java/common/src/main/resources/org/apache/tsfile/i18n/messages.properties +++ b/java/common/src/main/resources/org/apache/tsfile/i18n/messages.properties @@ -722,16 +722,16 @@ error.encoding.ts_encoding_builder_unsupported_type = %1$s doesn't support data log.encoding.flush_data_failed = flush data to stream failed! # DoubleSprintzEncoder — encoding error -log.encoding.sprintz_double_encode_error = Error occured when encoding INT32 Type value with with Sprintz +log.encoding.sprintz_double_encode_error = Error occurred when encoding INT32 Type value with Sprintz # FloatSprintzEncoder — encoding error -log.encoding.sprintz_float_encode_error = Error occured when encoding Float Type value with with Sprintz +log.encoding.sprintz_float_encode_error = Error occurred when encoding Float Type value with Sprintz # IntSprintzEncoder — encoding error -log.encoding.sprintz_int_encode_error = Error occured when encoding INT32 Type value with with Sprintz +log.encoding.sprintz_int_encode_error = Error occurred when encoding INT32 Type value with Sprintz # LongSprintzEncoder — encoding error -log.encoding.sprintz_long_encode_error = Error occured when encoding INT64 Type value with with Sprintz +log.encoding.sprintz_long_encode_error = Error occurred when encoding INT64 Type value with Sprintz # DictionaryEncoder — flush error log.encoding.dictionary_encoder_flush_error = tsfile-encoding DictionaryEncoder: error occurs when flushing @@ -778,7 +778,7 @@ log.encoding.long_rle_decoder_read_error = tsfile-encoding IntRleDecoder: error log.encoding.dictionary_decoder_error = tsfile-decoding DictionaryDecoder: error occurs when decoding # FloatSprintzDecoder / IntSprintzDecoder / DoubleSprintzDecoder / LongSprintzDecoder — readInt error (4 sites, 1 key) -log.encoding.sprintz_decoder_read_error = Error occured when readInt with Sprintz Decoder. +log.encoding.sprintz_decoder_read_error = Error occurred when readInt with Sprintz Decoder. # TSEncodingBuilder — max string length negative value warning log.encoding.ts_encoding_max_string_length_negative = cannot set max string length to negative value, replaced with default value:{} diff --git a/java/examples/src/main/java/org/apache/tsfile/TsFileSequenceRead.java b/java/examples/src/main/java/org/apache/tsfile/TsFileSequenceRead.java index e6000618f..ecd3fdd27 100644 --- a/java/examples/src/main/java/org/apache/tsfile/TsFileSequenceRead.java +++ b/java/examples/src/main/java/org/apache/tsfile/TsFileSequenceRead.java @@ -46,7 +46,7 @@ /** This tool is used to read TsFile sequentially, including nonAligned or aligned timeseries. */ public class TsFileSequenceRead { - // if you wanna print detailed datas in pages, then turn it true. + // if you wanna print detailed data in pages, then turn it true. private static boolean printDetail = false; public static final String POINT_IN_PAGE = "\t\tpoints in the page: "; private static int MASK = 0x80; diff --git a/java/tsfile/src/main/antlr4/org/apache/tsfile/parser/PathLexer.g4 b/java/tsfile/src/main/antlr4/org/apache/tsfile/parser/PathLexer.g4 index 0f682f4ea..485edbfaf 100644 --- a/java/tsfile/src/main/antlr4/org/apache/tsfile/parser/PathLexer.g4 +++ b/java/tsfile/src/main/antlr4/org/apache/tsfile/parser/PathLexer.g4 @@ -52,7 +52,7 @@ TIMESTAMP * 3. Operators */ -// Operators. Arithmetics +// Operators. Arithmetic MINUS : '-'; PLUS : '+'; @@ -60,7 +60,7 @@ DIV : '/'; MOD : '%'; -// Operators. Comparation +// Operators. Comparison OPERATOR_DEQ : '=='; OPERATOR_SEQ : '='; diff --git a/java/tsfile/src/main/java/org/apache/tsfile/common/conf/TSFileConfig.java b/java/tsfile/src/main/java/org/apache/tsfile/common/conf/TSFileConfig.java index 24ab1428c..764eda5bd 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/common/conf/TSFileConfig.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/common/conf/TSFileConfig.java @@ -226,7 +226,7 @@ public class TSFileConfig implements Serializable { /** full path of kerberos keytab file. */ private String kerberosKeytabFilePath = "/path"; - /** kerberos pricipal. */ + /** kerberos principal. */ private String kerberosPrincipal = "principal"; /** The acceptable error rate of bloom filter. */ diff --git a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/IntRleEncoder.java b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/IntRleEncoder.java index ec133bea1..a9fd2e8fc 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/IntRleEncoder.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/IntRleEncoder.java @@ -122,7 +122,7 @@ public long getMaxByteSize() { if (values == null) { return 0; } - // try to caculate max value + // try to calculate max value int groupNum = (values.size() / 8 + 1) / 63 + 1; return (long) 8 + groupNum * 5 + values.size() * 4; } diff --git a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/IntZigzagEncoder.java b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/IntZigzagEncoder.java index 8194fed8d..b056167d0 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/IntZigzagEncoder.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/IntZigzagEncoder.java @@ -96,7 +96,7 @@ public long getMaxByteSize() { if (values == null) { return 0; } - // try to caculate max value + // try to calculate max value return (long) 8 + values.size() * 4; } } diff --git a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/LongRleEncoder.java b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/LongRleEncoder.java index 472a407c7..f9e9c5570 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/LongRleEncoder.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/LongRleEncoder.java @@ -115,7 +115,7 @@ public long getMaxByteSize() { if (values == null) { return 0; } - // try to caculate max value + // try to calculate max value int groupNum = (values.size() / 8 + 1) / 63 + 1; return (long) 8 + groupNum * 5 + values.size() * 8; } diff --git a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/LongZigzagEncoder.java b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/LongZigzagEncoder.java index 632f56402..130cf9bae 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/LongZigzagEncoder.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/LongZigzagEncoder.java @@ -107,7 +107,7 @@ public long getMaxByteSize() { if (values == null) { return 0; } - // try to caculate max value + // try to calculate max value return (long) 8 + values.size() * 4; } } diff --git a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/RleEncoder.java b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/RleEncoder.java index 65984524f..f3a8be7cd 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/RleEncoder.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/RleEncoder.java @@ -213,7 +213,7 @@ protected void endPreviousBitPackedRun(int lastBitPackedNum) { protected void encodeValue(T value) { if (!isBitWidthSaved) { // save bit width in header, - // perpare for read + // prepare for read byteCache.write(bitWidth); isBitWidthSaved = true; } @@ -249,7 +249,7 @@ protected void encodeValue(T value) { } } else { - // we encounter a differnt value + // we encounter a different value if (repeatCount >= TSFileConfig.RLE_MIN_REPEATED_NUM) { try { writeRleRun(); diff --git a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/SDTEncoder.java b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/SDTEncoder.java index f438c8868..0915d12f0 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/SDTEncoder.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/SDTEncoder.java @@ -30,7 +30,7 @@ public class SDTEncoder { private int lastReadInt; private float lastReadFloat; - // the last stored time and vlaue we compare current point against lastStoredPair + // the last stored time and value we compare current point against lastStoredPair private long lastStoredTimestamp; private long lastStoredLong; diff --git a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/SprintzEncoder.java b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/SprintzEncoder.java index 4cdbe5590..1d961925b 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/SprintzEncoder.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/encoding/encoder/SprintzEncoder.java @@ -47,7 +47,7 @@ public abstract class SprintzEncoder extends Encoder { /** output stream to buffer {@code }. */ protected ByteArrayOutputStream byteCache; - // selecet the predict method + // select the predict method protected String predictMethod = TSFileDescriptor.getInstance().getConfig().getSprintzPredictScheme(); diff --git a/java/tsfile/src/main/java/org/apache/tsfile/file/header/ChunkHeader.java b/java/tsfile/src/main/java/org/apache/tsfile/file/header/ChunkHeader.java index c3a29d2f7..a03209fdc 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/file/header/ChunkHeader.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/file/header/ChunkHeader.java @@ -209,7 +209,7 @@ public static ChunkHeader deserializeFrom(TsFileInput input, long offset) throws public static ChunkHeader deserializeFrom( TsFileInput input, long offset, LongConsumer ioSizeRecorder) throws IOException { - // only 6 bytes, no need to call ioSizeRecorder.accept alone, combine into the remaining raed + // only 6 bytes, no need to call ioSizeRecorder.accept alone, combine into the remaining read // operation ByteBuffer buffer = ByteBuffer.allocate(Byte.BYTES + Integer.BYTES + 1); input.read(buffer, offset); diff --git a/java/tsfile/src/main/java/org/apache/tsfile/file/metadata/IDeviceID.java b/java/tsfile/src/main/java/org/apache/tsfile/file/metadata/IDeviceID.java index db9fb5bf7..d595ca659 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/file/metadata/IDeviceID.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/file/metadata/IDeviceID.java @@ -58,7 +58,7 @@ public interface IDeviceID extends Comparable, Accountable, Serializa /** * @return how many segments this DeviceId consists of. For a path-DeviceId, like "root.a.b.c.d", - * it is 5; fot a tuple-DeviceId, like "(table1, beijing, turbine)", it is 3. + * it is 5; for a tuple-DeviceId, like "(table1, beijing, turbine)", it is 3. */ int segmentNum(); diff --git a/java/tsfile/src/test/java/org/apache/tsfile/read/reader/TsFileLastReaderTest.java b/java/tsfile/src/test/java/org/apache/tsfile/read/reader/TsFileLastReaderTest.java index dc81096f8..bfc55868d 100644 --- a/java/tsfile/src/test/java/org/apache/tsfile/read/reader/TsFileLastReaderTest.java +++ b/java/tsfile/src/test/java/org/apache/tsfile/read/reader/TsFileLastReaderTest.java @@ -103,7 +103,7 @@ private void createFile(int deviceNum, int measurementNum, int seriesPointNum) } } - // the second half measurements will have an emtpy last chunk each + // the second half measurements will have an empty last chunk each private void createFileWithLastEmptyChunks(int deviceNum, int measurementNum, int seriesPointNum) throws IOException, WriteProcessException { try (TsFileWriter writer = new TsFileWriter(file)) { From 173b70e4fb9d85e0d1c165211dc14128ccbdc1db Mon Sep 17 00:00:00 2001 From: spricoder Date: Sun, 31 May 2026 11:42:57 +0800 Subject: [PATCH 3/4] fix(docs): correct typos in documentation Spelling fixes in README/QuickStart/release notes (aquisition->acquisition, severval->several, Paritial->Partial, wirh->with, memroy->memory). In the Chinese committers doc, "Committe" is corrected to "Committer" (the Apache role), which also repairs a broken anchor: it now points to About.md#committer to match the existing "### Committer" heading. --- RELEASE_NOTES.md | 2 +- docs/src/README.md | 2 +- docs/src/stage/QuickStart.md | 2 +- docs/src/zh/Development/Community-Project-Committers.md | 4 ++-- java/tsfile/README.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 4c02e1222..dcc7db783 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -187,7 +187,7 @@ * Added accountable function to measurementSchema by @Caideyipi in #509 * Correct the retained size calculation for BinaryColumn and BinaryColumnBuilder by @JackieTien97 in #514 * add switch to disable native lz4 (#480) by @jt2594838 in #515 -* Correct the memroy calculation of BinaryColumnBuilder by @JackieTien97 in #530 +* Correct the memory calculation of BinaryColumnBuilder by @JackieTien97 in #530 * Fetch max tsblock line number each time from TSFileConfig by @JackieTien97 in #535 * Support set default compression by data type & Bump org.apache.commons:commons-lang3 from 3.15.0 to 3.18.0 by @jt2594838 in #547 * Avoid calculating shallow size of map by @shuwenwei in #566 diff --git a/docs/src/README.md b/docs/src/README.md index 566496792..e4ff291f0 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -38,7 +38,7 @@ highlights: details: TsFile employs advanced compression techniques to minimize storage requirements, resulting in reduced disk space consumption and improved system efficiency. - title: Flexible Schema and Metadata Management - details: TsFile allows for directly write data without pre defining the schema, which is flexible for data aquisition. + details: TsFile allows for directly write data without pre defining the schema, which is flexible for data acquisition. - title: High Query Performance with time range details: TsFile has indexed devices, sensors and time dimensions to accelerate query performance, enabling fast filtering and retrieval of time series data. diff --git a/docs/src/stage/QuickStart.md b/docs/src/stage/QuickStart.md index 549362270..2a2a7a04d 100644 --- a/docs/src/stage/QuickStart.md +++ b/docs/src/stage/QuickStart.md @@ -446,7 +446,7 @@ The ReadOnlyTsFile class has two `query` method to perform a query. > **What is Partial Query ?** > - > In some distributed file systems(e.g. HDFS), a file is split into severval parts which are called "Blocks" and stored in different nodes. Executing a query paralleled in each nodes involved makes better efficiency. Thus Partial Query is needed. Paritial Query only selects the results stored in the part split by ```QueryConstant.PARTITION_START_OFFSET``` and ```QueryConstant.PARTITION_END_OFFSET``` for a TsFile. + > In some distributed file systems(e.g. HDFS), a file is split into several parts which are called "Blocks" and stored in different nodes. Executing a query paralleled in each nodes involved makes better efficiency. Thus Partial Query is needed. Partial Query only selects the results stored in the part split by ```QueryConstant.PARTITION_START_OFFSET``` and ```QueryConstant.PARTITION_END_OFFSET``` for a TsFile. * QueryDataset Interface diff --git a/docs/src/zh/Development/Community-Project-Committers.md b/docs/src/zh/Development/Community-Project-Committers.md index 371bfc997..07e346e04 100644 --- a/docs/src/zh/Development/Community-Project-Committers.md +++ b/docs/src/zh/Development/Community-Project-Committers.md @@ -71,7 +71,7 @@ 我们的社区存在以下四种身份 - PMC -- Committe +- Committer - Contributor - User @@ -79,5 +79,5 @@ - 若想了解四种身份的详细内容,请查看[社区组织架构](../Community/About.md) - 若想成为 PMC ,请查看:[社区评选规章](../Community/About.md#pmc) -- 若想成为 Committe ,请查看:[社区评选规章](../Community/About.md#committe) +- 若想成为 Committer ,请查看:[社区评选规章](../Community/About.md#committer) - 若想成为 Contributor ,请查看:[社区评选规章](../Community/About.md#contributor) \ No newline at end of file diff --git a/java/tsfile/README.md b/java/tsfile/README.md index b9c4828fa..b8c23d784 100644 --- a/java/tsfile/README.md +++ b/java/tsfile/README.md @@ -147,7 +147,7 @@ Read TsFile Example ### Prerequisites -To build TsFile wirh Java, you need to have: +To build TsFile with Java, you need to have: 1. Java >= 1.8 (1.8, 11 to 17 are verified. Please make sure the environment path has been set accordingly). 2. Maven >= 3.6.3 (If you want to compile TsFile from source code). From 9ae88f5c35acf9bb34fc5a8d83a11b15bbbc97d5 Mon Sep 17 00:00:00 2001 From: spricoder Date: Sun, 31 May 2026 11:43:06 +0800 Subject: [PATCH 4/4] fix(build): correct typos in pom.xml coverage-check comments Spelling fixes in JaCoCo limit comments (methodes->methods, swtich->switch). Comment-only change; no build behavior affected. --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 50abe8bc9..ff9bcb1b8 100644 --- a/pom.xml +++ b/pom.xml @@ -948,14 +948,14 @@ BUNDLE    - METHOD COVEREDRATIO 0.00 - + BRANCH COVEREDRATIO