gabrywu commented on a change in pull request #3728:
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/3728#discussion_r487745578
##########
File path: sql/upgrade/1.3.3_schema/mysql/dolphinscheduler_ddl.sql
##########
@@ -112,4 +112,42 @@ CALL uc_dolphin_T_t_ds_resources_un();
DROP PROCEDURE IF EXISTS uc_dolphin_T_t_ds_resources_un;
+drop PROCEDURE if EXISTS uc_dolphin_T_t_ds_process_definition_A_is_parallel;
+delimiter d//
+CREATE PROCEDURE uc_dolphin_T_t_ds_process_definition_A_is_parallel()
+ BEGIN
+ IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+ WHERE TABLE_NAME='t_ds_process_definition'
+ AND TABLE_SCHEMA=(SELECT DATABASE())
+ AND COLUMN_NAME ='is_parallel')
+ THEN
+ alter table t_ds_process_definition add is_parallel tinyint default
'1' comment '0:serial,1:parallel';
Review comment:
why we should use the procedure to add one column?
##########
File path:
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/CommandMapper.xml
##########
@@ -19,18 +19,30 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="org.apache.dolphinscheduler.dao.mapper.CommandMapper">
<select id="getOneToRun"
resultType="org.apache.dolphinscheduler.dao.entity.Command">
- select command.* from t_ds_command command
- join t_ds_process_definition definition on
command.process_definition_id = definition.id
- where definition.release_state = 1 AND definition.flag = 1
- order by command.update_time asc
- limit 1
+ select * from
Review comment:
so complex the SQL is, could you simply it?
----------------------------------------------------------------
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:
[email protected]