dolphindb 2.0.1030 → 2.0.1031

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
@@ -2696,15 +2696,15 @@ export class DDB {
2696
2696
  segments: [],
2697
2697
  };
2698
2698
  let schema;
2699
- let first_message = true;
2700
2699
  const { value: colnames } = await this.call('publishTable', [
2701
2700
  'localhost',
2702
2701
  new DdbInt(0),
2703
2702
  this.streaming.table,
2704
2703
  (this.streaming.action ||= `api_js_${new Date().getTime()}`),
2705
- // new DdbInt(-1), // offset
2706
- // filter
2707
- // allow exists
2704
+ ...this.streaming?.filters?.column ? [
2705
+ new DdbVoid(),
2706
+ this.streaming.filters.column // filter
2707
+ ] : []
2708
2708
  ], {
2709
2709
  skip_connection_check: true,
2710
2710
  // 先准备好收到 websocket message 的 callback
@@ -2714,12 +2714,10 @@ export class DDB {
2714
2714
  const i_topic_end = buffer.indexOf(0, 17);
2715
2715
  // 首个 message 一定是 table schema, 后续消息是 column 片段组成的 any vector
2716
2716
  const data = DdbObj.parse(buffer.subarray(i_topic_end + 1), this.le);
2717
- if (first_message) {
2717
+ if (!schema) {
2718
2718
  schema = data;
2719
- first_message = false;
2720
2719
  return;
2721
2720
  }
2722
- assert(schema, t('流数据订阅后一定先返回 schema'));
2723
2721
  const { rows } = data.value[0];
2724
2722
  win.rows += rows;
2725
2723
  win.segments.push(data);