Menu

#1 getting warn invoke method calcDiffAsDouble': null

1.0
closed
xresch
None
2016-03-05
2015-05-14
WWS III
No

anything special to run this jar. I'm initiated it with java -jar xxxxx. It appears to do fine with real numeric columns but columns that are text or text containing numbers result in an error.

File 1 first 9 lines

MYKEY,LC_CODE,LCA_ACTV_DT,PROP_CODE,CURR_CODE,COUNT(*),LCA_TOT_NRA,DEAL_TERM_NRA,LCA_NRA_MSMNT,LCA_AVG_NNN_EFF_RENT,LCA_PRIOR_AVG_NNN_EFF_RENT,LCA_PRPS_TI_ALW_AMT,LCA_PRPS_COMM_AMT,LCA_PRPS_LGL_FEES_AMT,LCA_WALT
"-220121003laxcs101","-2",2012-10-03,"laxcs101","USD",1,0,0,0,0,0,0,0,0,460
"-420121003laxcs101","-4",2012-10-03,"laxcs101","USD",1,0,0,0,0,0,0,0,0,460
".com20130517cnj00305",".com",2013-05-17,"cnj00305","USD",1,400973.9617,400973.9617,400973.9617,5.98,5.45,0,899685.44,0,90
"0100010020140725dal03001","01000100",2014-07-25,"dal03001","USD",1,492499.788,492499.788,492499.788,4,4,0,88650.02,0,12
"0100026520140925elp00124","01000265",2014-09-25,"elp00124","USD",1,239131,0,0,0,0,0,0,0,0
"0100027020140530aus00107","01000270",2014-05-30,"aus00107","USD",1,57599.9752,57599.9752,57599.9752,5.63,5.63,0,3241.04,0,3
"0100027020140903aus00107","01000270",2014-09-03,"aus00107","USD",1,57600,0,0,0,0,0,0,0,0

File 2 first 9 lines

MYKEY,LC_CODE,LCA_ACTV_DT,PROP_CODE,CURR_CODE,COUNT(*),LCA_TOT_NRA,DEAL_TERM_NRA,LCA_NRA_MSMNT,LCA_AVG_NNN_EFF_RENT,LCA_PRIOR_AVG_NNN_EFF_RENT,LCA_PRPS_TI_ALW_AMT,LCA_PRPS_COMM_AMT,LCA_PRPS_LGL_FEES_AMT,LCA_WALT
".com20130517cnj00305",".com",2013-05-17,"cnj00305","USD",1,400973.9617,400973.9617,400973.9617,5.98,5.45,0,899685.44,0,90
"0100010020140725dal03001","01000100",2014-07-25,"dal03001","USD",1,492499.788,492499.788,492499.788,4,4,0,88650.02,0,12
"0100026520140925elp00124","01000265",2014-09-25,"elp00124","USD",1,239131,0,0,0,0,0,0,0,0
"0100027020140530aus00107","01000270",2014-05-30,"aus00107","USD",1,57599.9752,57599.9752,57599.9752,5.63,5.63,0,3241.04,0,3
"0100027020140903aus00107","01000270",2014-09-03,"aus00107","USD",1,57600,0,0,0,0,0,0,0,0
"0100031220140723hou00603","01000312",2014-07-23,"hou00603","USD",1,7640,0,0,0,0,0,0,0,0
"0100033120140530den00705","01000331",2014-05-30,"den00705","USD",1,15000,0,0,0,0,0,0,0,0
"0100033220140725dal01709","01000332",2014-07-25,"dal01709","USD",1,229399.9012,229399.9012,229399.9012,3.8,3.75,0,58841.1,0,12

results first 9 lines

