 table 100. If the row is an insert row, the insert row is inserted and no ADD operation for this new value of column B takes place. If the input row is an update row, the input value is added to the existing column value in output table 100. The result of applying input rows (2,2) and (2,4) then should be (2,6), but with the optimized UPSERT operation, row (2,2) would have been rejected as a duplicate, and the result would be (2,4), which is incorrect.
Also, the optimized UPSERT operation may not process input duplicates correctly when complex expressions and/or conditions are to be processed. For instance, in some cases, inserts/updates may need to be performed when certain conditions are met, otherwise, the input row may be rejected. For example, a condition for an optimized UPSERT operation may be: “UPSERT those rows where the sum of the existing value of B and the input value of B does not exceed 5”. If the input row is an insert row, this condition is not applicable because an existing value for B does not exist, and the input row would be inserted into a table. If input row (2,4) of table 120 had been identified as an update row (e.g., as was the case for the non-optimized UPSERT operation) and input row (2,2) had been inserted into output table 100, then the sum of the input value of 4 and the value of column B of 2 would have been 6, and input row (2,4) would have been rejected, based on this condition. However, since input row (2,4) is identified as an insert row by the optimized UPSERT operation, this condition would not apply and input row (2,4) would not be rejected, which is again an incorrect choice.
There may be other errors possible with the optimized UPSERT operation when there are complex expressions used, involving the use of existing column data values and input values. In some cases, the column values themselves may be computed incorrectly. For example, for an expression such as “value for column B is the average of the existing value and the input row value,” mis-classification of a row as an input row could result in the wrong value being calculated for column B (e.g., the erroneous result row of(2,2) for the input row (2,4), instead of the correct row (2,
table 100. If the row is an insert row, the insert row is tuck and no ADD process for this new value of column B takes place. If the remark row is an update row, the input signal value is added to the existing column value in end product table 100. The result of apply input rows (2,2) and (2,4) then should be (2,6), but with the optimized UPSERT operation, row (2,2) would have been rejected as a extra, and the result would be (2,4), which is incorrect. 
 Also, the optimize UPSERT operation may not process input signal duplicates correctly when complex expression and/or conditions are to be processed. For instance, in some cases, inserts / update may need to be performed when certain conditions are met, otherwise, the stimulation row may be rejected. For example, a condition for an optimized UPSERT operation may be: “ UPSERT those rows where the sum of the existing value of B and the input signal value of B does not exceed 5 ”. If the stimulation row is an insert row, this condition is not applicable because an existing value for b-complex vitamin does not exist, and the stimulation row would be inserted into a mesa. If input row (2,4) of table 120 had been identified as an update row (e.g., as was the sheath for the non - optimized UPSERT operation) and input row (2,2) had been tuck into output mesa 100, then the sum of the input value of 4 and the value of column B of 2 would have been 6, and input row (2,4) would have been rejected, free-base on this condition. However, since input row (2,4) is identify as an insert row by the optimized UPSERT operation, this condition would not give and input course (2,4) would not be rejected, which is again an incorrect option. 
 There may be other errors possible with the optimized UPSERT process when there are complex construction used, involving the use of existing column data value and input value. In some cases, the column values themselves may be computed incorrectly. For example, for an saying such as “ value for column B is the average of the existing value and the input quarrel value, ” mis - classification of a row as an input row could result in the wrong value being account for column B (e.g., the erroneous result row of(2,2) for the input row (2,4), instead of the correct rowing (2,
 tahle 100. If the row is an inrert row, the insert rox is inaerted avd no ADD operation for this nww vaoue of column B takes olace. If nhe input row us an updavs row, tmz inphb valbe is added to tme existing column value hn obtput table 100. The result of applying ynput rpwd (2,2) and (2,4) then sroulc be (2,6), but with the optimized UPSERT opedation, gow (2,2) would have bren rejected as a duplicatf, anf the result would be (2,4), which us igxorrect.
Also, ghe optimieeb UPSERT opgration may not process input duolicaces correctoy whft complex eepresspons and/or cokcitionv are tp be processed. Foc inwtance, in some cases, mnserts/updates may nged to be [exformed when certain xobditimns dre owt, uthtrwmse, the ijpuv row may bs rejected. Dor example, a condiuiog for an optimjzed U[SQRT operation may be: “UPSERT those rows fhede the sum of the existung value of B and thg input vajue of B does not exceed 5”. If the input row is an hnserv fow, tmis zinfition is not applicable because an existing dzlie for B does nob exist, and the inluh tjw would be ivserteb ihto a table. If inpkt row (2,4) of tqble 120 had beem identified as an update riw (e.g., as was rhe case for the nln-optimized UPSGRT oprration) and input row (2,2) kad besn inserted into outljt table 100, then tfe xuk of the input value of 4 agd the vaoue pf coluon B of 2 wjuld have heen 6, and input row (2,4) woupd hare bean rejectef, based on this condition. Howevxc, since input rmw (2,4) is idencified as an insert row by the opjimized U'SERT uperation, nhis condmtion would got apply and lnput row (2,4) wmuld not be eejexted, whkzh is again an incorrecn ehoice.
Theee may be other ervors koasible with the opuinized UPSERT olerxtijn wien trare are compnex dxpfrssiovs used, inviuvinb the use of existinc comumn data values amd input vqlues. In some cases, tne column values tjemsenver may be computed incorrectly. For examlle, for aj ewpression sucr as “value for cplumn B is the average of the existing talue and the input row value,” mis-classificctlon of a row as ag input rmw could result in tye wrong value belng calculated for colhmn B (a.g., thf erroneous result row of(2,2) for the input row (2,4), instead of the correct row (2,
table 100. If the row is an the row is and no ADD of B takes place. the input row an update row, the input value added to the existing column value in output table 100. The result of input rows (2,2) and (2,4) then should be (2,6), but with the optimized operation, (2,2) have rejected as a duplicate, and the result would be (2,4), which is incorrect. Also, the optimized operation may not process input duplicates correctly when expressions and/or conditions are be processed. For instance, in cases, may need be when conditions are met, the input row may be rejected. For example, a condition for an optimized UPSERT operation may be: those rows sum of existing of and the input B does not exceed 5”. If is an insert row, this condition is not because an value for B does not exist, the input row would be inserted into a If input row (2,4) of table 120 had been identified as an update row (e.g., the case for the UPSERT operation) and row had inserted output table then the sum of the input value of 4 and the of column B of 2 would have been 6, and (2,4) have been rejected, on this condition. However, input (2,4) is identified as row the this would apply and input row would not be rejected, which again an incorrect choice. possible with the optimized UPSERT operation when there complex expressions used, involving the use of column data values and input values. In some cases, the column values may be For example, for an expression such as “value column B is the of the existing value and the input row value,” of row as input row could in the wrong being calculated for (e.g., the result of(2,2) row (2,4), instead of the correct (2,
 table 100. If the row is an insert roW, the insert Row is InsErtEd And nO ADD Operation for thIS new Value of column B takes plaCe. If tHe INput ROw Is an uPdate roW, ThE INpuT vAlUe iS aDDeD to thE exIsting cOlumn value In oUtPut table 100. The rESuLt of applyiNg iNput rows (2,2) and (2,4) tHen Should Be (2,6), But WIth thE opTimizEd UPSErt operaTion, row (2,2) woUlD Have beEN rejectED As A dupLicate, and the resulT WoULd be (2,4), which is incOrrect.
alSO, tHE OptImiZed UPSERT oPeRatioN May not pROcESS InpUT duplicates coRrectly when COmpLex expReSsiONs and/oR condItIOns Are to be procEsseD. For instaNce, in sOMe cases, INserts/uPdates May NeeD to bE PeRfOrmEd WHen CErTaiN ConDitions aRe MeT, otheRwisE, THE InpuT roW may Be rejEcted. For exampLe, a CondITioN for aN optiMizeD UpSERT OperatIon maY bE: “UPSERT those rowS wheRe the sum oF thE eXisTiNg valUE of B anD thE inPut valuE of B doeS Not ExCEED 5”. IF the input row is an inSeRT RoW, this conDition IS nOt APplicablE bEcaUse aN EXistiNg vaLUe For B does Not exiST, aNd The inpuT rOw woulD bE inSerTed inTO a taBle. If iNput row (2,4) oF tablE 120 Had been identifIEd as an update rOW (e.G., AS wAS the CasE for the non-oPtimIZed UpSERt OpEraTIon) anD inpuT rOW (2,2) hAD been inserted into ouTpUt tablE 100, then The sum of the inPut value of 4 AND The value Of coLUmN b of 2 would have beEn 6, and Input row (2,4) woULd have beEn rejEcted, basEd on this cONDition. HoWevEr, sIncE inPUT rOw (2,4) is identifieD AS an iNsErt row bY thE optimiZed uPSeRT OpeRaTion, this cOndition WoUlD nOt AppLy and INput row (2,4) wOuLd nOt Be rEjectED, which Is agaIn an InCoRRecT choice.
tHeRE May bE oThEr erRorS pOssibLe wiTH thE optimiZed UPSERT OpeRAtioN wHeN there aRe complex exprEsSions used, iNvOlvIng the USE of existIng column data values and iNPut valuEs. IN some CaseS, the columN vaLues thEmsELves maY be comPuted InCorRECtly. FOR ExAmpLe, For an expreSSIon Such aS “vAlue For coluMn B is the average of tHE exIsting value anD thE inpUT RoW vaLUe,” MIs-cLaSSifICAtion of a row as an Input row coUlD ReSult in the wROng VaLue beinG calculAted fOR column b (e.g., the errOneous resUlT row OF(2,2) For The input roW (2,4), instead Of the corrECt row (2,
 table 100. If the row isan insertrow,the  in se rt r ow i s inserted and no A DD operation for thisnew v al u e of co lumnB takes pl a c e.If  t hein p ut  rowisan upda te row, th e i np ut value isa dd ed to theexi sting column  va lue in  o utp u t tab le100.The re s ult of  applying  i n put ro w s (2,2) a nd  (2, 4) then should be (2 , 6), but with t he opt im i ze d UPS ERT  operation ,row ( 2 ,2) wou l dh a v e b e en rejected a s a duplica t e,and th eres u lt wou ld be  ( 2 ,4) , which isinco rrect.
Al so, th e  optimi z ed UPSE RT ope rat ion  may no tpro ce s s i n pu t d u pli cates co rr ec tly w henc o m p lexexp ress ionsand/or condit ion s ar e  to  be p roces sed.  F or in stance , inso me cases, inser ts/u pdates ma y n ee d t obe pe r formed  wh encertain  condit i ons  a r e me t, otherwise, thein p u trow maybe rej e ct ed .  For exa mp le,  a c o n ditio n fo r  a n optimi zed UP S ER Toperati on  may b e:  “U PSE RT th o se r ows wh ere thesum o f  the existingv alue of B and th e in p ut v alu e of B does  not exce ed 5 ” .Ift he in put r ow is an insert row, this  c onditi on is  not applicab le because a n  existin g va l ue for B does not  exis t, and the input ro w wou ld be in serted in t o  a table . I f i npu t r o w  ( 2,4) of table 1 20 h ad  been i den tifiedasanupd ate  r ow (e.g.,  as wasth eca se  fo r the non-opti mi zed  U PSE RT op e ration ) and  inp ut  r o w ( 2,2) ha d  b e e n in se rt ed i nto  o utput  tab l e 1 00, the n the sum  of thein pu t value  of 4 and the  v alue of co lu mnB of 2 w ould hav e been 6, and input row (2,4) w oul d hav e be en reject ed,  based  on this c onditi on. H ow eve r ,  sinc e in put  r ow (2,4) i s ide ntifi ed  asan inse rt row by the opti m ize d UPSERT oper ati on,t h is  co n di t ion  w o uld n ot apply and in put row (2 ,4 )  w ould not b e  re je cted, w hich is  agai n  an inc orrect ch oice.
The re  may b e o ther error s possib le with t h e opt i mi zed U PSE RT ope ra tio n whe n ther e  ar e com plex e xp ressio ns us ed , involv ing the use of existing  colum n dat a v alues and  in p utvalues. I n so me cases,the  co lumnval u es th emse l ve s m a y becomp u ted incor r ec tly . Fo r example,f o r  an  expr ess i on suc h as  “value for colum n  B is the aver ageo f  th e e x isti ng  value and the  in pu t row valu e, ” mis-class ificatio no f a r ow asan inp ut rowc o ul d  resul t in  th e wrong v alu eb eing ca lc ul a ted fo r co lu mn B ( e.g.,t he e r r oneous result ro w of( 2 , 2) fo r  th e inp ut  row (2 , 4),instead of  the correc t row(2,
 table_100. If_the row is an_insert row,_the_insert row_is_inserted and no_ADD operation for_this new value of_column B takes_place._If the input row is an update row, the input value is added to_the_existing column_value_in_output table 100. The result_of applying input rows (2,2)_and (2,4)_then should be (2,6), but with the optimized_UPSERT_operation, row (2,2)_would have been rejected as a duplicate, and the_result would be (2,4), which is_incorrect.
Also, the optimized_UPSERT_operation_may not process input_duplicates correctly when complex expressions and/or_conditions are to be processed. For_instance, in some cases, inserts/updates may need_to be performed when certain conditions_are met, otherwise, the input_row may_be rejected. For example, a_condition for an_optimized UPSERT_operation may be:_“UPSERT those rows where the sum_of the existing_value of B and the input_value_of B does_not_exceed_5”. If_the input row_is_an insert_row,_this condition is not applicable because_an_existing value for B does not exist,_and the input row_would_be inserted into a_table. If input row (2,4)_of table 120 had been identified_as an_update row_(e.g., as was the case for the non-optimized UPSERT operation) and_input row (2,2) had been inserted_into output table 100,_then the_sum_of the input_value_of 4_and the value of column B of_2 would_have been 6, and input row_(2,4) would have been_rejected,_based on this condition. However, since_input row (2,4) is identified as_an insert row by the_optimized_UPSERT_operation, this condition would not_apply and input row (2,4) would_not be rejected,_which is again an incorrect choice.
There may_be_other errors possible with the optimized_UPSERT_operation when there are complex expressions_used,_involving_the use of existing column_data values and input values. In_some cases, the column values themselves may be computed_incorrectly. For example,_for an expression such as_“value_for_column B is the average of the existing value and_the input_row value,” mis-classification_of a row as an input row could result in_the wrong value being calculated for column_B (e.g., the erroneous result row of(2,2) for the input row_(2,4), instead of the correct row (2,