You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/03/15 02:36:31 UTC

[GitHub] [iotdb] tulip628 opened a new issue #2836: sessionPool读取数据是否能直接返回json格式

tulip628 opened a new issue #2836:
URL: https://github.com/apache/iotdb/issues/2836


   读取速度OK,SessionDataSetWrapper解析返回数据为json格式,当数据量大的时候往往解析时间远远大于读取时间,是否能直接返回json格式


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [iotdb] jixuan1989 commented on issue #2836: sessionPool读取数据是否能直接返回json格式

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #2836:
URL: https://github.com/apache/iotdb/issues/2836#issuecomment-799867207


   > You're welcome. I hope the functions I mentioned can be considered or implemented in the next version
   
   增加这个功能是OK的。但是还是得先设计好.. 至少
   1. 找到一个比较通用的结果结构。
   2. 考虑好内存问题(极端做法:结果集过大时截断返回)。


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [iotdb] tulip628 commented on issue #2836: sessionPool读取数据是否能直接返回json格式

Posted by GitBox <gi...@apache.org>.
tulip628 commented on issue #2836:
URL: https://github.com/apache/iotdb/issues/2836#issuecomment-799871529


   > > json为啥不能通用
   > 
   > 假设我给一个json结果,然后与你现在业务中用的json格式不一样的话,肯定需要重新解析json吧?
   > 相同的数据量,json的字符串大小应该大雨SessionDataSet的结构吧?
   > 然后对json字符串进行解析和重组,想起来应该是更耗时的吧?
   > 
   > 另外就是,json没办法分页。现在iotdb客户端一次返回一部分数据,当用户消费完前面的数据时,才继续返回后面的数据。
   > 这样即使返回几个G的数据也没事。但是json这里也不好处理吧?
   
   嗯,对的,如果是重新解析和重组应该是更耗时。我想的是类似常用框架mybatis这样,当我使用sessionPool.executeQueryStatement(sql)时,直接返回了数据库字段+内容的形式。
   
   分页问题和json类型的关系不太明白,您说的客户端部分返回持续消费这个我没用到,刚开始用,可能想得不全,我再仔细看看文档,好好想一下,谢谢您


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [iotdb] tulip628 commented on issue #2836: sessionPool读取数据是否能直接返回json格式

Posted by GitBox <gi...@apache.org>.
tulip628 commented on issue #2836:
URL: https://github.com/apache/iotdb/issues/2836#issuecomment-799858654


   > json的话,很难通用化。不同的上层业务可能需要的json格式不一样。满足了A用户的json格式,B用户又得重新解析。
   > 这个有什么想法么?
   
   json为啥不能通用,k(时间序)+v(值),至于需要额外的json格式就自己去解析,现在返回SessionDataSetWrapper格式,就需要去循环sessionDataSetWrapper.iterator(),连时间序名也要再拿一次。不需要独特的满足某个用户的需求,只要k(时间序)+v(值)不需要额外去循环拼,现在是当读取的数据稍微大点的时候,解析时间远远大于了数据读取的时间


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [iotdb] tulip628 commented on issue #2836: sessionPool读取数据是否能直接返回json格式

Posted by GitBox <gi...@apache.org>.
tulip628 commented on issue #2836:
URL: https://github.com/apache/iotdb/issues/2836#issuecomment-799871996


   > > You're welcome. I hope the functions I mentioned can be considered or implemented in the next version
   > 
   > 增加这个功能是OK的。但是还是得先设计好.. 至少
   > 
   > 1. 找到一个比较通用的结果结构。
   > 2. 考虑好内存问题(极端做法:结果集过大时截断返回)。
   
   和上面说的一样,比较通用的结果结构类似mybatis框架返回的结果您觉得会不会比较通用呢?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [iotdb] jixuan1989 commented on issue #2836: sessionPool读取数据是否能直接返回json格式

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #2836:
URL: https://github.com/apache/iotdb/issues/2836#issuecomment-799295640


   json的话,很难通用化。不同的上层业务可能需要的json格式不一样。满足了A用户的json格式,B用户又得重新解析。
   这个有什么想法么?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [iotdb] github-actions[bot] commented on issue #2836: sessionPool读取数据是否能直接返回json格式

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #2836:
URL: https://github.com/apache/iotdb/issues/2836#issuecomment-799050218


   Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [iotdb] jixuan1989 commented on issue #2836: sessionPool读取数据是否能直接返回json格式

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #2836:
URL: https://github.com/apache/iotdb/issues/2836#issuecomment-799866445


   > json为啥不能通用
   
   假设我给一个json结果,然后与你现在业务中用的json格式不一样的话,肯定需要重新解析json吧?
   相同的数据量,json的字符串大小应该大雨SessionDataSet的结构吧?
   然后对json字符串进行解析和重组,想起来应该是更耗时的吧?
   
   另外就是,json没办法分页。现在iotdb客户端一次返回一部分数据,当用户消费完前面的数据时,才继续返回后面的数据。
   这样即使返回几个G的数据也没事。但是json这里也不好处理吧?
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [iotdb] tulip628 commented on issue #2836: sessionPool读取数据是否能直接返回json格式

Posted by GitBox <gi...@apache.org>.
tulip628 commented on issue #2836:
URL: https://github.com/apache/iotdb/issues/2836#issuecomment-799859870


   > Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!
   
   You're welcome. I hope the functions I mentioned can be considered or implemented in the next version


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [iotdb] jixuan1989 commented on issue #2836: sessionPool读取数据是否能直接返回json格式

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #2836:
URL: https://github.com/apache/iotdb/issues/2836#issuecomment-804134273


   我倒是没用过mybatis结果转json的功能。。 
   不过如果有一个比较通用的做法,或者让用户可配置(然后server端直接按照用户的模板去组装json),我觉得还挺好。


-- 
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:
users@infra.apache.org