Skip to content

Add ResultSet Constrction Doc#1114

Merged
qiaojialin merged 9 commits intoapache:masterfrom
Alima777:columnHeaderDoc
May 6, 2020
Merged

Add ResultSet Constrction Doc#1114
qiaojialin merged 9 commits intoapache:masterfrom
Alima777:columnHeaderDoc

Conversation

@Alima777
Copy link
Copy Markdown
Contributor

@Alima777 Alima777 commented Apr 28, 2020

  1. Optimize the code structure in deduplicate() method: (i) move up the logic of LastQuery which doesn't need to sort path by device. (ii) combine the logic of AggregationPlan and RawdataQueryPlan.
  2. Change the ambiguous method name: addColumn() -> addPathToIndex(); checker -> measurementDataTypeMap
  3. Add ResultSet Constrcution Doc

@Alima777 Alima777 changed the title Add Query Header Constrction Doc Add ResultSet Constrction Doc Apr 30, 2020
Copy link
Copy Markdown
Contributor

@JackieTien97 JackieTien97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


接下来计算 `columnOrdinalMap` ,首先判断是否需要打印时间戳,如果需要则将时间戳记录为第一列。

然后遍历表头中的列名列表,并检查 `columnNameIndex` 是否被初始化,该字段来源于去重时计算的 `pathToIndex`,记录了每个时间序列路径在查询中的位置。如果被初始化,则其中的位置 + 2 即为在结果集中的位置;未被初始化则按顺序记录位置即可。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If columnNameIndex is not initialized, the logic of generating columnOrdinalMap is same as deduplicate column in the server.

@qiaojialin qiaojialin merged commit cbd9c99 into apache:master May 6, 2020
@Alima777 Alima777 deleted the columnHeaderDoc branch October 27, 2020 01:59
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.

3 participants