1.1.0

Release Notes for version 1.1.0

Summary

This release comes with several features, SQL /UI/Perf enhancements Bugfixes across areas ranging from Multistage Query Engine to Ingestion, Storage format, SQL support, etc.

Multi-stage Query Engine

Features

Support RelDistribution-based trait Planning (#11976arrow-up-right, #12079arrow-up-right)

  • Adds support for RelDistribution optimization for more accurate leaf-stage direct exchange/shuffle. Also extends partition optimization beyond leaf stage to entire query plan.

  • Applies optimization based on distribution trait in the mailbox/worker assignment stage

    • Fixes previous direct exchange which was decided based on the table partition hint. Now direct exchange is decided via distribution trait: it will applied if-and-only-if the trait propagated matches the exchange requirement.

    • As a side effect, is_colocated_by_join_keysquery option is reintroduced to ensure dynamic broadcast which can also benefit from direct exchange optimization

    • Allows propagation of partition distribution trait info across the tree to be used during Physical Planning phase. It can be used in the following scenarios (will follow up in separate PRs)

  • Note on backward incompatbility

    • is_colocated_by_join_keys hint is now required for making colocated joins

      • it should only affect semi-join b/c it is the only one utilizing broadcast exchange but were pulled to act as direct exchange.

      • inner/left/right/full join should automatically apply colocation thus the backward incompatibility should not affect these.

Leaf stage planning with multi-semi join support (#11937arrow-up-right)

  • Solves the limitation of pinotQuery that supports limited amount of PlanNodes.

  • Splits the ServerRequest planning into 2 stages

    • First plan as much as possible into PinotQuery

    • for any remainder nodes that cannot be planned into PinotQuery, will be run together with the LeafStageTransferrableBlockOperator as the input locally.

Support for ArrayAgg aggregation function (#11822arrow-up-right)

  • Usage: ArrayAgg(column, 'dataType' [, 'isDistinct'])

  • Float type column is treated as Double in the multistage engine, so FLOAT type is not supported.

  • Supports data BOOLEAN, INT, LONG, FLOAT(only in V1), DOUBLE, STRING, TIMESTAMP. E.g. ArrayAgg(intCol, 'INT') returns ARRAY<INT>

Enhancements

  • Canonicalize SqlKind.OTHERS and SqlKind.OTHER_FUNCTIONS and support

    concat as || operator (#12025arrow-up-right)

  • Capability for constant filter in QueryContext, with support for server to handle it (#11956arrow-up-right)

  • Tests for filter pushdown (#11994arrow-up-right)

  • Enhancements to query plan tests (#11966arrow-up-right)

  • Refactor PlanFragmenter to make the logic clear (#11912arrow-up-right)

  • Observability enhancements to emit metrics for grpc request and multi-stage leaf stage (#11838arrow-up-right)

    • pinot.server.query.log.maxRatePerSecond: query log max rate (QPS, default 10K)

    • pinot.server.query.log.droppedReportMaxRatePerSecond: dropped query log report max rate (QPS, default 1)

  • Security enhancement to add RBAC authorization checks for multi-stage query engine (#11830arrow-up-right)

  • Enhancement to leaf-stage execution stats NPE handling (#11805arrow-up-right)

  • Enhancement to add a framework to back-propagate metadata across opChains (#11746arrow-up-right)

  • Use of BinaryArray to wire proto for multi-stage engine bytes literal handling (#11738arrow-up-right)

  • Enable dynamic broadcast for SEMI joins. Adds a fallback option to enable hash table join using joinOptions(join_strategy = 'hash_table')(#11696arrow-up-right)

  • Improvements to dispatch exception handling (#11688arrow-up-right)

  • Allow malformed dateTime string to return default value configurable in the function signature (#11258arrow-up-right)

  • Improvement in multi-stage aggregation to directly store column index as identifier (#11617arrow-up-right)

  • Perf optimization to avoid unnecessary rows conversion in aggregation (#11607arrow-up-right)

  • Enhance SegmentPartitionMetadataManager to handle new segment (#11585arrow-up-right)

  • Optimize mailbox info in query plan to reduce memory footprint (#12382arrow-up-right)

    • This PR changes the proto object structure, which will cause backward incompatibility when broker and server are running different version.

  • Optimizations to query plan serialization (#12370arrow-up-right)

  • Optimization for parallel execution of Ser/de stage plan (#12363arrow-up-right)

  • Optimizations in query dispatch (#12358arrow-up-right)

  • Perf optimization for group-by and join for single key scenario (#11630arrow-up-right)

Bugfixes, Refactoring, Cleanups, Tests

Notable Features

Server-level throttling for realtime consumption (#12292arrow-up-right)

  • Use server config pinot.server.consumption.rate.limit to enable this feature

  • Server rate limiter is disabled by default (default value 0)

Reduce segment generation disk footprint for Minion Tasks (#12220arrow-up-right)

  • Supported in MergeRollupTask and RealtimeToOfflineSegmentsTask minion tasks

  • Use taskConfig segmentMapperFileSizeThresholdInBytes to specify the threshold size

Support for swapping of TLS keystore/truststore (#12277arrow-up-right, #12325arrow-up-right)

  • Security feature that makes the keystore/truststore swappable.

  • Auto-reloads keystore/truststore (without need for a restart) if they are local files

Sticky Query Routing (#12276arrow-up-right)

  • Adds support for deterministic and sticky routing for a query / table / broker. This setting would lead to same server / set of servers (for MultiStageReplicaGroupSelector) being used for all queries of a given table.

  • Query option (takes precedence over fixed routing setting at table / broker config level) SET "useFixedReplica"=true;

  • Table config (takes precedence over fixed routing setting at broker config level)

  • Broker conf - pinot.broker.use.fixed.replica=true

Table Config to disallow duplicate primary key for dimension tables (#12290arrow-up-right)

  • Use tableConfig dimensionTableConfig.errorOnDuplicatePrimaryKey=true to enable this behavior

  • Disabled by default

Partition-Level ForceCommit for realtime tables (#12088arrow-up-right)

  • Support to force-commit specific partitions of a realtime table.

  • Partitions can be specified to the forceCommit API as a comma separated list of partition names or consuming segment names

Support initializing broker tags from config (#12175arrow-up-right)

  • Support to give the broker initial tags on startup.

  • Automatically updates brokerResource when broker joins the cluster for the first time

  • Broker tags are provided as comma-separated values in pinot.broker.instance.tags

Support for StreamNative OAuth2 authentication for pulsar (#12068arrow-up-right)

Introduce low disk mode to table rebalance (#12072arrow-up-right)

  • Introduces a new table rebalance boolean config lowDiskMode.Default value is false.

  • Applicable for rebalance with downtime=false.

  • When enabled, segments will first be offloaded from servers, then added to servers after offload is done. It may increase the total time of the rebalance, but can be useful when servers are low on disk space, and we want to scale up the cluster and rebalance the table to more servers.

  • #12112arrow-up-right adds the UI capability to toggle this option

Support Vector index and Hierarchical Navigable Small Worlds (HNSW) (#11977arrow-up-right)

  • Supports Vector Index on float array/multi-value columnz

  • Add predicate and function to retrieve topK closest vector. Example query

  • The function VectorSimilarity will return a double value where the first parameter is the embedding column and the second parameter is the search term embedding literal.

  • Since VectorSimilarity is a predicate, once config the topK, this predicate will return topk rows per segment. Then if you are using this index with other predicate, you may not get expected number of rows since the records matching other predicate might not in the topk rows.

Support for retention on deleted keys of upsert tables (#12037arrow-up-right)

  • Adds an upsert config deletedKeysTTL which will remove deleted keys from in-memory hashmap and mark the validDocID as invalid after the deletedKeysTTL threshold period.

  • Disabled by default. Enabled only if a valid value for deletedKeysTTL is set

  • More details in the design documentarrow-up-right

Configurable Lucene analyzer (#12027arrow-up-right)

  • Introduces the capability to specify a custom Lucene analyzer used by text index for indexing and search on an individual column basis.

  • Sample usage

  • Default Behavior falls back to using the standardAnalyzer unless the luceneAnalyzerClass property is specified.

Support for murmur3 as a partition function (#12049arrow-up-right)

  • Murmur3 support with optional fields seed and variant for the hash in functionConfig field of columnPartitionMap.Default value for seed is 0.

  • Added support for 2 variants of Murmur3: x86_32 and x64_32 configurable using the variant field in functionConfig. If no variant is provided we choose to keep the x86_32 variant as it was part of the original implementation.

  • Examples of functionConfig;

    Here there is no functionConfig configured, so the seed value will be 0 and variant will be x86_32.

    Here the seed is configured as 9001 but as no variant is provided, x86_32 will be picked up.

    Here the variant is mentioned so Murmur3 will use the x64_32 variant with 9001 as seed.

  • Note on users using Debezium and Murmur3 as partitioning function :

    • The partitioning key should be set up on either of byte[], String or long[] columns.

    • On pinot variant should be set as x64_32 and seed should be set as 9001.

New optimized MV forward index to only store unique MV values

  • Adds new MV dictionary encoded forward index format that only stores the unique MV entries.

  • This new index format can significantly reduce the index size when the MV entries repeat a lot

  • The new index format can be enabled during index creation, derived column creation, and segment reload

  • To enable the new index format, set the compression codec in the FieldConfig:

    Or use the new index JSON:

Support for explicit null handling modes (#11960arrow-up-right)

  • Adds support for 2 possible ways to handle null:

    • Table mode - which already exists

    • Column mode, which means that each column specifies its own nullability in the FieldSpec

  • Column mode can be enabled by the below config.

  • The default value for enableColumnBasedNullHandling is false. When set to true, Pinot will ignore TableConfig.IndexingConfig.nullHandlingEnabled and columns will be nullable if and only if FieldSpec.notNull is false, which is also the default value.

Support tracking out of order events in Upsert (#11877arrow-up-right)

  • Adds a new upsert config outOfOrderRecordColumn

  • When set to a non-null value, we check whether an event is OOO or not and then accordingly update the corresponding column value to true / false.

  • This will help in tracking which event is out-of-order while using skipUpsert

Compression configuration support for aggregationConfigs to StartreeIndexConfigs (#11744arrow-up-right)

  • Can be used to save space. For eg: when a functionColumnPairs has a output type of bytes, such as when you use distinctcountrawhll.

  • Sample config

Preconfiguration based mirror instance assignment (#11578arrow-up-right)

  • Supports instance assignment based pre-configured instance assignment map.

  • The assignment will always respect the mirrored servers in the pre-configured map

  • More details herearrow-up-right

  • Sample table config

Support for Listing Dimension Tables (#11859arrow-up-right)

  • Adds dimension as a valid option to table "type" in the /tables controller API

Support in upsert for dropping out of order events (#11811arrow-up-right)

  • This patch adds a new config for upsert: dropOutOfOrderRecord

  • If set to true, pinot doesn't persist out-of-order events in the segment.

  • This feature is useful to

    • Save disk-usage

    • Avoid any confusion when using skipUpsert for partial-upsert tables as nulls start showing up for columns where a previous non-null was encountered and we don't know if it's an out-of-order event or not.

Support to retry failed table rebalance tasks (#11740arrow-up-right)

  • New configs for the RebalanceChecker periodic task:

    • controller.rebalance.checker.frequencyPeriod: 5min by default ; -1 to disable

    • controller.rebalanceChecker.initialDelayInSeconds: 2min+ by default

  • New configs added for RebalanceConfig:

    • heartbeatIntervalInMs: 300_000 i.e. 5min

    • heartbeatTimeoutInMs: 3600_000 i.e. 1hr

    • maxAttempts: 3 by default, i.e. the original run plus two retries

    • retryInitialDelayInMs: 300_000 i.e. 5min, for exponential backoff w/ jitters

  • New metrics to monitor rebalance and its retries:

    • TABLE_REBALANCE_FAILURE("TableRebalanceFailure", false), emit from TableRebalancer.rebalanceTable()

    • TABLE_REBALANCE_EXECUTION_TIME_MS("tableRebalanceExecutionTimeMs", false), emit from TableRebalancer.rebalanceTable()

    • TABLE_REBALANCE_FAILURE_DETECTED("TableRebalanceFailureDetected", false), emit from RebalanceChecker

    • TABLE_REBALANCE_RETRY("TableRebalanceRetry", false), emit from RebalanceChecker

  • New restful API

    • DELETE /tables/{tableName}/rebalance API to stop rebalance. In comparison, POST /tables/{tableName}/rebalance was used to start one.

Support for UltraLogLog (#11835arrow-up-right)

  • UltraLogLog aggregations for Count Distinct (distinctCountULL and distinctCountRawULL)

  • UltraLogLog creation via Transform Function

  • UltraLogLog merging in MergeRollup

  • Support for UltraLogLog in Star-Tree indexes

Support for Apache Datasketches CPC sketch (#11774arrow-up-right)

  • Ingestion via transformation function

  • Extracting estimates via query aggregation functions

  • Segment rollup aggregation

  • StarTree aggregation

Support to reduce DirectMemory OOM chances on broker (#11710arrow-up-right)

  • Broadly there are two configs that will enable this feature:

    • maxServerResponseSizeBytes: Maximum serialized response size across all servers for a query. This value is equally divided across all servers processing the query.

    • maxQueryResponseSizeBytes: Maximum length of the serialized response per server for a query

  • Configs are available as queryOption, tableConfig and Broker config. The priority of enforcement is as follows:

UI Support to Allow schema to be created with JSON config (#11809arrow-up-right)

  • This is helpful when user has the entire JSON handy

  • UI still keeps Form Way to add Schema along with JSON view

Support in JSON index for ignoring values longer than a given length (#11604arrow-up-right)

  • Use option maxValueLength in jsonIndexConfig to restrict length of values

  • A value of 0 (or when the key is omitted) means there is no restriction

Support for MultiValue VarByte V4 index writer (#11674arrow-up-right)

  • Supports serializing and writing MV columns in VarByteChunkForwardIndexWriterV4

  • Supports V4 reader that can be used to read SV var length, MV fixed length and MV var length buffers encoded with V4 writer

Improved scalar function support for Multivalue columns(#11555arrow-up-right, #11654arrow-up-right)

Support for FrequentStringsSketch and FrequentLonsSketch aggregation functions (#11098arrow-up-right)

  • Approximation aggregation functions for estimating the frequencies of items a dataset in a memory efficient way. More details in Apache Datasketchesarrow-up-right library.

Controller API for Table Indexe (#11576arrow-up-right)

  • Table index api to get the aggregate index details of all segments for a table.

    • URL/tables/{tableName}/indexes

  • Response format

Support for configurable rebalance delay at lead controller (#11509arrow-up-right)

  • The lead controller rebalance delay is now configurable with controller.resource.rebalance.delay_ms

  • Changing rebalance configurations will now update the lead controller resource

Support for configuration through environment variables (#12307arrow-up-right)

  • Adds support for Pinot configuration through ENV variables with Dynamic mapping.

  • More details in issue: #10651arrow-up-right

  • Sample configs through ENV

Add hyperLogLogPlus aggregation function for distinct count (#11346arrow-up-right)

  • HLL++ has higher accuracy than HLL when cardinality of dimension is at 10k-100k.

  • More details herearrow-up-right

Support for clpMatch

  • Adds query rewriting logic to transform a "virtual" UDF, clpMatch, into a boolean expression on the columns of a CLP-encoded field.

  • To use the rewriter, modify broker config to add org.apache.pinot.sql.parsers.rewriter.ClpRewriter to pinot.broker.query.rewriter.class.names.

Support for DATETIMECONVERTWINDOWHOP function (#11773arrow-up-right)

Support for JSON_EXTRACT_INDEX transform function to leverage json index for json value extraction (#11739arrow-up-right)

Support for ArrayAgg aggregation function (#11822arrow-up-right)

GenerateData command support for generating data in JSON format (#11778arrow-up-right)

Enhancements

SQL

UI

Misc

Bugfixes, Refactoring, Cleanups, Deprecations

Backward incompatible Changes

  • Fix a race condition for upsert compaction (#12346arrow-up-right). Notes on backward incompatibility below:

    • This PR is introducing backward incompatibility for UpsertCompactionTask. Previously, we allowed to configure the compaction task without the snapshot enabled. We found that using in-memory based validDocIds is a bit dangerous as it will not give us the consistency (e.g. fetching validDocIds bitmap while the server is restarting & updating validDocIds).

      We now enforce the enableSnapshot=true for UpsertCompactionTask if the advanced customer wants to run the compaction with the in-memory validDocId bitmap.

      Also, we allow to configure invalidDocIdsType to UpsertCompactionTask for advanced user.

      1. snapshot: Default validDocIds type. This indicates that the validDocIds bitmap is loaded from the snapshot from the Pinot segment. UpsertConfig's enableSnapshot must be enabled for this type.

        1. onHeap: the validDocIds bitmap will be fetched from the server.

        2. onHeapWithDelete: the validDocIds bitmap will be fetched from the server. This will also take account into the deleted documents. UpsertConfig's deleteRecordColumn must be provided for this type.

  • Removal of the feature flag allow.table.name.with.database (#12402arrow-up-right)

  • Error handling to throw exception when schema name doesn't match table name during table creation (#11591arrow-up-right)

  • Fix type cast issue with dateTimeConvert scalar function (#11839arrow-up-right, #11971arrow-up-right)

  • Incompatible API fix to remove table state update operation in GET call (#11621arrow-up-right)

  • Use string to represent BigDecimal datatype in JSON response (#11716arrow-up-right)

  • Single quoted literal will not have its type auto-derived to maintain SQL compatibility (#11763arrow-up-right)

  • Changes to always use split commit on server and disables the option to disable it (#11680arrow-up-right, #11687arrow-up-right)

  • Change to not allow NaN as default value for Float and Double in Schemas (#11661arrow-up-right)

  • Code cleanup and refactor that removes TableDataManagerConfig (#12189arrow-up-right)

  • Fix partition handling for consistency of values between query and segment (#12115arrow-up-right)

  • Changes for migration to commons-configuration2 (#11985arrow-up-right)

  • Cleanup to simplify the upsert metadata manager constructor (#12120arrow-up-right)

  • Fixes typo in pom.xml (#11997arrow-up-right)

  • JDBC Driver fixes to support Jetbrains Intellij/Datagrip database tooling (#11814arrow-up-right)

  • Fix regression in ForwardIndexType for noDictionaryConfig and noDictionaryColumns (#11784arrow-up-right)

  • Separate pr test scripts and codecov (#11804arrow-up-right)

  • Bugfix to make reload status should only count online/consuming segments (#11787arrow-up-right)

  • Fix flaky TableViewsTest (#11770arrow-up-right)

  • Fix a flaky test (#11771arrow-up-right)

  • Cleanup to fee more disk for trivy job (#11780arrow-up-right)

  • Fix schema name in table config during controller startup (#11574arrow-up-right)

  • Prevent NPE when attempt to fetch partition information fails (#11769arrow-up-right)

  • Added UTs for null handling in CaseTransform function. (#11721arrow-up-right)

  • Bugfix to disallow peer download when replication is < 2 (#11469arrow-up-right)

  • Update s todocker image and github action scripts (#12378arrow-up-right)

  • Enhancements to queries test framework (#12215arrow-up-right)

Library Upgrades and dependencies

Last updated

Was this helpful?