...
- 需要获取全量的查询数据才能进一步处理的情境(需要向用户提供随机、顺序访问序列的能力)
- 可以获取一定量数据后按批处理的情境(需要向用户提供随机、顺序访问序列的能力)
- 可以逐数据点(行)处理的情境 (需要向用户提供顺序访问序列的能力)
(English)
Several query UDF usage scenarios
- Situations that need to obtain the full amount of query data for further processing (need to provide users with the ability to access sequences randomly and sequentially)
- A situation where a certain amount of data can be obtained and processed in batches (the user needs to be provided with the ability to access the sequence randomly and sequentially)
- Scenarios that can be processed by data points (rows) (need to provide users with the ability to access sequences sequentially)
一个UDF查询的情景可能包括单序列查询、多序列查询。
...
- 目标:根据index可以快速定位元组的offset,可同时面向定长和不定长数据进行序列化
- 定长数据:
- FLOAT / DOUBLE / INTEGER / LONG / BOOLEAN
- 格式: time value time value time value ...
- 不定长数据:
- 格式:time offset time offset time offset...
- 由于单个文件可存储的time value对是固定的,由capacity()决定。因此第capacity()个time offset位置后可存储不定长数据。
- 设置一个阈值s,在按批次从磁盘反序列化时,若某个(行)数据长度低于s,则在该批次反序列化时和其他数据一起反序列化;反之,在访问时才反序列化。
- STRING存储格式:length + data
- RowRecord存储格式: length + (BOOLEAN data) + (BOOLEAN data) + ... BOOLEAN记录是否为null
- 管理文件
- 可能可以使用到TSFileFactory?
- 生成文件路径
- 例如:data/query/{query-id}/{path-name / merged-series-name}/{SerializableTVList-index}.temp。index指的是SerializableTVList在ElasticSerializableTVList中的index。
- 可能可以使用到TSFileFactory?
- 生成文件路径
- 删除临时文件
- ...
核心数据结构
TODO:确定BatchData和TVList关系。
...