dolphindb 3.0.28 → 3.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -3081,13 +3081,22 @@ export class DDB {
3081
3081
  first = false;
3082
3082
  }
3083
3083
  else {
3084
- const _data = obj.data();
3085
- const rows = _data[0].length;
3086
- const { columns } = schema;
3087
- data = {
3088
- ...schema,
3089
- data: seq(rows, i => zip_object(columns, seq(columns.length, j => _data[j][i])))
3090
- };
3084
+ let rows;
3085
+ // 用了流数据过滤功能后,必然发 table
3086
+ if (obj.form === DdbForm.table) {
3087
+ data = obj.data();
3088
+ data.name ||= schema.name;
3089
+ rows = data.data.length;
3090
+ }
3091
+ else {
3092
+ const _data = obj.data();
3093
+ const { columns } = schema;
3094
+ rows = _data[0]?.length || 0;
3095
+ data = {
3096
+ ...schema,
3097
+ data: seq(rows, i => zip_object(columns, seq(columns.length, j => _data[j][i])))
3098
+ };
3099
+ }
3091
3100
  win.rows += rows;
3092
3101
  win.segments.push(data);
3093
3102
  win.objs.push(obj);