changxue created IOTDB-4934:
-------------------------------

             Summary: [UDF]attribute is null without quote, return 500 
                 Key: IOTDB-4934
                 URL: https://issues.apache.org/jira/browse/IOTDB-4934
             Project: Apache IoTDB
          Issue Type: Bug
    Affects Versions: 0.14.0-SNAPSHOT
            Reporter: changxue
            Assignee: Yuan Tian
         Attachments: image-2022-11-15-10-38-05-254.png

[UDF]attribute is null without quote, return 500 

不应该报错500

reproduction:
{code}
create function count_sec as 
"com.timecho.udf.normal.TestSessionTimeWindowAccessStrategy";

CREATE DATABASE root.udf;
CREATE TIMESERIES root.udf.d1.s1 WITH DATATYPE=text, ENCODING=PLAIN;
CREATE TIMESERIES root.udf.d1.s2 WITH DATATYPE=text, ENCODING=PLAIN;

insert into root.udf.d1 (time, s1, s2) values (1, 'udf', 'trigger'),(2, 'some' 
, 'old'),(3, null, 'trigger'),(9, 'udf', 'new'),(5, 'woman', 'udf'),(12, 
'trigger', null),(14, 'udf', 14),(18, 'udf', 16),(21, 'trigger', 18),(24, 
'udf', 20);

select count_sec(s1, 'max_interval'=1, 'standard'=null) from root.udf.d1;
select count_sec(s1, 'max_interval'=1, 'standard'=NULL) from root.udf.d1;
{code}

error message:
{code}
IoTDB> select count_sec(s1, 'max_interval'=4, 'standard'=null) from root.udf.d1;
Msg: 500: [INTERNAL_SERVER_ERROR(500)] Exception occurred: "select 
count_sec(s1, 'max_interval'=4, 'standard'=null) from root.udf.d1". 
executeStatement failed. 
org.apache.iotdb.db.mpp.plan.expression.leaf.NullOperand cannot be cast to 
org.apache.iotdb.db.mpp.plan.expression.leaf.ConstantOperand{code}
 !image-2022-11-15-10-38-05-254.png|thumbnail! 



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

Reply via email to