You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
Version
Doris-2.1.3
What's Wrong?
有一段SQL语句如下:
-- 投资项目评审批复详情
ALTER TABLE dwd.dwd_inv_proj_resc_dtl_d DROP PARTITION IF EXISTS p20240928;
ALTER TABLE dwd.dwd_inv_proj_resc_dtl_d ADD PARTITION IF NOT EXISTS p20240928 VALUES IN ('2024-09-28');
INSERT INTO dwd.dwd_inv_proj_resc_dtl_d PARTITION (p20240928)
SELECT NULL AS proj_md_code
,t1.inv_pro_id AS proj_code
,t1.reply_category AS resc_type
,round(t1.jaf, 2) AS const_install_fee
,round(t1.zcf, 2) AS relocation_fee
,round(t1.glf, 2) AS manage_fee
,round(t1.jlf, 2) AS supervision_fee
,round(t1.kcsjf, 2) AS survey_design_fee
,round(t1.oth, 2) AS other
,round((t1.jaf + t1.zcf + t1.glf + t1.jlf + t1.kcsjf + t1.oth), 2) AS resc_tot_amt
,t1.reply_date AS resc_date
,t1.pg_pf AS eva_resc
,t1.bz AS remark
,current_timestamp() AS etl_time
,'' AS source_system
,'ods_cfhec_pro_inv_basic_pfinfo_f_d' AS source_table
,'2024-09-28' AS etl_part
FROM ods.ods_cfhec_pro_inv_basic_pfinfo_f_d PARTITION (p20240928)
;
执行方式1:
整体选中执行(上面的SQL语句), 当FROM 的表名, 没有别名, 居然可以执行通过, 如
ALTER TABLE DROP PARTITION
ALTER TABLE ADD PARTITION
INSERT INTO SELECT FROM -- 注: 当FROM 的表名, 没有别名, 居然可以执行通过
执行方式2:
当单独执行 INSERT INTO SELECT FROM 时, 才能正常检测出语法错误
INSERT INTO dwd.dwd_inv_proj_resc_dtl_d PARTITION (p20240928)
SELECT NULL AS proj_md_code
,t1.inv_pro_id AS proj_code
,t1.reply_category AS resc_type
,round(t1.jaf, 2) AS const_install_fee
,round(t1.zcf, 2) AS relocation_fee
,round(t1.glf, 2) AS manage_fee
,round(t1.jlf, 2) AS supervision_fee
,round(t1.kcsjf, 2) AS survey_design_fee
,round(t1.oth, 2) AS other
,round((t1.jaf + t1.zcf + t1.glf + t1.jlf + t1.kcsjf + t1.oth), 2) AS resc_tot_amt
,t1.reply_date AS resc_date
,t1.pg_pf AS eva_resc
,t1.bz AS remark
,current_timestamp() AS etl_time
,'' AS source_system
,'ods_cfhec_pro_inv_basic_pfinfo_f_d' AS source_table
,'2024-09-28' AS etl_part
FROM ods.ods_cfhec_pro_inv_basic_pfinfo_f_d PARTITION (p20240928)
;
Search before asking
Version
Doris-2.1.3
What's Wrong?
有一段SQL语句如下:
-- 投资项目评审批复详情
ALTER TABLE dwd.dwd_inv_proj_resc_dtl_d DROP PARTITION IF EXISTS p20240928;
ALTER TABLE dwd.dwd_inv_proj_resc_dtl_d ADD PARTITION IF NOT EXISTS p20240928 VALUES IN ('2024-09-28');
INSERT INTO dwd.dwd_inv_proj_resc_dtl_d PARTITION (p20240928)
SELECT NULL AS proj_md_code
,t1.inv_pro_id AS proj_code
,t1.reply_category AS resc_type
,round(t1.jaf, 2) AS const_install_fee
,round(t1.zcf, 2) AS relocation_fee
,round(t1.glf, 2) AS manage_fee
,round(t1.jlf, 2) AS supervision_fee
,round(t1.kcsjf, 2) AS survey_design_fee
,round(t1.oth, 2) AS other
,round((t1.jaf + t1.zcf + t1.glf + t1.jlf + t1.kcsjf + t1.oth), 2) AS resc_tot_amt
,t1.reply_date AS resc_date
,t1.pg_pf AS eva_resc
,t1.bz AS remark
,current_timestamp() AS etl_time
,'' AS source_system
,'ods_cfhec_pro_inv_basic_pfinfo_f_d' AS source_table
,'2024-09-28' AS etl_part
FROM ods.ods_cfhec_pro_inv_basic_pfinfo_f_d PARTITION (p20240928)
;
执行方式1:
整体选中执行(上面的SQL语句), 当FROM 的表名, 没有别名, 居然可以执行通过, 如
执行方式2:
当单独执行 INSERT INTO SELECT FROM 时, 才能正常检测出语法错误
INSERT INTO dwd.dwd_inv_proj_resc_dtl_d PARTITION (p20240928)
SELECT NULL AS proj_md_code
,t1.inv_pro_id AS proj_code
,t1.reply_category AS resc_type
,round(t1.jaf, 2) AS const_install_fee
,round(t1.zcf, 2) AS relocation_fee
,round(t1.glf, 2) AS manage_fee
,round(t1.jlf, 2) AS supervision_fee
,round(t1.kcsjf, 2) AS survey_design_fee
,round(t1.oth, 2) AS other
,round((t1.jaf + t1.zcf + t1.glf + t1.jlf + t1.kcsjf + t1.oth), 2) AS resc_tot_amt
,t1.reply_date AS resc_date
,t1.pg_pf AS eva_resc
,t1.bz AS remark
,current_timestamp() AS etl_time
,'' AS source_system
,'ods_cfhec_pro_inv_basic_pfinfo_f_d' AS source_table
,'2024-09-28' AS etl_part
FROM ods.ods_cfhec_pro_inv_basic_pfinfo_f_d PARTITION (p20240928)
;
What You Expected?
严重bug
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: