Doris 3.0.0 创建物化视图报错

Viewed 69

如题,使用Doris 3.0.0 版本创建普通视图没问题,创建物化实体报错如下

SQL语句 如下:
CREATE MATERIALIZED VIEW hexin_dws.dws_order_plat_order
as
select 'AE' as plat,
id,
sys_order_id,
plat_order_id,
sales_channel,
store_member,
store_id,
customer_id,
payment_type,
is_low_profit,
is_sales_low_profit,
is_finish_low_profit,
is_cancel,
is_out_of_stock,
is_has_issue,
is_urgent,
is_archive,
is_resend,
is_replacement,
is_reship,
is_negative_profit,
is_auto,
is_apart,
merge_status,
send_status,
product_count_type,
create_package_status,
'' as order_type,
from_unixtime(plat_create_stamp,'%Y-%m-%d %H:%i:%s') as order_create_time,
from_unixtime(pay_stamp,'%Y-%m-%d %H:%i:%s') as order_pay_time,
plat_update_time as order_update_time,
plat_order_status as plat_status,
is_scalp,
is_has_refund,
is_send_auto,
fulfillment_type,
estimate_freight_logistics_id,
shipment_id,
shipment_status
from dwd.dwd_order_1
union
select 'ALI' as plat,
id,
sys_order_id,
plat_order_id,
'' as sales_channel,
store_member,
store_id,
customer_id,
'' as payment_type,
is_low_profit,
is_sales_low_profit,
is_finish_low_profit,
is_cancel,
is_out_of_stock,
is_has_issue,
is_urgent,
is_archive,
is_resend,
is_replacement,
is_reship,
is_negative_profit,
is_auto,
is_apart,
merge_status,
send_status,
product_count_type,
create_package_status,
'' as order_type,
from_unixtime(plat_create_stamp,'%Y-%m-%d %H:%i:%s') as order_create_time,
from_unixtime(pay_stamp,'%Y-%m-%d %H:%i:%s') as order_pay_time,
plat_update_time as order_update_time,
plat_order_status as plat_status,
is_scalp,
is_has_refund,
is_send_auto,
fulfillment_type,
estimate_freight_logistics_id,
shipment_id,
shipment_status
from dwd.dwd_order_2
union
select 'AMAZON' as plat,
id,
sys_order_id,
plat_order_id,
sales_channel,
store_member,
store_id,
customer_id,
payment_type,
is_low_profit,
is_sales_low_profit,
is_finish_low_profit,
is_cancel,
is_out_of_stock,
'' as is_has_issue,
is_urgent,
is_archive,
is_resend,
is_replacement,
is_reship,
is_negative_profit,
is_auto,
is_apart,
merge_status,
send_status,
product_count_type,
create_package_status,
order_type,
from_unixtime(plat_create_stamp,'%Y-%m-%d %H:%i:%s') as order_create_time,
from_unixtime(pay_stamp,'%Y-%m-%d %H:%i:%s') as order_pay_time,
plat_update_time as order_update_time,
plat_order_status as plat_status,
is_scalp,
is_has_refund,
is_send_auto,
fulfillment_type,
estimate_freight_logistics_id,
shipment_id,
shipment_status
from dwd.dwd_order_3
union
select 'SHOPIFY' as plat,
id,
sys_order_id,
plat_order_id,
'' as sales_channel,
store_member,
store_id,
customer_id,
payment_type,
is_low_profit,
is_sales_low_profit,
is_finish_low_profit,
is_cancel,
is_out_of_stock,
is_has_issue,
is_urgent,
is_archive,
is_resend,
is_replacement,
is_reship,
is_negative_profit,
is_auto,
is_apart,
merge_status,
send_status,
product_count_type,
create_package_status,
'' as order_type,
from_unixtime(plat_create_stamp,'%Y-%m-%d %H:%i:%s') as order_create_time,
from_unixtime(pay_stamp,'%Y-%m-%d %H:%i:%s') as order_pay_time,
plat_update_time as order_update_time,
fulfillment_status as plat_status,
is_scalp,
is_has_refund,
is_send_auto,
fulfillment_type,
estimate_freight_logistics_id,
shipment_id,
shipment_status
from dwd.dwd_order_4
union
select 'TUME' as plat,
id,
sys_order_id,
plat_order_id,
'' as sales_channel,
store_member,
store_id,
customer_id,
payment_type,
is_low_profit,
is_sales_low_profit,
is_finish_low_profit,
is_cancel,
is_out_of_stock,
is_has_issue,
is_urgent,
is_archive,
is_resend,
is_replacement,
'' as is_reship,
is_negative_profit,
is_auto,
is_apart,
merge_status,
send_status,
product_count_type,
create_package_status,
'' as order_type,
from_unixtime(plat_create_stamp,'%Y-%m-%d %H:%i:%s') as order_create_time,
from_unixtime(pay_stamp,'%Y-%m-%d %H:%i:%s') as order_pay_time,
plat_update_time as order_update_time,
fulfillment_status as plat_status,
is_scalp,
is_has_refund,
is_send_auto,
fulfillment_type,
estimate_freight_logistics_id,
shipment_id,
shipment_status
from dwd.dwd_order_5
union
select 'HXCART' as plat,
id,
sys_order_id,
plat_order_id,
'' as sales_channel,
store_member,
store_id,
customer_id,
payment_type,
is_low_profit,
is_sales_low_profit,
is_finish_low_profit,
is_cancel,
is_out_of_stock,
is_has_issue,
is_urgent,
is_archive,
is_resend,
is_replacement,
is_reship,
is_negative_profit,
is_auto,
is_apart,
merge_status,
send_status,
product_count_type,
create_package_status,
'' as order_type,
from_unixtime(plat_create_stamp,'%Y-%m-%d %H:%i:%s') as order_create_time,
from_unixtime(pay_stamp,'%Y-%m-%d %H:%i:%s') as order_pay_time,
plat_update_time as order_update_time,
fulfillment_status as plat_status,
is_scalp,
is_has_refund,
is_send_auto,
fulfillment_type,
estimate_freight_logistics_id,
shipment_id,
shipment_status
from dwd.dwd_order_6
union
select 'TIKTOK' as plat,
id,
sys_order_id,
plat_order_id,
'' as sales_channel,
store_member,
store_id,
customer_id,
payment_type,
is_low_profit,
is_sales_low_profit,
is_finish_low_profit,
is_cancel,
is_out_of_stock,
is_has_issue,
is_urgent,
is_archive,
is_resend,
is_replacement,
is_reship,
is_negative_profit,
is_auto,
is_apart,
merge_status,
send_status,
product_count_type,
create_package_status,
'' as order_type,
from_unixtime(plat_create_stamp,'%Y-%m-%d %H:%i:%s') as order_create_time,
from_unixtime(pay_stamp,'%Y-%m-%d %H:%i:%s') as order_pay_time,
plat_update_time as order_update_time,
fulfillment_status as plat_status,
is_scalp,
is_has_refund,
is_send_auto,
fulfillment_type,
estimate_freight_logistics_id,
shipment_id,
shipment_status
from hexin_dwd.dwd_order_7
union
select 'UD' as plat,
id,
sys_order_id,
plat_order_id,
sales_channel,
store_member,
store_id,
'' as customer_id,
payment_type,
is_low_profit,
is_sales_low_profit,
is_finish_low_profit,
is_cancel,
is_out_of_stock,
is_has_issue,
is_urgent,
is_archive,
is_resend,
is_replacement,
is_reship,
is_negative_profit,
is_auto,
is_apart,
merge_status,
send_status,
product_count_type,
create_package_status,
order_type,
from_unixtime(plat_create_stamp,'%Y-%m-%d %H:%i:%s') as order_create_time,
from_unixtime(pay_stamp,'%Y-%m-%d %H:%i:%s') as order_pay_time,
plat_update_time as order_update_time,
plat_order_status as plat_status,
is_scalp,
is_has_refund,
is_send_auto,
fulfillment_type,
estimate_freight_logistics_id,
shipment_id,
shipment_status
from dwd.dwd_order_8
union
select 'QVC' as plat,
id,
sys_order_id,
plat_order_id,
'' AS sales_channel,
store_member,
store_id,
customer_id,
payment_type,
is_low_profit,
is_sales_low_profit,
is_finish_low_profit,
is_cancel,
is_out_of_stock,
is_has_issue,
is_urgent,
is_archive,
is_resend,
is_replacement,
is_reship,
is_negative_profit,
is_auto,
is_apart,
merge_status,
send_status,
product_count_type,
create_package_status,
'' as order_type,
from_unixtime(plat_create_stamp,'%Y-%m-%d %H:%i:%s') as order_create_time,
from_unixtime(pay_stamp,'%Y-%m-%d %H:%i:%s') as order_pay_time,
plat_update_time as order_update_time,
fulfillment_status as plat_status,
is_scalp,
is_has_refund,
is_send_auto,
fulfillment_type,
estimate_freight_logistics_id,
shipment_id,
shipment_status
from dwd.dwd_order_9

1 Answers

doris不支持logicunion,多表union就会报错