doris不同类型转换会发生隐式转换成double后值变了,关联结果也不对。

Viewed 63

image.png
image.png
select
sys_corporation1.org_id aa ,
vac1.dw_org_id as bb,
if (cast(sys_corporation1.org_id as double)= cast(vac1.dw_org_id as double) ,
'yes',
'no')
from
ods_iho_opd_vac1_rt vac1
join ods_iho_opd_sys_corporation_rt sys_corporation1 on
sys_corporation1.org_id = vac1.dw_org_id

测试数据和表如下
-- test.ods_iho_opd_vac1_rt definition

CREATE TABLE ods_iho_opd_vac1_rt (
created_time datetime(6) NULL COMMENT '创建时间',
vac01 bigint NULL COMMENT '就诊ID, 挂号ID, 登记ID, CASEU, REGID, CASEID',
vac02 text REPLACE NULL COMMENT '就诊号, 登记号, CASNO, REGNO',
vaa01 bigint REPLACE NULL COMMENT '病人ID, PatientID #vaa1.vaa01#',
vaa10 int REPLACE NULL COMMENT '年龄',
aau01 text REPLACE NULL COMMENT '年龄单位 #aau1.aau01#',
vac06 smallint REPLACE NULL COMMENT '复诊 0-初诊 1-复诊',
bao02 text REPLACE NULL COMMENT '号类, 挂号类型.名称 #bao1.bao02#',
vac09 int REPLACE NULL COMMENT '号序为 0=挂号、-1=收费处简易挂号、-2=医生站简易挂号、-3=体检',
vac10 smallint REPLACE NULL COMMENT '急诊 0-否 1-是',
bas02a text REPLACE NULL COMMENT '诊室名称 #bas1.bas02#',
bdp02 text REPLACE NULL COMMENT '病人类别 #bdp1.bdp02#',
abc02 text REPLACE NULL COMMENT '病人费别 #abc1.abc02#',
abt02 text REPLACE NULL COMMENT '就诊方式 #abt1.abt02#',
ack01 text REPLACE NULL COMMENT '婚姻状况 #ack1.ack01#',
vac16 text REPLACE NULL COMMENT '职业, Occupation #acm1.acm02#',
vac17 text REPLACE NULL COMMENT '省市',
vac18 text REPLACE NULL COMMENT '县市, 城市, 县区市',
vac19 text REPLACE NULL COMMENT '地址, 常住地址, 街道, 乡镇村, resident address',
vac20 text REPLACE NULL COMMENT '手机号码',
vac21 text REPLACE NULL COMMENT '联系人姓名, contact person name',
aaz02 text REPLACE NULL COMMENT '与病人关系, RelationShip',
vac23 text REPLACE NULL COMMENT '联系人地址, Contact person address',
vac24 text REPLACE NULL COMMENT '联系人电话, contact person telephone',
baq01 int REPLACE NULL COMMENT '合约单位ID #baq1.baq01#',
vac26 text REPLACE NULL COMMENT '单位编码, CoCode',
vac27 text REPLACE NULL COMMENT '工作单位, CoName',
vac28 text REPLACE NULL COMMENT '单位电话, CoTelephone',
vac29 text REPLACE NULL COMMENT '单位地址, CoAddress',
vac30 text REPLACE NULL COMMENT '担保人, Guarantor',
vac31 int REPLACE NULL COMMENT '标志, 1=含病历本,2=就诊卡, 默认写入0, 位运算',
bck01a int REPLACE NULL COMMENT '执行科室ID #bck1.bck01#',
bce03a text REPLACE NULL COMMENT '执行医师,若执行状态为已接诊、已完诊,执行医生为接诊医生 #bce1.bce03#',
vac34 smallint REPLACE NULL COMMENT '医生站执行状态(vac34=1有效挂号时才生效) -1:取消执行;0:候诊;1:接诊;2:完诊;9:放弃就诊;10:未到诊;11:待分诊;12:待审核(多科会诊的审核)',
vac35 datetime(6) REPLACE NULL COMMENT '执行时间',
vac36 datetime(6) REPLACE NULL COMMENT '挂号时间,若当天挂号(取号),取的是当天挂号的操作时间;若为预约(非当天)产生的挂号记录,取的是预约号源的开始时间',
vac37 datetime(6) REPLACE NULL COMMENT '交易时间, 发生时间, 邮戳时间',
bce02 text REPLACE NULL COMMENT '操作员号 #bce1.bce02#',
bce03b text REPLACE NULL COMMENT '操作员名称 #bce1.bce03#',
vac40 smallint REPLACE NULL COMMENT '传染病上传, infectious disease uploaded tag',
vac41 datetime(6) REPLACE NULL COMMENT '发病时间, attack time, onset time',
vac42 datetime(6) REPLACE NULL COMMENT '分诊时间(弃用,IHO暂无该业务)',
vac43 smallint REPLACE NULL COMMENT '是否为预约号 0-否 1-是',
vac44 datetime(6) REPLACE NULL COMMENT '预约时间, 可能是一个时间范围',
vac45 smallint REPLACE NULL COMMENT '挂号状态 0:预约(弃用,预约挂号业务拆分);1:挂号(有效挂号);2:退号; 3:登记(登记信息成功时为3,挂号结账/划价后为1);4:作废;5:其他(目前仅用于更换支付时新支付的数据状态);6:退号异常',
vac46 text REPLACE NULL COMMENT '备注',
bcb02b text REPLACE NULL,
bck01b int REPLACE NULL COMMENT '转诊科室ID #bck1.bck01#',
bas02b text REPLACE NULL COMMENT '转诊诊室 #bas1.bas02#',
bce03c text REPLACE NULL COMMENT '转诊医生 #bce1.bce03#',
vac51 smallint REPLACE NULL COMMENT '转诊状态0:否;1:是',
bak05 text REPLACE NULL COMMENT '疾病病种',
iaa01 int REPLACE NULL COMMENT '险类',
uaa01 int REPLACE NULL COMMENT '社区',
bce02a text REPLACE NULL COMMENT '执行医师号 #bce1.bce02#',
vac56 text REPLACE NULL COMMENT '介绍人名称,存在第三方传递的并非医院员工,没有介绍人id、只有介绍人名称的情况',
vac57 text REPLACE NULL COMMENT '介绍人ID #bce1.bce01#',
bce02c text REPLACE NULL,
bcb01a bigint REPLACE NULL COMMENT '挂号类别ID #bcb1.bcb01#',
bce01a int REPLACE NULL COMMENT '执行医生ID,若执行状态为已接诊、已完诊,执行医生为接诊医生 #bce1.bce01#',
bce01b int REPLACE NULL COMMENT '转诊医生ID #bce1.bce01#',
vac61 text REPLACE NULL COMMENT '预约方式',
bcb03a text REPLACE NULL COMMENT '号码, 挂号类别.编码 #bcb1.bcb03#',
vac62 decimal(9,2) REPLACE NULL COMMENT '身高(cm)',
vac63 decimal(9,3) REPLACE NULL COMMENT '体重(kg)',
bce01d int REPLACE NULL COMMENT '挂号医师ID #bce1.bce01#',
bce03d text REPLACE NULL COMMENT '挂号医师 #bce1.bce03#',
bce03e text REPLACE NULL COMMENT '预约操作员 #bce1.bce03#',
bgg01 bigint REPLACE NULL COMMENT '挂号排班ID(已弃用,排班预约系统已saas化) #bgg1.bgg01#',
vac68 text REPLACE NULL COMMENT '详细年龄, 存储格式:000Y00M00D00H00N00W',
scf01 bigint REPLACE NULL COMMENT 'CRM预约ID #scf1.scf01#',
vac70 smallint REPLACE NULL COMMENT '门诊结算情况 0=未结算,1=结算,2=部分结算 收费系统的冗余字段,知晓当次就诊产生的门诊结算情况,与挂号支付无直接关系',
vac71 int REPLACE NULL COMMENT '就诊次数',
vac72 datetime(6) REPLACE NULL COMMENT '有效日期',
hospitalid int REPLACE NULL COMMENT '医疗机构id',
vac73 text REPLACE NULL COMMENT '预约截至时间(如果没填写,与VAC44一致)',
vac74 text REPLACE NULL COMMENT '门诊号,与vaa03一致',
vac03 text REPLACE NULL COMMENT '活动ID,活动名称,套餐ID',
vac60 text REPLACE NULL COMMENT '获取患者方式 1-身份证 2-医保卡 3-医保电子凭证 4-健康卡 5-就诊卡 6-人脸识别 7-患者ID(其他)',
serialid int REPLACE NULL,
corp_code text REPLACE NULL COMMENT '机构编码',
vac04 text REPLACE NULL COMMENT 'crm无记名卡的卡号',
vac75 text REPLACE NULL COMMENT '姓名',
vac76 text REPLACE NULL COMMENT '性别 #abw1.abw01#',
vac77 text REPLACE NULL COMMENT '证件号码',
vac78 datetime(6) REPLACE NULL COMMENT '出生日期',
vac79 text REPLACE NULL COMMENT '精准扶贫标志 1=是',
vac80 int REPLACE NULL COMMENT '付费模式:0:先付费后诊疗1:先诊疗后付费',
vac47 text REPLACE NULL COMMENT '精准扶贫分类,高危(0 否 1是)',
outvac01 bigint REPLACE NULL COMMENT '第三方就诊ID',
pain_sift int REPLACE NULL COMMENT '是否疼痛筛查 1:是',
cabbrp text REPLACE NULL COMMENT '姓名拼音码',
cabbrw text REPLACE NULL COMMENT '五笔码',
cvaa06 text REPLACE NULL COMMENT '监护人',
cvaa16 text REPLACE NULL COMMENT '其他证件',
cvaa82 text REPLACE NULL COMMENT '健康卡号',
cabl01 text REPLACE NULL COMMENT '血型',
cvaa78 text REPLACE NULL COMMENT 'Rh血型',
vac82 int REPLACE NULL COMMENT '渠道来源:-1=收费处简易挂号、-2=医生站简易挂号、-3=HO体检、-4=第三方体检、0=挂号处挂号、1=云/IHO体检,2=掌上医院、3=互联网医院、4=自助机、5=HO快速检测登记、6=微信快速检测登记、7=CRM、9=第三方、10=急诊系统、11=病案、12=移动端、13=核酸检测登记、14=手术麻醉系统、15=血液透析系统、16=报告卡简易挂号',
vac101a int REPLACE NULL COMMENT '就诊类型(病案首页定义的标准) 1-急诊 2-普通门诊 3-特需门诊 4-互联网诊疗 5-MDT门诊 9-其他',
vac102a int REPLACE NULL COMMENT '来院方式 扩展字典',
vac103a int REPLACE NULL COMMENT '来院时间',
vac104a int REPLACE NULL COMMENT '是否回诊,目前由第三方排队叫号同步 0-否 1-是',
vac105a int REPLACE NULL COMMENT '是否续诊 0-否 1-是',
vac106a text REPLACE NULL COMMENT '现病史',
vac107a text REPLACE NULL COMMENT '既往史',
vac108a text REPLACE NULL COMMENT '病情等级',
vac109a text REPLACE NULL COMMENT '急诊病情分区',
vac110a int REPLACE NULL COMMENT '是否核酸检测 0-未采集 1-采集',
vac111a text REPLACE NULL COMMENT '核酸结果 0-阴性 1-阳性',
purpose text REPLACE NULL COMMENT '来院目的',
immune smallint REPLACE NULL COMMENT '门诊就诊表增加免疫 1.代表传染项目没有免疫力',
created_by bigint REPLACE NULL COMMENT '创建人标识',
updated_time datetime(6) REPLACE NULL COMMENT '更新时间',
updated_by bigint REPLACE NULL COMMENT '更新人标识',
delete_flag boolean REPLACE NULL COMMENT '删除标志,默认否',
version int REPLACE NULL COMMENT '版本',
vac121 int REPLACE NULL COMMENT '排队叫号号序',
vac122 text REPLACE NULL COMMENT '县区',
vac123 text REPLACE NULL COMMENT '联系人证件类型 #aaj1.aaj01#',
vac124 text REPLACE NULL COMMENT '联系人证件号码',
vac125 text REPLACE NULL COMMENT '街道',
vac126 text REPLACE NULL COMMENT '证件类型 #aaj1.aaj01#',
vac127 datetime(6) REPLACE NULL COMMENT '挂号支付时间',
vac128 text REPLACE NULL COMMENT '挂号就诊时间段',
bck01d int REPLACE NULL COMMENT '挂号科室ID #bck1.bck01#',
bck03d text REPLACE NULL COMMENT '挂号科室名称 #bck1.bck03#',
vac129 datetime(6) REPLACE NULL COMMENT '原定义字段的业务已移除,该字段暂无用到',
vac130 bigint REPLACE NULL COMMENT '占号ID,排班预约系统提供的',
bdp15 text REPLACE NULL COMMENT '绿色通道标识 0-否 1-是',
vac131 datetime(6) REPLACE NULL COMMENT '预计就诊开始时间,号源模式下为号源起始时间',
vac132 datetime(6) REPLACE NULL COMMENT '预计就诊结束时间,号源模式下为号源结束时间',
vac133 datetime(6) REPLACE NULL COMMENT '接诊时间',
vac134 datetime(6) REPLACE NULL COMMENT '完诊时间',
vac135 text REPLACE NULL COMMENT '号源渠道标识,排班号源系统提供的channelCode',
extend_field_vac1 text REPLACE NULL COMMENT '拓展字段',
vac136 text REPLACE NULL COMMENT '退号备注',
vac01a bigint REPLACE NULL COMMENT '更换支付方式时产生新的挂号id',
vac137 smallint REPLACE NULL COMMENT '是否上传,用于同步给第三方的记录 0-否 1-是',
scf04 text REPLACE NULL COMMENT '体检单号',
vac138 text REPLACE NULL COMMENT '门诊检查单号',
vac139 text REPLACE NULL COMMENT '排班号源备注(来源于排班)',
bce01e int REPLACE NULL COMMENT '退号员ID #bce1.bce01#',
vac140 text REPLACE NULL COMMENT '挂号号序,由挂号规则生成',
vac141 smallint REPLACE NULL COMMENT '是否为科室挂号 0-否 1-是',
bas01a text REPLACE NULL COMMENT '诊室ID #bas1.bas01#',
vac142 text REPLACE NULL COMMENT '渠道来源具体名称,主要为了兼容第三方来源',
vac143 int REPLACE NULL COMMENT '挂号完成时的排队人数,来源于排队叫号,打印、掌上医院等下游服务均需要',
vac144 text REPLACE NULL COMMENT '排班号源池的号源号序',
vgh01 bigint REPLACE NULL COMMENT '分诊ID #vgh1.vgh01#',
vac145 smallint REPLACE NULL COMMENT '是否为预约取号 0-否 1-是',
vac146 smallint REPLACE NULL COMMENT '应用场景标识 0-正常 1-办理入院(限制门诊开嘱)',
vac147 datetime(6) REPLACE NULL COMMENT '退号时间',
dw_createtime datetime(6) MIN NULL DEFAULT CURRENT_TIMESTAMP COMMENT '数仓创建时间',
dw_updatetime datetime(6) REPLACE NULL DEFAULT CURRENT_TIMESTAMP COMMENT '数仓更新时间',
dw_delete_flag tinyint REPLACE NULL DEFAULT "0" COMMENT '记录业务数据库物理删除标识,0:未删除,1:已删除,默认为0',
dw_org_id text REPLACE NULL COMMENT '数仓机构id',
vac148 text REPLACE NULL COMMENT '户口地址 JSON结构',
vac149 text REPLACE NULL COMMENT '常住地址 JSON结构',
vac150 text REPLACE NULL COMMENT '籍贯地址 JSON结构',
vac151 text REPLACE NULL COMMENT '户口详细地址',
vac152 text REPLACE NULL COMMENT '常住地址邮编',
vac153 text REPLACE NULL COMMENT '户口地址邮编'
) ENGINE=OLAP
AGGREGATE KEY(created_time, vac01)
DISTRIBUTED BY HASH(created_time, vac01) BUCKETS AUTO
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"min_load_replica_num" = "-1",
"is_being_synced" = "false",
"storage_medium" = "hdd",
"storage_format" = "V2",
"inverted_index_storage_format" = "V1",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"binlog.enable" = "false",
"binlog.ttl_seconds" = "86400",
"binlog.max_bytes" = "9223372036854775807",
"binlog.max_history_nums" = "9223372036854775807",
"enable_single_replica_compaction" = "false",
"group_commit_interval_ms" = "10000",
"group_commit_data_bytes" = "134217728"
);
-- test.ods_iho_opd_sys_corporation_rt definition

