Describe the enhancement requested
Following this discussion: https://github.com/apache/arrow/pull/34311/files#r1123635688
Currently certain invariants checks are done via if/else checks which has runtime cost/overhead. These can be changed to DCHECK because these are checking invariants that cannot be break by user behavior/data.
Component(s)
C++