dolphinscheduler-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-dolphinscheduler] lianjie1229 opened a new issue #1379: [BUG] bug title
Date Tue, 03 Dec 2019 04:01:09 GMT
lianjie1229 opened a new issue #1379: [BUG] bug title 
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1379
 
 
   **Describe the bug**
   SQL task with where condition, i define a parameter named v_createdate,it is in type,and
date data type with  $[yyyy-MM-dd],SQL statement as follow:
   insert into t_wms_stock_2 select * from t_wms_stock where create_time=${v_createdate};
   
   it failed with error: "ERROR: operator does not exist: date = character varying
     Hint: No operator matches the given name and argument type(s). You might need to add
explicit type casts."
   
   **To Reproduce**
   Steps to reproduce the behavior, for example:
   1. Go to 'Project-Process definition' and click ‘create process’
   2. Click on 'SQL',drag it to the DAG panel,define as follow:
     datasource:postgressql,select Greenplum datasource which i defnie
     SQL type:non query
     SQL Statement: insert into t_wms_stock_2 select * from t_wms_stock where create_time=${v_createdate};
     Custom Parameters: v_createdate  int  date $[yyyy-MM-dd]
     save it
   3. online and start it
   4. error message:
      [INFO] 2019-12-03 11:02:59.919 cn.escheduler.server.worker.log.TaskLogger:[178] - [taskAppId=TASK_2_49_67]
prepare statement replace sql:insert into t_wms_stock_2
   select * from t_wms_stock where create_time='2019-12-03'
   [ERROR] 2019-12-03 11:03:00.007 cn.escheduler.server.worker.log.TaskLogger:[313] - [taskAppId=TASK_2_49_67]
ERROR: operator does not exist: date = character varying
     Hint: No operator matches the given name and argument type(s). You might need to add
explicit type casts.
   
   when SQL Statement defines as follow,it works fine:
   1、insert into t_wms_stock_2
   select * from t_wms_stock where create_time='2019-12-03';
   2、insert into t_wms_stock_2
   select * from t_wms_stock where create_time=to_date(${v_createdate},'yyyy-mm-dd')
   
   **Expected behavior**
   SQL Statement executes sucessfully
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   
   **Which version of Dolphin Scheduler:**
    -[1.1.0-preview]
   
   **Additional context**
   OS: CentOS 7.3
   Greenplum: Greenplum-db-6.0.1-rhel7
   escheduler: escheduler-1.1.0 
   
   **Requirement or improvement
   define parameter with date type, no need to explicit type casts like to_date
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message