Definition at line 63 of file mainTable.cpp. References Impala::Util::Database::GetInstance(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), ILOG_INFO, ILOG_VAR, and Impala::Core::Table::Read(). 00064 { 00065 typedef Core::Column::ColumnTem<ColElemT> ColumnType; 00066 typedef Core::Table::TableTem<ColumnType> TableType; 00067 00068 ILOG_VAR(Impala.Application.Table.DoDiff); 00069 CmdOptions& options = CmdOptions::GetInstance(); 00070 Util::Database* db = &Util::Database::GetInstance(); 00071 TableType table1(0); 00072 Core::Table::Read(&table1, fName1, db); 00073 TableType table2(0); 00074 Core::Table::Read(&table2, fName2, db); 00075 if (table1.Size() != table2.Size()) 00076 { 00077 ILOG_INFO("Different table sizes: " << table1.Size() << " vs " 00078 << table2.Size()); 00079 return; 00080 } 00081 int verb = options.GetInt("verb"); 00082 int nDiff = 0; 00083 for (int i=0 ; i<table1.Size() ; i++) 00084 { 00085 //if (table1.Get1(i) != table2.Get1(i)) 00086 if ((table1.Get1(i) - table2.Get1(i)) > 0.00001) 00087 { 00088 nDiff++; 00089 if (verb) 00090 ILOG_INFO("diff elem " << i << ": " << table1.Get1(i) 00091 << " vs " << table2.Get1(i)); 00092 } 00093 } 00094 if (nDiff > 0) 00095 ILOG_INFO("Found " << nDiff << " differences"); 00096 }
Here is the call graph for this function:
|