浏览代码

revert the omit empty result fix

RockyJin 5 年之前
父节点
当前提交
54c0845294

+ 1 - 1
fvt_scripts/change_stream_rule.jmx

@@ -599,7 +599,7 @@
         <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
         <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
           <boolProp name="LoopController.continue_forever">false</boolProp>
-          <stringProp name="LoopController.loops">1</stringProp>
+          <stringProp name="LoopController.loops">3</stringProp>
         </elementProp>
         <stringProp name="ThreadGroup.num_threads">1</stringProp>
         <stringProp name="ThreadGroup.ramp_time">1</stringProp>

+ 2 - 0
fvt_scripts/change_stream_rule.txt

@@ -1 +1,3 @@
+[{}]
+[{}]
 light

+ 1 - 0
xsql/processors/xsql_processor_test.go

@@ -1111,6 +1111,7 @@ func TestSingleSQLError(t *testing.T) {
 				{{
 					"rengine_field_0": float64(10),
 				}},
+				{{}},
 			},
 			s: "op_filter_0_records_in_total",
 			m: map[string]interface{}{

+ 1 - 1
xstream/nodes/sink_node.go

@@ -102,7 +102,7 @@ func (m *SinkNode) Open(ctx api.StreamContext, result chan<- error) {
 				cacheSaveInterval = t
 			}
 		}
-		omitIfEmpty := true
+		omitIfEmpty := false
 		if c, ok := m.options["omitIfEmpty"]; ok {
 			if t, ok := c.(bool); !ok {
 				logger.Warnf("invalid type for omitIfEmpty property, should be a bool value 'true/false'.", c)