shuwenwei opened a new pull request, #18146: URL: https://github.com/apache/iotdb/pull/18146
## Description This PR adds a new optional parameter `DEVICE_METADATA_INFO_SWAP_THRESHOLD` to the `read_tsfile` table function, allowing users to control the flush run file size upper limit for external TsFile query device metadata swapping. ## Changes - Move `DEVICE_TASK_BUCKET_TARGET_SIZE_IN_BYTES` constant from `ExternalTsFileQueryResource.DeviceTaskPartition` to `ReadTsFileTableFunction` - Register `DEVICE_METADATA_INFO_SWAP_THRESHOLD` as an optional `INT64` parameter with default value 8 MiB - Thread the parameter through `ReadTsFileTableFunctionHandle` → `RelationPlanner` → `MPPQueryContext` → `ExternalTsFileQueryResource` - Replace the hard-coded constant in `DeviceTaskPartition.shouldFlush()` with the instance field - Add `ARGUMENT_SHOULD_BE_A_NUMBER` i18n message (en + zh) ## Usage ```sql -- Use default 8 MiB threshold SELECT * FROM read_tsfile(PATHS => '/path/to/file.tsfile') -- Use custom 4 MiB threshold SELECT * FROM read_tsfile(PATHS => '/path/to/file.tsfile', DEVICE_METADATA_INFO_SWAP_THRESHOLD => 4194304) ``` -- 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]
