[Feature] Unpack predicate boolean kernel bitmaps a byte at a time
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 74/100
Rechercherichtung
Beginne in src/paimon/common/utils/arrow/ und finde MultiLiteralsLeafFunction und NullFalseLeafBinaryFunction. Verfolge dann ihre bestehenden Bitmap-zu-Byte-Schleifen durch LeafFunction::Test. Füge den gemeinsamen Helper und einen Property-Test hinzu, der jeden Offset und jede Länge, beide Negationswerte und nicht an Byte-Grenzen ausgerichtete Gültigkeitszeiträume abdeckt. Als erledigt gilt, wenn der Helper mit der zeilenweisen Accessor-Referenz übereinstimmt und beide Aufrufer unveränderte Bytes zurückgeben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Search before asking
- I searched in the issues and found nothing similar.
Motivation
Two predicate leaf functions evaluate a batch by running an arrow::compute kernel and reading back the arrow::BooleanArray it writes: MultiLiteralsLeafFunction (IN / NOT IN, via IsIn) and NullFalseLeafBinaryFunction (the comparison functions). A kernel returns a bitmap, one bit per row, but LeafFunction::Test returns std::vector<char>, one byte per row, so both call sites spread the bits over bytes with the same per-row loop: test IsNull, read Value, apply the negation NOT IN needs, store a byte. That is a shift, a mask and a byte store per row, duplicated across the two call sites, on the selection path every filtered batch goes through.
Solution
Extract the spread into one helper, ArrowUtils::UnpackBooleansToBytes(array, negate), and read the bitmap a byte at a time instead of a bit at a time:
- A compile-time table maps each of the 256 bitmap bytes to the eight bytes it expands to, so the aligned body produces eight rows per iteration with one lookup and one 8-byte store.
- A scalar head and tail cover the rows sharing a partial leading or trailing byte, which is where the array offset is not byte-aligned; a batch a kernel has just written is aligned, so it takes the fast body throughout.
- The offset and the validity bitmap are honoured exactly as
BooleanArray::Value()andArray::IsValid()honour them, and a null row unpacks to 0 whatever the value bitmap holds for it, which is what bothIN/NOT INand everyNullFalseLeafBinaryFunctionrequire.
MultiLiteralsLeafFunction passes its negate through; NullFalseLeafBinaryFunction passes negate=false. The bytes each returns are unchanged.
Anything else?
A property test that asserts the helper equals a row-by-row reference through the very accessors it replaces, over every (offset, length) slice of a bitmap whose value and null periods are not multiples of eight and both negate values, pins the offset, validity and negate handling against the definitions it optimizes. No change to any header under include/paimon/, the storage format, or the protocol: ArrowUtils is an internal utility under src/paimon/common/utils/arrow/.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Vorherrschende Sprache
- C++
- Sterne
- 65
- Forks
- 29
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 73
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apache/paimon-cpp
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
apache/paimon-cpp#399 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Feature] dictionary encoded binary supportEvtl. vergeben @zhangweilst hat das vor 8 Tagen übernommen. Offenenhancement
apache/paimon-cpp#381 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Feature] Bypass manifest lists on exact snapshot live-entry cache hitsEvtl. vergeben @wangyong9999 hat das vor 8 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
apache/paimon-cpp#375 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Feature] Support vector and full-text search in File IndexEvtl. vergeben @zjw1111 hat das vor 8 Tagen übernommen. Offenenhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 45/100
apache/paimon-cpp#361 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Feature] Support 64-bit deletion vectors in Paimon C++Evtl. vergeben @lszskye hat das vor 8 Tagen übernommen. Offenenhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
apache/paimon-cpp#325 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in apache/paimon-cpp
Ähnliche Issues
-
component: split-view platform: windows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
zen-browser/desktop#15616 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/ysql kind/bug priority/medium status/awaiting-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
yugabyte/yugabyte-db#34415 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
WayfireWM/wayfire#3148 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
backend:DirectX
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
llvm/llvm-project#227530 ·
Maintainer antworten meist innerhalb von 1 Tag