MYKEY,LC_CODE(old),LC_CODE(young),LC_CODE Diff,LCA_ACTV_DT(old),LCA_ACTV_DT(young),LCA_ACTV_DT Diff,PROP_CODE(old),PROP_CODE(young),PROP_CODE Diff,CURR_CODE(old),CURR_CODE(young),CURR_CODE Diff,COUNT()(old),COUNT()(young),COUNT(*) Diff,LCA_TOT_NRA(old),LCA_TOT_NRA(young),LCA_TOT_NRA Diff,DEAL_TERM_NRA(old),DEAL_TERM_NRA(young),DEAL_TERM_NRA Diff,LCA_NRA_MSMNT(old),LCA_NRA_MSMNT(young),LCA_NRA_MSMNT Diff,LCA_AVG_NNN_EFF_RENT(old),LCA_AVG_NNN_EFF_RENT(young),LCA_AVG_NNN_EFF_RENT Diff,LCA_PRIOR_AVG_NNN_EFF_RENT(old),LCA_PRIOR_AVG_NNN_EFF_RENT(young),LCA_PRIOR_AVG_NNN_EFF_RENT Diff,LCA_PRPS_TI_ALW_AMT(old),LCA_PRPS_TI_ALW_AMT(young),LCA_PRPS_TI_ALW_AMT Diff,LCA_PRPS_COMM_AMT(old),LCA_PRPS_COMM_AMT(young),LCA_PRPS_COMM_AMT Diff,LCA_PRPS_LGL_FEES_AMT(old),LCA_PRPS_LGL_FEES_AMT(young),LCA_PRPS_LGL_FEES_AMT Diff,LCA_WALT(old),LCA_WALT(young),LCA_WALT Diff
"-220121003laxcs101","-2",-,-,2012-10-03,-,-,"laxcs101",-,-,"USD",-,-,1,-,-,0,-,-,0,-,-,0,-,-,0,-,-,0,-,-,0,-,-,0,-,-,0,-,-,460,-,-
"-420121003laxcs101","-4",-,-,2012-10-03,-,-,"laxcs101",-,-,"USD",-,-,1,-,-,0,-,-,0,-,-,0,-,-,0,-,-,0,-,-,0,-,-,0,-,-,0,-,-,460,-,-
".com20130517cnj00305",".com",".com",ERR,2013-05-17,2013-05-17,ERR,"cnj00305","cnj00305",ERR,"USD","USD",ERR,1,1,0.0,400973.9617,400973.9617,0.0,400973.9617,400973.9617,0.0,400973.9617,400973.9617,0.0,5.98,5.98,0.0,5.45,5.45,0.0,0,0,0.0,899685.44,899685.44,0.0,0,0,0.0,90,90,0.0
"0100010020140725dal03001","01000100","01000100",ERR,2014-07-25,2014-07-25,ERR,"dal03001","dal03001",ERR,"USD","USD",ERR,1,1,0.0,492499.788,492499.788,0.0,492499.788,492499.788,0.0,492499.788,492499.788,0.0,4,4,0.0,4,4,0.0,0,0,0.0,88650.02,88650.02,0.0,0,0,0.0,12,12,0.0
"0100026520140925elp00124","01000265","01000265",ERR,2014-09-25,2014-09-25,ERR,"elp00124","elp00124",ERR,"USD","USD",ERR,1,1,0.0,239131,239131,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0
"0100027020140530aus00107","01000270","01000270",ERR,2014-05-30,2014-05-30,ERR,"aus00107","aus00107",ERR,"USD","USD",ERR,1,1,0.0,57599.9752,57599.9752,0.0,57599.9752,57599.9752,0.0,57599.9752,57599.9752,0.0,5.63,5.63,0.0,5.63,5.63,0.0,0,0,0.0,3241.04,3241.04,0.0,0,0,0.0,3,3,0.0
"0100027020140903aus00107","01000270","01000270",ERR,2014-09-03,2014-09-03,ERR,"aus00107","aus00107",ERR,"USD","USD",ERR,1,1,0.0,57600,57600,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0
"0100031220140723hou00603","01000312","01000312",ERR,2014-07-23,2014-07-23,ERR,"hou00603","hou00603",ERR,"USD","USD",ERR,1,1,0.0,7640,7640,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0,0,0,0.0

Discussion

  • xresch

    xresch - 2015-05-15

    Hi WWS,

    this are only warnings and will occur when strings are compared as numbers. By default CSVComparator will calculate the difference in percentage, you can change this behavior by giving the following arguments, then all the columns will be compared as strings resulting in EQ=equals or NOTEQ= not equals:

    -result.comparediff%=false
    -result.comparestring=true
    

    Or you can specify a custom comparison as described in the documentation under section "3.3.4 Do Manual Comparison by specifying -column.compareDef".

    The easiest way to do a custom configuration is to use the GUI and save the settings from the GUI as a configuration file which you can pass to the .jar-File:

    java -jar CSVComparator.jar –config.file="./examples/_example_config_file.dat"
    
     
  • xresch

    xresch - 2016-03-05
    • status: open --> closed
    • assigned_to: xresch
     

Log in to post a comment.

MongoDB Logo MongoDB