elasticsearch icon indicating copy to clipboard operation
elasticsearch copied to clipboard

Abstract `RowInTable` logic

Open nik9000 opened this issue 9 months ago • 1 comments

This moves the logic for finding the offset in a table that we will use in LOOKUP from a method on BlockHash and some complex building logic in HashLookupOperator. Now it's in an RowInTable interface - both a static builder method and some implementations.

There are three implementations:

  1. One that talks to BlockHash just like HashLookupOperator used to. Right now it talks to PackedValuesBlockHash because it's the only one who's lookup method returns the offset in the original row, but we'll fix it eventually.
  2. A RowInTable that works with increasing sequences of integers, say, 1, 2, 3, 4, 5 - this is fairly simple - it just checks that the input is between 1 and 5 and, if it is, subtracts 1. Easy. Obvious. And very very fast. Simple. Good simple example.
  3. An RowInTable that handles empty tables - this just makes writing the rest of the code simpler. It always returns null.

nik9000 avatar May 15 '24 20:05 nik9000

Pinging @elastic/es-analytical-engine (Team:Analytics)

elasticsearchmachine avatar May 15 '24 20:05 elasticsearchmachine