Skip to content

Conversation

@devavret
Copy link

@devavret devavret commented Oct 14, 2025

This is a copy of the upstream PR facebookincubator#15145 but rebased on merged-prs for testing. Compared to upstream, it contains additional changes for supporting operations that we support in merged-prs but not yet upstreamed like Function objects for startswith, endswith and contains.

@devavret devavret force-pushed the expr-eval-merged-prs branch from 1cb838f to 2f0d5af Compare October 14, 2025 17:57
@copy-pr-bot
Copy link

copy-pr-bot bot commented Oct 24, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@devavret devavret changed the base branch from merged-prs to velox-cudf October 24, 2025 10:40
@devavret devavret changed the base branch from velox-cudf to merged-prs October 24, 2025 10:40
@devavret devavret force-pushed the expr-eval-merged-prs branch from db11495 to ffab074 Compare October 24, 2025 10:45
devavret and others added 2 commits October 28, 2025 19:57
Summary:
Pull Request resolved: facebookincubator#15308

Removed the existing `resolveAggregateFunction` API that returned both result and intermediate types as a pair in favor of the new split APIs:
- `resolveResultType`: Returns only the final type
- `resolveIntermediateType`: Returns only the intermediate type

Reviewed By: peterenescu

Differential Revision: D85456269

fbshipit-source-id: f8497e82cfed5abda2c274a6e261bf79dd14cb54
devavret and others added 20 commits October 29, 2025 08:38
…15208)

Summary:
With the upgrade to Apple CLang clang-1700.3.19.1
the missing std namespace for mutex and unique_lock can be encountered when building Velox.

Pull Request resolved: facebookincubator#15208

Reviewed By: mbasmanova

Differential Revision: D85700160

Pulled By: kevinwilfong

fbshipit-source-id: 5e0fbe601d00210e5bc3979251f3789015c5e58e
Summary:
re2 works better, we will also decrease binary size and count of dependencies

First commit inspired by this PR facebookincubator#15124

Pull Request resolved: facebookincubator#15134

Reviewed By: kgpai

Differential Revision: D85479675

Pulled By: kevinwilfong

fbshipit-source-id: e5534aad5c8843ef707ab3b5d55925c3bca6f7cb
Summary:
Pull Request resolved: facebookincubator#15064

14 usages per month, https://fburl.com/scuba/presto_queries/8khwewfq

Reviewed By: kgpai

Differential Revision: D83946088

fbshipit-source-id: 256cd7029ece09c6d269ef97f9ea6de33e8778ad
…ebookincubator#15246)

Summary:
Pull Request resolved: facebookincubator#15246

In many cases (e.g. ARRAY and MAP) type parameters are fixed size, we don't need dynamic allocation for this.  This is a visible memory cost when we have a lot of expressions.

Reviewed By: bikramSingh91

Differential Revision: D85052874

fbshipit-source-id: 9ff3a636b2adfacd78066aaa27860315b22f3711
Summary:
Design doc : https://docs.google.com/document/d/1WQfNigR9bVrbM-PqY7F0mswcetN_tdNahzD9ENye-Q0/edit?usp=sharing

facebookincubator#9404

e2e Presto PR (with changes in the Presto optimizer as well) prestodb/presto#24138

Latency for SF1K TPC-DS Q67 fell from 399s to 146s with this change.

Pull Request resolved: facebookincubator#14141

Reviewed By: pratikpugalia

Differential Revision: D85763891

Pulled By: kevinwilfong

fbshipit-source-id: 122bc6d60a4cfbf90c7921ebb1df28ef6edcc0a0
…okincubator#15269)

Summary:
Pull Request resolved: facebookincubator#15269

This diff adds support for casting from `varchar` to `time with timezone`. Also moved common logic for `varchar` to `time` to a common util.

Varchar formats supported for TIME WITH TIMEZONE include:

*   `H:m:s.SSS+HH:mm`, `H:m:s+HH:mm`, `H:m+HH:mm` (with colon-separated timezone)
*   `H:m:s.SSS+HHmm`, `H:m:s+HHmm`, `H:m+HHmm` (compact timezone format)
*   `H:m:s.SSS+HH`, `H:m:s+HH`, `H:m+HH` (hours-only timezone)
*   All formats support optional space before timezone (e.g., `14:30 +05:30`)

Also fixes Issue [facebookincubator#15256](facebookincubator#15256) as part of this to ensure that seconds becomes optional in parsing of time from varchar

Reviewed By: kgpai

Differential Revision: D85396888

fbshipit-source-id: 0190d02a2e02c8666aa6b1d99ba5e5df68e9b288
…ator#15242)

Summary:
Pull Request resolved: facebookincubator#15242

This diff adds support for casting TIME WITH TIMEZONE to TIME in Velox.

The code changes include adding test cases for casting TIME WITH TIME ZONE to TIME, and modifying the registration code to include the cast functions.

Reviewed By: kgpai

Differential Revision: D85202191

fbshipit-source-id: a8f5459003d79ef542b4319e041ef76bf393d2d9
…d read` (facebookincubator#15310)

Summary:
Pull Request resolved: facebookincubator#15310

This change revert's facebookincubator#12910 , as per [issue 15309](facebookincubator#15309) .

Reviewed By: Yuhta

Differential Revision: D85714403

fbshipit-source-id: aef78e83204dff80486d0526fd738b73a61011d0
Summary:
This PR adds CudfConfig settings to https://facebookincubator.github.io/velox/configs.html

This is a companion PR to facebookincubator#14865

Pull Request resolved: facebookincubator#15305

Reviewed By: pratikpugalia

Differential Revision: D85785583

Pulled By: kevinwilfong

fbshipit-source-id: ab9b621a0fa6d0169e3fdc2803cfc6a5ddea637b
Summary:
X-link: prestodb/presto#26414

 add more unit tests for expression

Pull Request resolved: facebookincubator#15264

Test Plan: unit tests passed

Reviewed By: bigfootjon, xiaoxmeng

Differential Revision: D85356832

Pulled By: ericyuliu

fbshipit-source-id: ed571b79c02ac3093f621903e91490530365ef8f
…e_t_cdf) (facebookincubator#15234)

Summary:
This change adds C++ support for Student's t distribution statistical functions to Velox, complementing the Java/Presto implementation in D85004073.

The t-distribution is commonly used in statistical hypothesis testing, particularly when dealing with small sample sizes or when the population standard deviation is unknown. These functions enable users to perform statistical analysis directly within SQL queries.

**Functions Added:**
- `t_cdf(df, value)`: Computes the cumulative probability P(N < value) for a given degrees of freedom (df) and value
- `inverse_t_cdf(df, p)`: Computes the inverse CDF (quantile function) for a given degrees of freedom and probability p

**Implementation Details:**
- Uses Boost.Math's `students_t_distribution` for accurate calculations
- Follows the same patterns as existing probability functions (chi-squared, F-distribution)
- Includes proper validation for input parameters (df must be positive, probability must be in [0, 1])

**Files Changed:**
1. `Probability.h`: Added TCDFFunction and InverseTCDFFunction template structs
2. `ProbabilityTrigonometricFunctionsRegistration.cpp`: Registered both functions
3. `ProbabilityTest.cpp`: Added comprehensive unit tests covering edge cases and error handling
4. `math.rst`: Updated documentation with function signatures and parameter descriptions

Pull Request resolved: facebookincubator#15234

Reviewed By: kagamiori, HeidiHan0000

Differential Revision: D85123230

Pulled By: talgalili

fbshipit-source-id: a0b478022486d82902da179ceb8a58f16aaa0815
…iver adapter stage but now we use the TypedExpr overload for that
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.