CREATE TABLE ods_iho_opd_sys_corporation_rt (
org_id bigint NULL,
id int REPLACE NULL,
code text REPLACE NULL,
name text REPLACE NULL,
shortname text REPLACE NULL,
hccode text REPLACE NULL,
hocode text REPLACE NULL,
eccode text REPLACE NULL,
htcode text REPLACE NULL,
adcode text REPLACE NULL,
hlcode text REPLACE NULL,
hgcode text REPLACE NULL,
hscode text REPLACE NULL,
address text REPLACE NULL,
telephone text REPLACE NULL,
fax text REPLACE NULL,
depositbank text REPLACE NULL,
accountno text REPLACE NULL,
taxregisterno text REPLACE NULL,
postcode text REPLACE NULL,
email text REPLACE NULL,
website text REPLACE NULL,
legalr text REPLACE NULL,
contact text REPLACE NULL,
bedcount smallint REPLACE NULL,
openedcount int REPLACE NULL,
logo text REPLACE NULL,
collectivization smallint REPLACE NULL,
netaddr text REPLACE NULL,
province text REPLACE NULL,
city text REPLACE NULL,
county text REPLACE NULL,
countrycode text REPLACE NULL,
vid bigint REPLACE NULL,
created_by bigint REPLACE NULL,
updated_by bigint REPLACE NULL,
created_date datetime(6) REPLACE NULL,
updated_date datetime(6) REPLACE NULL,
traffic text REPLACE NULL,
vpn text REPLACE NULL,
status smallint REPLACE NULL,
apply_name text REPLACE NULL,
apply_phone text REPLACE NULL,
is_fictitious smallint REPLACE NULL,
original_id bigint REPLACE NULL,
telepnohe text REPLACE NULL,
org_type text REPLACE NULL,
license_code text REPLACE NULL,
anization_code text REPLACE NULL,
introduction text REPLACE NULL,
business_license_img text REPLACE NULL,
remark text REPLACE NULL,
province_city_area text REPLACE NULL,
longitude float REPLACE NULL,
latitude float REPLACE NULL,
admin_user_id bigint REPLACE NULL,
invite_status text REPLACE NULL,
org_customer text REPLACE NULL,
server_start_time datetime(6) REPLACE NULL,
server_end_time datetime(6) REPLACE NULL,
server_type int REPLACE NULL,
secret_dog_id text REPLACE NULL,
contract_no text REPLACE NULL,
maximum_user int REPLACE NULL,
yun_auth_code text REPLACE NULL,
delete_flag boolean REPLACE NULL,
version int REPLACE NULL,
org_group_type int REPLACE NULL,
login_count int REPLACE NULL,
mgr_dept_id bigint REPLACE NULL,
description text REPLACE NULL,
business_scope text REPLACE NULL,
imgs text REPLACE NULL,
sec_admin_users text REPLACE NULL,
sec_admin_apps text REPLACE NULL,
parentid int REPLACE NULL,
org_parent_id bigint REPLACE NULL,
acc_end_time date REPLACE NULL,
sync_corp_info_json text REPLACE NULL,
used_name text REPLACE NULL,
deploy_type int REPLACE NULL,
market_people text REPLACE NULL,
market_people_id text REPLACE NULL,
auth_warn text REPLACE NULL,
main_org_id bigint REPLACE NULL,
wechat_org_id text REPLACE NULL COMMENT '企业微信机构ID',
wechat_org_name text REPLACE NULL COMMENT '企业微信机构名称',
sort int REPLACE NULL COMMENT '排序',
dw_createtime datetime(6) MIN NULL DEFAULT CURRENT_TIMESTAMP COMMENT '数仓创建时间',
dw_updatetime datetime(6) REPLACE NULL DEFAULT CURRENT_TIMESTAMP COMMENT '数仓更新时间',
dw_delete_flag tinyint REPLACE NULL DEFAULT "0" COMMENT '记录业务数据库物理删除标识,0:未删除,1:已删除,默认为0',
dw_org_id text REPLACE NULL COMMENT '数仓机构id',
equipment_limit_json text REPLACE NULL COMMENT '各个应用设备数json'
) ENGINE=OLAP
AGGREGATE KEY(org_id)
COMMENT 'null'
DISTRIBUTED BY HASH(org_id) BUCKETS AUTO
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"min_load_replica_num" = "-1",
"is_being_synced" = "false",
"storage_medium" = "hdd",
"storage_format" = "V2",
"inverted_index_storage_format" = "V1",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"binlog.enable" = "false",
"binlog.ttl_seconds" = "86400",
"binlog.max_bytes" = "9223372036854775807",
"binlog.max_history_nums" = "9223372036854775807",
"enable_single_replica_compaction" = "false",
"group_commit_interval_ms" = "10000",
"group_commit_data_bytes" = "134217728"
);
INSERT INTO test.ods_iho_opd_vac1_rt (created_time,vac01,vac02,vaa01,vaa10,aau01,vac06,bao02,vac09,vac10,bas02a,bdp02,abc02,abt02,ack01,vac16,vac17,vac18,vac19,vac20,vac21,aaz02,vac23,vac24,baq01,vac26,vac27,vac28,vac29,vac30,vac31,bck01a,bce03a,vac34,vac35,vac36,vac37,bce02,bce03b,vac40,vac41,vac42,vac43,vac44,vac45,vac46,bcb02b,bck01b,bas02b,bce03c,vac51,bak05,iaa01,uaa01,bce02a,vac56,vac57,bce02c,bcb01a,bce01a,bce01b,vac61,bcb03a,vac62,vac63,bce01d,bce03d,bce03e,bgg01,vac68,scf01,vac70,vac71,vac72,hospitalid,vac73,vac74,vac03,vac60,serialid,corp_code,vac04,vac75,vac76,vac77,vac78,vac79,vac80,vac47,outvac01,pain_sift,cabbrp,cabbrw,cvaa06,cvaa16,cvaa82,cabl01,cvaa78,vac82,vac101a,vac102a,vac103a,vac104a,vac105a,vac106a,vac107a,vac108a,vac109a,vac110a,vac111a,purpose,immune,created_by,updated_time,updated_by,delete_flag,version,vac121,vac122,vac123,vac124,vac125,vac126,vac127,vac128,bck01d,bck03d,vac129,vac130,bdp15,vac131,vac132,vac133,vac134,vac135,extend_field_vac1,vac136,vac01a,vac137,scf04,vac138,vac139,bce01e,vac140,vac141,bas01a,vac142,vac143,vac144,vgh01,vac145,vac146,vac147,dw_createtime,dw_updatetime,dw_delete_flag,dw_org_id,vac148,vac149,vac150,vac151,vac152,vac153) VALUES
('2025-01-07 17:59:14',100,'',0,0,'',0,'',0,0,'','','','','','','','','','','','','','',0,'','','','','',0,0,'',0,NULL,NULL,NULL,'','',0,NULL,NULL,0,NULL,0,'','',0,'','',0,'',0,0,'','','','',0,0,0,'','',0.00,0.000,0,'','',0,'',0,0,0,NULL,0,'','','','',0,'','','','','',NULL,'',0,'',0,0,'','','','','','','',0,0,0,0,0,0,'','','','',0,'','',0,0,NULL,0,0,0,0,'','','','','',NULL,'',0,'',NULL,0,'',NULL,NULL,NULL,NULL,'','','',0,0,'','','',0,'',0,'','',0,'',0,0,0,NULL,NULL,NULL,0,'1636276130323148701','','','','','','');

 INSERT INTO test.ods_iho_opd_sys_corporation_rt (org_id,id,code,name,shortname,hccode,hocode,eccode,htcode,adcode,hlcode,hgcode,hscode,address,telephone,fax,depositbank,accountno,taxregisterno,postcode,email,website,legalr,contact,bedcount,openedcount,logo,collectivization,netaddr,province,city,county,countrycode,vid,created_by,updated_by,created_date,updated_date,traffic,vpn,status,apply_name,apply_phone,is_fictitious,original_id,telepnohe,org_type,license_code,anization_code,introduction,business_license_img,remark,province_city_area,longitude,latitude,admin_user_id,invite_status,org_customer,server_start_time,server_end_time,server_type,secret_dog_id,contract_no,maximum_user,yun_auth_code,delete_flag,version,org_group_type,login_count,mgr_dept_id,description,business_scope,imgs,sec_admin_users,sec_admin_apps,parentid,org_parent_id,acc_end_time,sync_corp_info_json,used_name,deploy_type,market_people,market_people_id,auth_warn,main_org_id,wechat_org_id,wechat_org_name,sort,dw_createtime,dw_updatetime,dw_delete_flag,dw_org_id,equipment_limit_json) VALUES
 (1636276130323148202,200,'100','yifuyuan1','','','','','','','','','','','','','','','','','','','','',0,0,'',0,'','','','','',0,0,0,NULL,NULL,'','',0,'','',0,0,'','','','','','','','',0.0,0.0,0,'','',NULL,NULL,0,'','',0,'',0,0,0,0,0,'','','','','',0,0,NULL,'','',0,'','','',0,'','',0,NULL,NULL,0,'',''),
 (1636276130323148402,400,'100','yifuyuan1','','','','','','','','','','','','','','','','','','','','',0,0,'',0,'','','','','',0,0,0,NULL,NULL,'','',0,'','',0,0,'','','','','','','','',0.0,0.0,0,'','',NULL,NULL,0,'','',0,'',0,0,0,0,0,'','','','','',0,0,NULL,'','',0,'','','',0,'','',0,NULL,NULL,0,'',''),
 (1636276130323148602,600,'100','yifuyuan1','','','','','','','','','','','','','','','','','','','','',0,0,'',0,'','','','','',0,0,0,NULL,NULL,'','',0,'','',0,0,'','','','','','','','',0.0,0.0,0,'','',NULL,NULL,0,'','',0,'',0,0,0,0,0,'','','','','',0,0,NULL,'','',0,'','','',0,'','',0,NULL,NULL,0,'',''),
 (1636276130323148501,500,'200','yifuyuan2','','','','','','','','','','','','','','','','','','','','',0,0,'',0,'','','','','',0,0,0,NULL,NULL,'','',0,'','',0,0,'','','','','','','','',0.0,0.0,0,'','',NULL,NULL,0,'','',0,'',0,0,0,0,0,'','','','','',0,0,NULL,'','',0,'','','',0,'','',0,NULL,NULL,0,'',''),
 (1636276130323148701,100,'200','yifuyuan2','','','','','','','','','','','','','','','','','','','','',0,0,'',0,'','','','','',0,0,0,NULL,NULL,'','',0,'','',0,0,'','','','','','','','',0.0,0.0,0,'','',NULL,NULL,0,'','',0,'',0,0,0,0,0,'','','','','',0,0,NULL,'','',0,'','','',0,'','',0,NULL,NULL,0,'',''),
 (1636276130323148101,100,'200','yifuyuan2','','','','','','','','','','','','','','','','','','','','',0,0,'',0,'','','','','',0,0,0,NULL,NULL,'','',0,'','',0,0,'','','','','','','','',0.0,0.0,0,'','',NULL,NULL,0,'','',0,'',0,0,0,0,0,'','','','','',0,0,NULL,'','',0,'','','',0,'','',0,NULL,NULL,0,'',''),
 (1636276130323148802,100,'100','yifuyuan1','','','','','','','','','','','','','','','','','','','','',0,0,'',0,'','','','','',0,0,0,NULL,NULL,'','',0,'','',0,0,'','','','','','','','',0.0,0.0,0,'','',NULL,NULL,0,'','',0,'',0,0,0,0,0,'','','','','',0,0,NULL,'','',0,'','','',0,'','',0,NULL,NULL,0,'',''),
 (1636276130323148301,300,'200','yifuyuan2','','','','','','','','','','','','','','','','','','','','',0,0,'',0,'','','','','',0,0,0,NULL,NULL,'','',0,'','',0,0,'','','','','','','','',0.0,0.0,0,'','',NULL,NULL,0,'','',0,'',0,0,0,0,0,'','','','','',0,0,NULL,'','',0,'','','',0,'','',0,NULL,NULL,0,'','');
2 Answers

目前默认就是这个行为,CAST 成DOUBLE,会损失信息。可以人工加cast到字符串比较
cast( sys_corporation1.org_id as string) = cast(vac1.dw_org_id as string)。

补充:公共类型推断是一个逻辑过程,结果由等号两边的类型共同决定,和类型所处的位置无关。这个根据位置推断的能力做不到了。

可以关闭这个默认转换行为吗,直接报错出来