[2020/07/08 02:23:10.402 +08:00] [WARN] [session.go:1136] ["compile SQL failed"] [conn=8587] [error="Can't find column zfgjj.sys_apply_discard.apply_detail_json in schema Column: [zfgjj.sys_apply_discard.apply_id,zfgjj.sys_apply_discard.loanmonths,zfgjj.sys_apply_discard.loanamount,zfgjj.sys_apply_discard._tidb_rowid] Unique key: []"] [SQL="insert into ods.tmp_ods_zfgjj_stat_apply_detail \
\t SELECT \tdate(if(a.confirm_time*1=0,a.apply_time,a.confirm_time)) day,\
\t\t\t\t\t\ta.sid apply_sid,a.product_cid,a.user_sid,ifnull(b.gjj_sid,g.gjj_sid) gjj_sid,b.shebao_sid,b.bill_sid,\
\t\t\t\t\t\ta.apply_time,if(a.confirm_time*1=0 and a.apply_time<'2017-04-01',a.apply_time,a.confirm_time) confirm_time,a.approve_time,\
\t case when d.sid is null then (case when e.loan_time is not null then e.loan_time else a.loan_time end) else d.loan_time end loan_time,\
\t\t\t\t\t\tcase when e.apply_id is not null and aa.big_category<>'钱包系' then e.loan_state when e.loan_time is not null and a.state <> '已到期' then '放款成功' else a.state end status\
\t\t\t\t\t\t,c.state,cw_state,in_state,\
\t\t\t\t\t\tcase when e.apply_id is not null and aa.big_category<>'钱包系' then e.loan_state_time when e.loan_time is not null and a.state <> '已到期' then e.loan_time else a.state_time end state_time\
\t\t\t\t\t\t,f.RealName name,\
\t\t\t\t\t\tifnull(b.apply_amount*1,0) apply_amount,\
\t\t\t\t\t\tifnull(apply_period*1,0) apply_period,\
\t\t\t\t\t\tifnull(approve_amount*1,0) approve_amount,\
\t\t\t\t\t\t-- 处理ppd隐藏订单期数不存在\
\t\t\t\t\t\tcase when ifnull(approve_period*1,0)<=0 then ifnull(h.LoanMonths*1,0) else ifnull(approve_period*1,0)end approve_period,\
\t -- ifnull(d.loan_amount*1,0) loan_amount,\
\t\t\t\t\t ifnull((case when d.sid is not null and d.loan_amount<>0 then d.loan_amount else b.settlement_amount end)*1,0) loan_amount,\
\t\t\t\t\t\t-- 处理ppd隐藏订单结算金额不存在\
\t\t\t\t\t\tcase when ifnull(settlement_amount*1,0)<=0 then ifnull(h.LoanAmount*1,0) else ifnull(settlement_amount*1,0) end settlement_amount,\
\t ifnull(reconciliation_amount*1,0) reconciliation_amount,\
\t c.refresh,\
\t a.src\
\t\t\t\t\t\t,a.user_type\
\t\t\tFROM ods.tmp_20181107 a\
\t\t\t\tLEFT JOIN ods.ods_zfgjj_sys_apply_info b ON a.sid = b.apply_id\
\t\t\t\t-- 对隐藏订单的公积金编号进行处理\
\t\t\t\tleft join hidden.hidden_gjj_brief_apply g on a.sid=g.apply_id\
\t\t\t\tleft join zfgjj.sys_apply_discard h on a.sid=h.apply_id\
\t\t LEFT JOIN zfgjj.sys_certification_tri f on a.user_sid=f.user_sid\
\t LEFT JOIN zfgjj.stat_apply_revenue d on a.sid=d.sid -- 取放款时间,金额\
\t\t\t\tLEFT JOIN ods.tmp_ods_zfgjj_sys_apply_standard_sub e \ton a.product_cid = e.product_cid and a.sid = e.apply_id -- 取标准化放款成功状态、时间\
\t\t\t\tLEFT JOIN zfgjj.cfg_stat_status c ON a.product_cid=c.product_cid and case when e.loan_time is not null and e.loan_state <> '放款失败' and a.state <> '已到期' then '放款成功' else a.state end=c.status \
\t\t\t\tleft join dm.dm_cfg_background_product aa on a.product_cid=aa.product_cid_all \
\t\t\tWHERE (a.product_cid in (1,5,6,7,10,11,12,14,16,17,18,19,20,23,24,25,26,28,31,32,34,35,36,37,38,39,40,42,43,45,48,50,46,49,47,53,27,51,56,57,55,60,58,59,64,61,62,65,67,69,66,68,54,72,73,70,71,63,74,76,78,75,81,82,84,83,87,86,90,96,97,91,92,93,100,101,94,106,105,102,103,107,108,109,112,99,111,110,104,113,114,117,118,116,119,120,121,122,123,124,127,128,142,143,126,132,125,134,135,136,95,138,139,140,137,149,150) or aa.product_cid_all is not null)\
\t\t\t\tAND a.sid>0 ;\
\t "]
[2020/07/08 02:23:10.402 +08:00] [ERROR] [conn.go:728] ["command dispatched failed"] [conn=8587] [connInfo="id:8587, addr:172.16.150.112:5564 status:10, collation:utf8mb4_general_ci, user:procs"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="insert into ods.tmp_ods_zfgjj_stat_apply_detail \
\t SELECT \tdate(if(a.confirm_time*1=0,a.apply_time,a.confirm_time)) day,\
\t\t\t\t\t\ta.sid apply_sid,a.product_cid,a.user_sid,ifnull(b.gjj_sid,g.gjj_sid) gjj_sid,b.shebao_sid,b.bill_sid,\
\t\t\t\t\t\ta.apply_time,if(a.confirm_time*1=0 and a.apply_time<'2017-04-01',a.apply_time,a.confirm_time) confirm_time,a.approve_time,\
\t case when d.sid is null then (case when e.loan_time is not null then e.loan_time else a.loan_time end) else d.loan_time end loan_time,\
\t\t\t\t\t\tcase when e.apply_id is not null and aa.big_category<>'钱包系' then e.loan_state when e.loan_time is not null and a.state <> '已到期' then '放款成功' else a.state end status\
\t\t\t\t\t\t,c.state,cw_state,in_state,\
\t\t\t\t\t\tcase when e.apply_id is not null and aa.big_category<>'钱包系' then e.loan_state_time when e.loan_time is not null and a.state <> '已到期' then e.loan_time else a.state_time end state_time\
\t\t\t\t\t\t,f.RealName name,\
\t\t\t\t\t\tifnull(b.apply_amount*1,0) apply_amount,\
\t\t\t\t\t\tifnull(apply_period*1,0) apply_period,\
\t\t\t\t\t\tifnull(approve_amount*1,0) approve_amount,\
\t\t\t\t\t\t-- 处理ppd隐藏订单期数不存在\
\t\t\t\t\t\tcase when ifnull(approve_period*1,0)<=0 then ifnull(h.LoanMonths*1,0) else ifnull(approve_period*1,0)end approve_period,\
\t -- ifnull(d.loan_amount*1,0) loan_amount,\
\t\t\t\t\t ifnull((case when d.sid is not null and d.loan_amount<>0 then d.loan_amount else b.settlement_amount end)*1,0) loan_amount,\
\t\t\t\t\t\t-- 处理ppd隐藏订单结算金额不存在\
\t\t\t\t\t\tcase when ifnull(settlement_amount*1,0)<=0 then ifnull(h.LoanAmount*1,0) else ifnull(settlement_amount*1,0) end settlement_amount,\
\t ifnull(reconciliation_amount*1,0) reconciliation_amount,\
\t c.refresh,\
\t a.src\
\t\t\t\t\t\t,a.user_type\
\t\t\tFROM ods.tmp_20181107 a\
\t\t\t\tLEFT JOIN ods.ods_zfgjj_sys_apply_info b ON a.sid = b.apply_id\
\t\t\t\t-- 对隐藏订单的公积金>编号进行处理\
\t\t\t\tleft join hidden.hidden_gjj_brief_apply g on a.sid=g.apply_id\
\t\t\t\tleft join zfgjj.sys_apply_discard h on a.sid=h.apply_id\
\t\t LEFT JOIN zfgjj.sys_certification_tri f on a.user_sid=f.user_sid\
\t LEFT JOIN zfgjj.stat_apply_revenue d on a.sid=d.sid -- 取放款时间,金额\
\t\t\t\tLEFT JOIN ods.tmp_ods_zfgjj_sys_apply_standard_sub e \ton a.product_cid = e.product_cid and a.sid = e.apply_id -- 取标准化放款成功状态、时间\
\t\t\t\tLEFT JOIN zfgjj.cfg_stat_status c ON a.product_cid=c.product_cid and case when e.loan_time is not null and e.loan_state <> '放款失败' and a.state <> '已到期' then '放款成功' else a.state end=c.status \
\t\t\t\tleft join dm.dm_cfg_background_product aa on a.product_cid=aa.product_cid_all \
\t\t\tWHERE (a.product_cid in (1,5,6,7,10,11,12,14,16,17,18,19,20,23,24,25,26,28,31,32,34,35,36,37,38,39,40,42,43,45,48,50,46,49,47,53,27,51,56,57,55,60,58,59,64,61,62,65,67,69,66,68,54,72,73,70,71,63,74,76,78,75,81,82,84,83,87,86,90,96,97,91,92,93,100,101,94,106,105,102,103,107,108,109,112,99,111,110,104,113,114,117,118,116,119,120,121,122,123,124,127,128,142,143,126,132,125,134,135,136,95,138,139,140,137,149,150) or aa.product_cid_all is not null)\
\t\t\t\tAND a.sid>0 ;\
\t "] [txn_mode=OPTIMISTIC] [err="Can't find column zfgjj.sys_apply_discard.apply_detail_json in schema Column: [zfgjj.sys_apply_discard.apply_id,zfgjj.sys_apply_discard.loanmonths,zfgjj.sys_apply_discard.loanamount,zfgjj.sys_apply_discard._tidb_rowid] Unique key: []\
github.com/pingcap/tidb/expression.(*Column).resolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/expression/column.go:465\
github.com/pingcap/tidb/expression.(*ScalarFunction).resolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/expression/scalar_function.go:427\
github.com/pingcap/tidb/expression.(*ScalarFunction).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/expression/scalar_function.go:398\
github.com/pingcap/tidb/planner/core.resolveIndicesForVirtualColumn\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:238\
github.com/pingcap/tidb/planner/core.(*PhysicalIndexLookUpReader).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:279\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600\
github.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:589\
github.com/pingcap/tidb/planner/core.(*PhysicalProjection).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:23\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600\
github.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:589\
github.com/pingcap/tidb/planner/core.(*PhysicalIndexJoin).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:161\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600\
github.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:589\
github.com/pingcap/tidb/planner/core.(*PhysicalIndexJoin).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:161\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600\
github.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:589\
github.com/pingcap/tidb/planner/core.(*PhysicalMergeJoin).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:118\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600\
github.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:589\
github.com/pingcap/tidb/planner/core.(*PhysicalHashJoin).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:76\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600\
github.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:589\
github.com/pingcap/tidb/planner/core.(*PhysicalProjection).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:23\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600\
github.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:589\
github.com/pingcap/tidb/planner/core.(*PhysicalHashJoin).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:76\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600\
github.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:589\
github.com/pingcap/tidb/planner/core.(*PhysicalHashJoin).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:76\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600\
github.com/pingcap/tidb/planner/core.(*PhysicalSelection).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:324\
github.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices\
\t/home/jenkins/agent/workspace/tidb_v4.0.0/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:600"]
这一条 log 里出现的,是一个 insert 语句