Apache Pinot Release 1.2.0
What Changed
This release comes with several Improvements and Bug Fixes for the Multistage Engine, Upserts and Compaction. There are a ton of other small features and general bug fixes.
Multistage Engine Improvements
Features
New Window Functions: LEAD, LAG, FIRST_VALUE, LAST_VALUE #12878 #13340
- LEAD allows you to access values after the current row in a frame.
- LAG allows you to access values before the current row in a frame.
- FIRST_VALUE and LAST_VALUE return the respective extremal values in the frame.
Support for Logical Database in V2 Engine #12591 #12695
- V2 Engine now supports a "database" construct, enabling table namespace isolation within the same Pinot cluster.
- Improves user experience when multiple users are using the same Pinot Cluster.
- Access control policies can be set at the database level.
- Database can be selected in a query using a SET statement, such as
SET database=my_db;.
Improved Multi-Value (MV) and Array Function Support
- Added array sum aggregation functions for point-wise array operations #13324.
- Added support for
valueInMV transform function #13443. - Fixed bug in numeric casts for MV columns in filters #13425.
- Fixed NPE in ArrayAgg when a column contains no data #13358.
- Fixed array literal handling #13345.
Support for WITHIN GROUP Clause and ListAgg #13146
WITHIN GROUPClause can be used to process rows in a given order within a group.- One of the most common use-cases for this is the
ListAggfunction, which when combined withWITHIN GROUPcan be used to concatenate strings in a given order.
Scalar/Transform Function and Set Operation Improvements
- Added Geospatial Scalar Function support for use in intermediate stage in the v2 query engine #13457.
- Fix 'WEEK' transform function #13483.
- Support
EXTRACTas a scalar function #13463. - Added support for ALL modifier for INTERSECT and EXCEPT Set Operations #13151 #13166.
Improved Literal Handling Support
- Fixed bug in handling literal arguments in aggregation functions like Percentile #13282.
- Allow INT and FLOAT literals #13078.
- Fixed literal handling for all types #13344 #13345.
- Fixed null literal handling for null intolerant functions #13255.
Metrics Improvements
- Added new metrics for tracking queries executed globally and at the table level #12982.
- New metrics to track join counts and window function counts #13032.
- Multiple meters and timers to track Multistage Engine Internals #13035.
Notable Improvements and Bug Fixes
- Improved Window operators resiliency, with new checks to make sure the window doesn't grow too large #13180 #13428 #13441.
- Optimized Group Key generation #12394.
- Fixed
SortedMailboxReceiveOperatorto honor convention of pulling at most 1 EOS block #12406. - Improvement in how execution stats are handled #12517 #12704 #13136.
- Use Protobuf instead of Reflection for Plan Serialization #13221.
Upsert Compaction and Minion Improvements
Features and Improvements
Minion Resource Isolation #12459 #12786
- Minions now support resource isolation based on an instance tag.
- Instance tag is configured at table level, and can be set for each task on a table.
- This enables you to implement arbitrary resource isolation strategies, i.e. you can use a set of Minion Nodes for running any set of tasks across any set of tables.
Greedy Upsert Compaction Scheduling #12461
- Upsert compaction now schedules segments for compaction based on the number of invalid docs.
- This helps the compaction task to handle arbitrary temporal distribution of invalid docs.
Notable Improvements
- Minions can now download segments from servers when deepstore copy is missing. This feature is enabled via a cluster level config
allowDownloadFromServer#12960 #13247. - Added support for TLS Port in Minions #12943.
- New metrics added for Minions to track segment/record processing information #12710.
Bug Fixes
- Minions can now handle invalid instance tags in Task Configs gracefully. Prior to this change, Minions would be stuck in
IN_PROGRESSstate until task timeout #13092. - Fix bug to return validDocIDsMetadata from all servers #12431.
- Upsert compaction doesn't retain maxLength information and trims string fields #13157.
Upsert Improvements
Features and Improvements
Consistent Table View for Upsert Tables #12976
- Adds different modes of consistency guarantees for Upsert tables.
- Adds a new UpsertConfig called
consistencyModewhich can be set toNONE, SYNC, SNAPSHOT. SYNCis optimized for data freshness but can lead to elevated query latencies and is best for low-qps use-cases. In this mode, the ingestion threads will take a WLock when updating validDocID bitmaps.SNAPSHOTmode can handle high-qps/high-ingestion use-cases by getting the list of valid docs from a snapshot of validDocID. The snapshot can be refreshed every few seconds and the tolerance can be set via a query optionupsertViewFreshnessMs.
Pluggable Partial Upsert Merger #11983
- Partial Upsert merges the old record and the new incoming record to generate the final ingested record.
- Pinot now allows users to customize how this merge of an old row and the new row is computed.
- This allows a column value in the new row to be an arbitrary function of the old and the new row.
Support for Uploading Externally Partitioned Segments for Upsert Backfill 13107
- Segments uploaded for Upsert Backfill can now explicitly specify the Kafka partition they belong to.
- This enables backfilling an Upsert table where the externally generated segments are partitioned using an arbitrary hash function on an arbitrary primary key.
Misc Improvements and Bug Fixes
- Fixed a Bug in Handling Equal Comparison Column Values in Upsert, which could lead to data inconsistency (#12395)
- Upsert snapshot will now snapshot only those segments which have updates. #13285.
Notable Features
JSON Support Improvements
- JSON Index can now be used for evaluating Regex and Range Predicates. #12568
jsonExtractIndexnow supports contextual array filters. #12683 #12531.- JSON column type now supports filter predicates like
=,!=,INandNOT IN. This is convenient for scenarios where the JSON values are very small. #13283. JSON_MATCHnow supports exclusive predicates correctly. For instance, you can use predicates such asJSON_MATCH(person, '"$.addresses[*].country" != ''us'''to find all people who have at least one address that is not in the US. #13139.jsonExtractIndexsupports extracting Multi-Value JSON Fields, and also supports providing any default value when the key doesn't exist. #12748.- Added
isJsonUDF which increases your options to handle invalid JSONs. This can be used in queries and for filtering invalid json column values in ingestion. #12603.
Lucene and Text Search Improvements
- Improved Segment Build Time for Lucene Text Index by 40-60%. This improvement is realized when a consuming segment commits and changes to an
ImmutableSegment. This significantly helps in lowering ingestion lag at commit time due to a large text index #12744 #13094 #13050. - Phrase Search can run 3x faster when the Lucene Index Config
enablePrefixSuffixMatchingInPhraseQueriesis set totrue. This is achieved by rewriting phrase search query to a wildcard and prefix matching query #12680. - Fixed bug in
TextMatchFilterOptimizerthat was not applying precedence to the filter expressions properly, which could lead to incorrect results. #13009. - Fixed bug in handling
NOT text_matchwhich could have returned incorrect results. #12372. - Added
SchemaConformingTranformerV2to enhance text search abilities. #12788. - Added metrics to track Lucene NRT Refresh Delay .
New Funnel Functions #13176 #13231 #13228
- Added
funnelMaxStepfunction which can be used to calculate max funnel steps for a given sliding window . - Added
funnelCompleteCountto calculate the number of completed funnels, andfunnelMatchStepto get the funnel match array.
Support for Interning for OnHeapByteDictionary #12342
- This can reduce the heap usage of a dictionary encoded byte column, for a certain distribution of duplicate values. See #12223 for details.
Column Major Builder On By Default for New Tables #12770
- Prior to this feature, on a segment commit, Pinot would convert all the columnar data from the Mutable Segment to row-major, and then re-build column major Immutable Segments.
- This feature skips the row-major conversion and is expected to be both space and time efficient.
- It can help lower ingestion lag from segment commits, especially helpful when your segments are large.
Support for SQL Formatting in Query Editor #11725
- You can now prettify SQL right in the Controller UI!
Hash Function for UUID Primary Keys #12538
- Added a new lossless hash-function for Upsert Primary Keys optimized for UUIDs.
- The hash function can reduce Old Gen by up to 30%.
- It maps a UUID to a 16 byte array, vs encoding it in a UTF string which would take 36 bytes.
Column Level Index Skip Query Option #12414
- Convenient for debugging impact of indexes on query performance or results.
- You can add the
skipIndexesoption to your query to skip any number of indexes. e.g.SET skipIndexes=inverted,range;
New UDFs and Scalar Functions
- New GeoHash functions:
encodeGeoHash,decodeGeoHash,decodeGeoHashLatitudeanddecodeGeoHashLongitude. dateBincan be used to align a timestamp to the nearest time bucket.prefixes,suffixesanduniqueNgramsUDFs for generating all respective string subsequences from a string input. #12392.- Added
isJsonUDF which increases your options to handle invalid JSONs. This can be used in queries and for filtering invalid json column values in ingestion. #12603. splitPartUDF has minor improvements. #12437.
CLP Compression Codec in Forward Indexes #12504
- CLP is a compressed log processor which has really high compression ratio for certain log types.
- To enable this, you can set the
compressionCodecin thefieldConfigListof the column you want to target.
Misc. Improvements
-
Enable segment preloading at partition level #12451.
-
Use Temurin instead of AdoptOpenJdk #12533
-
Adding record reader config/context param to record transformer #12520
-
Removing legacy commons-lang dependency #13480
-
12508: Feature add segment rows flush config #12681
-
ADSS Race Condition and update to client error codes #13104
-
Add ExceptionMapper to convert Exception to Response Object for Broker REST API's #13292
-
Add FunnelMaxStepAggregationFunction and FunnelCompleteCountAggregationFunction #13231
Bug Fixes
- Use gte(lte) to replace between() which has a bug #12595
- Fix the ConcurrentModificationException for And/Or DocIdSet #12611
- Upgrade RoaringBitmap to 1.0.5 to pick up the fix for RangeBitmap.between() #12604
- bugfix: do not move src ByteBuffer position for LZ4 length prefixed decompress #12539
- Bug Fix createDictionaryForColumn does not take into account inverted index #13048
- fix Cluster Manager error #12632
- fix for quick start Cluster Manager issue #12610
- Adding config for having suffix for client ID for realtime consumer #13168
- Addressed comments and fixed tests from pull request 12389. /uptime and /start-time endpoints working all components