Copilot commented on code in PR #723: URL: https://github.com/apache/tsfile/pull/723#discussion_r2768513984
########## csharp/tests/Apache.TsFile.InteropTests/README.md: ########## @@ -0,0 +1,118 @@ +# Java-C# Interoperability Tests + +This directory contains tests for validating binary compatibility between the Java and C# TSFile implementations. + +## Overview + +The interoperability tests ensure that TSFile files written by Java can be read by C#, and vice versa. This is critical for cross-language data exchange in production environments. + +## Structure + +### Java Test Generator (`/java/interop-tests/`) + +A Maven project that generates TsFile test files with various combinations of: +- **Data types**: INT32, INT64, FLOAT, DOUBLE, BOOLEAN, TEXT +- **Encodings**: PLAIN, RLE, TS_2DIFF, GORILLA, GORILLA_V1, ZIGZAG, DICTIONARY +- **Compressions**: UNCOMPRESSED, GZIP, LZ4, SNAPPY, ZSTD +- **Patterns**: sequential, repeated, alternating + +The generator creates test files in `/tmp/interop-test-files/` along with a `test-metadata.json` file describing each file's configuration and expected values. + +### C# Test Validator (`/csharp/tests/Apache.TsFile.InteropTests/`) + +An xUnit test project that: +1. Reads the files generated by Java +2. Validates the data matches expected values +3. Reports any incompatibilities + +## Running the Tests + +### Step 1: Generate Test Files (Java) + +```bash +cd java/interop-tests +mvn clean install +mvn exec:java +``` + +This creates 360 test files (6 data types × 5-7 encodings × 5 compressions × 3 patterns) in `/tmp/interop-test-files/`. + +### Step 2: Run C# Tests + +```bash +cd csharp/tests/Apache.TsFile.InteropTests +dotnet test --logger "console;verbosity=detailed" +``` + +## Current Status + +### Version Compatibility Issue + +**Finding**: Java TSFile library is generating version 4 files, but C# currently supports version 3. Review Comment: This documentation appears outdated. The PR description states 'Set V4 as default file format' and 'Support both tree model and table model', suggesting C# now supports V4. Update to reflect current V4 support status. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
