Skip to content

Conversation

@eldenmoon
Copy link
Member

@eldenmoon eldenmoon commented Dec 15, 2025

Versions

  • dev
  • 4.x
  • 3.x
  • 2.1

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

@yiguolei yiguolei merged commit 1a7e187 into apache:master Dec 17, 2025
1 check passed
eldenmoon added a commit to apache/doris that referenced this pull request Dec 18, 2025
support export doris native format file
```
// Doris Native format file-level constants.
//
// File layout (byte stream):
//
//   +-------------------------------+---------------------------+---------------------------+ ...
//   | File header                   | Data block #0             | Data block #1             | ...
//   +-------------------------------+---------------------------+---------------------------+ ...
//
//   File header (12 bytes total):
//     - [0..7]   : magic bytes "DORISN1\0"  (DORIS_NATIVE_MAGIC)
//     - [8..11]  : uint32_t format_version (DORIS_NATIVE_FORMAT_VERSION, little-endian)
//
//   Each data block i:
//     - uint64_t block_size   : length in bytes of serialized PBlock (little-endian)
//     - uint8_t[block_size]   : PBlock protobuf payload produced by Block::serialize()
//
// NativeReader:
//   - Detects the optional file header by checking the first 8 bytes against DORIS_NATIVE_MAGIC.
//   - If the header is present, it skips 12 bytes and then starts reading blocks as
//     [uint64_t block_size][PBlock bytes]...
//   - If the header is absent (legacy files), it starts reading blocks from offset 0.
//
// VNativeTransformer:
//   - Writes the header once in open(), then appends each block in write() as
//     [uint64_t block_size][PBlock bytes]...
//
// These constants are shared between writer, reader and tests to keep the on-disk
// format definition in a single place.
// Header layout:
// [magic bytes "DORISN1\0"][uint32_t format_version]
```

docs: apache/doris-website#3190
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