Add Date type to InPredicate#4794
Conversation
✅ Deploy Preview for meta-velox canceled.
|
99b89d9 to
0559610
Compare
|
@kgpai It seems the changes in the PR #4461 misreport the signature changes. My PR adds a new signature and does not update the existing ones so the signature test should pass but it fails instead: https://app.circleci.com/pipelines/github/facebookincubator/velox/24232/workflows/cba6d1ef-e3ac-4fc9-a9f2-8c414a6a61e7/jobs/153843. Can you have a look and follow up on this? Is there a way to override the failure? |
|
@kgpai Krishna, would you help take a look? |
|
Hi @isadikov , The error says that in has two implementations for (date, array(date)-> boolean . Going through your PR to see if thats the case. |
|
Give me a few hours to replicate this problem locally so I can debug this problem. |
|
I see these signatures on CircleCI for "(date,array(date)) -> boolean" is both at start and end , however I dint see this when I built this locally on my mac. |
|
I have identified the problem, I will send a PR asap which after landing you can rebase against to fix this. |
|
Great, thanks! |
Summary: We need to namespace signatures that are imported so that we can differentiate between spark and presto signatures. Currently PR: #4794 has a problem where it considers the spark and presto signature for dates in `in predicate` to be similar. Pull Request resolved: #4883 Reviewed By: Yuhta Differential Revision: D45705225 Pulled By: kgpai fbshipit-source-id: 6392943e6af3fe9acfdb6cc3d1b911266e4d633a
|
@isadikov Can you rebase against main and retry ? |
|
Yes, I will rebase, thanks for fixing the issue! |
4e24e59 to
08331dc
Compare
66d33a0 to
b7d0a39
Compare
7eb5676 to
e533fca
Compare
|
@mbasmanova Could you review this PR? Thanks! |
| VELOX_USER_CHECK( | ||
| !values.empty(), | ||
| "IN predicate expects at least one non-null value in the in-list"); | ||
| if (values.size() == 1) { |
There was a problem hiding this comment.
This is already handled in createBigintValues
There was a problem hiding this comment.
Sure, I removed this part.
|
@Yuhta I addressed your comments, could you review this PR? Thanks. |
3fa1498 to
9b78a5f
Compare
|
@Yuhta Could you review this PR again? Thanks. |
|
@Yuhta Would you be able to take another look at the PR? Thanks. |
|
We probably need to hold on this one until #5015 is merged |
|
@Yuhta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
| ExpressionType::VALUE_CONSTANT) { | ||
| auto constExpr = | ||
| dynamic_cast<ConstantExpression*>(castExpr->child.get()); | ||
| auto value = |
There was a problem hiding this comment.
Please check constExpr is non-null before de-referencing it in the next line. We should ensure that cast is not over any other expression here.
Summary: We need to namespace signatures that are imported so that we can differentiate between spark and presto signatures. Currently PR: facebookincubator#4794 has a problem where it considers the spark and presto signature for dates in `in predicate` to be similar. Pull Request resolved: facebookincubator#4883 Reviewed By: Yuhta Differential Revision: D45705225 Pulled By: kgpai fbshipit-source-id: 6392943e6af3fe9acfdb6cc3d1b911266e4d633a
This PR adds support for Date types in
InPredicateexpression.This allows to run queries like this:
Without this patch, the query above would fail with
Note: the fix itself is very small, most of the code changes are for unit tests because DuckDB test code did not handle date literals.