template<class C>
Check whether column is sorted in ascending order.
Definition at line 19 of file IsSorted.h. References ILOG_ERROR, and ILOG_VAR. Referenced by Impala::Core::Table::QuidTable::UpdateGroups(). 00020 { 00021 ILOG_VAR(Impala.Core.Column.IsSortedAscending); 00022 if (col->Capacity() == 0) 00023 { 00024 // no warning in case of empty column 00025 return true; 00026 } 00027 if (nrElem > col->Capacity()) 00028 { 00029 ILOG_ERROR("nrElem larger than capacity"); 00030 return false; 00031 } 00032 for (int i=0 ; i<nrElem-1 ; i++) 00033 if (col->Get(i) > col->Get(i+1)) 00034 return false; 00035 return true; 00036 }
|