diff --git a/columnar/accessor/accessorint.cpp b/columnar/accessor/accessorint.cpp index 700c96f8..1a1e413a 100644 --- a/columnar/accessor/accessorint.cpp +++ b/columnar/accessor/accessorint.cpp @@ -542,7 +542,7 @@ class AnalyzerBlock_Int_Table_c : public AnalyzerBlock_c FORCE_INLINE bool SetupNextBlock ( const StoredBlock_Int_Table_T & tBlock, bool bEq ); template - FORCE_INLINE bool AllPassFilter ( const StoredBlock_Int_Table_T & tBlock ) const; + FORCE_INLINE bool AllPassFilter ( const StoredBlock_Int_Table_T & tBlock, bool bEq ) const; private: int m_iTableValueId = -1; @@ -714,19 +714,19 @@ bool AnalyzerBlock_Int_Table_c::SetupNextBlock ( const StoredBlock_Int_Table_T -bool AnalyzerBlock_Int_Table_c::AllPassFilter ( const StoredBlock_Int_Table_T & tBlock ) const +bool AnalyzerBlock_Int_Table_c::AllPassFilter ( const StoredBlock_Int_Table_T & tBlock, bool bEq ) const { switch ( m_eType ) { case FilterType_e::VALUES: if ( m_dValues.size()==1 ) { - if ( tBlock.GetTableSize()==1 && m_iTableValueId!=-1 ) + if ( tBlock.GetTableSize()==1 && ( ( m_iTableValueId!=-1 ) ^ ( !bEq ) ) ) return true; } else { - if ( m_dTableValues.size()==tBlock.GetTableSize() ) + if ( m_dTableValues.size()==tBlock.GetTableSize() && bEq ) return true; } break; @@ -1167,7 +1167,7 @@ bool Analyzer_INT_T::Mov case IntPacking_e::TABLE: bProcessBlock = m_tBlockTable.SetupNextBlock ( ACCESSOR::m_tBlockTable, !m_tSettings.m_bExclude ); - if ( bProcessBlock && m_tBlockTable.AllPassFilter ( ACCESSOR::m_tBlockTable ) ) + if ( bProcessBlock && m_tBlockTable.AllPassFilter ( ACCESSOR::m_tBlockTable, !m_tSettings.m_bExclude ) ) ePackingForProcessingFunc = IntPacking_e::CONST; break; @@ -1243,6 +1243,9 @@ Analyzer_i * CreateAnalyzerInt ( const AttributeHeader_i & tHeader, uint32_t uVe if ( tSettings.m_eType!=FilterType_e::VALUES && tSettings.m_eType!=FilterType_e::RANGE && tSettings.m_eType!=FilterType_e::FLOATRANGE ) return nullptr; + if ( ( tSettings.m_eType==FilterType_e::RANGE || tSettings.m_eType==FilterType_e::FLOATRANGE ) && tSettings.m_bExclude ) + return nullptr; + int iIndex = bHaveMatchingBlocks*16 + tSettings.m_bLeftClosed*8 + tSettings.m_bRightClosed*4 + tSettings.m_bLeftUnbounded*2 + tSettings.m_bRightUnbounded; switch ( iIndex ) {