changxue created IOTDB-4944:
-------------------------------

             Summary: [UDF]the results of calling UDF alone and calling with 
wildcard are inconsistent, when all is null
                 Key: IOTDB-4944
                 URL: https://issues.apache.org/jira/browse/IOTDB-4944
             Project: Apache IoTDB
          Issue Type: Bug
    Affects Versions: 0.14.0-SNAPSHOT
            Reporter: changxue
            Assignee: Yuan Tian


[UDF]the results of calling UDF alone and calling with wildcard are 
inconsistent, when all is null

reproduction:
{code:java}
CREATE FUNCTION COUNT_SEC as 
"com.timecho.udf.normal.TestStateWindowAccessStrategy";

CREATE TIMESERIES root.udf.d1.s1 WITH DATATYPE=boolean, ENCODING=PLAIN;
CREATE TIMESERIES root.udf.d1.s2 WITH DATATYPE=boolean, ENCODING=PLAIN;
CREATE TIMESERIES root.udf.d1.ss1 WITH DATATYPE=boolean, ENCODING=PLAIN;

INSERT INTO root.udf.d1 (time, s1, s2) VALUES (1, 1, 1),(2, 1, 0),(3, 0, 1),(4, 
0, 1),(5, 0, 1),(8, 1, 1),(7, 1, 1),(6, null, 1),(12, 1, 1),(20, 1, 1);

-- all null
SELECT count_sec(ss1) FROM root.udf.d1;
select count_sec(*) from root.udf.d1;{code}
下面两个结果不一致。

问题:

为什么同样是ss1列,都是null值,cout_sec(ss1)是空的,而 count_sec(*) 的ss1列第一个值是10?

 

result of count_sec(ss1) :
{code:java}
+----+
|Time|
+----+
+----+
Empty set.
{code}
result of count_sec(\*):
{code:java}
Time(TIME)      |count_sec(root.udf.d1.ss1)(TEXT)      
|count_sec(root.udf.d1.s1)(TEXT)      |count_sec(root.udf.d1.s2)(TEXT)      |
--------------------------------------------------------------------------------------------------------------------------------
1               |10                                    |2                       
             |1                                    |
--------------------------------------------------------------------------------------------------------------------------------
2               |null                                  |null                    
             |1                                    |
--------------------------------------------------------------------------------------------------------------------------------
3               |null                                  |4                       
             |8                                    |
--------------------------------------------------------------------------------------------------------------------------------
7               |null                                  |4                       
             |null                                 |
总数目:4{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to