LeiRui opened a new pull request #455: [IOTDB-251]improve TSQueryDataSet 
structure in RPC
URL: https://github.com/apache/incubator-iotdb/pull/455
 
 
   The original definition of TSQueryDataSet leads to the row-at-a-time writing 
process listed as follows:
   ```
   - TSIService.fetchResults_result.write
     - TSFetchResultsResp.write
       - TSQueryDataSet.write
         - TSRowRecord.write
           - TSDataValue.write
             - TBinaryProtocol.writeDouble
               ---------------
               - TIOStreamTransport.write (这里实际是TSocket.write) 阻塞式socker
                 ---------------
                 - BufferedOutputStream.write
   ```
   Therefore, by defining a more compact TSQueryDataSet, the time cost of 
`TSIService.fetchResults_result.write` may likely be decreased.
   
   The original definition of TSQueryDataSet:
   ```
   struct TSFetchResultsResp{
        1: required TSStatus status
        2: required bool hasResultSet
        3: optional TSQueryDataSet queryDataSet
   }
   
   struct TSQueryDataSet{
        1: required list\<TSRowRecord> records
   }
   
   struct TSRowRecord{
     1: required i64 timestamp
     // column values
     2: required list\<TSDataValue> values
   }
   
   struct TSDataValue{
     1: required bool is_empty
     2: optional bool bool_val
     3: optional i32 int_val
     4: optional i64 long_val
     5: optional double float_val
     6: optional double double_val
     7: optional binary binary_val
     8: optional string type
   }
   ```
   The new TSQueryDataSet in this pr:
   ```
   struct TSQueryDataSet{
      1: required binary values
      2: required i32 rowCount
   }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to