Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Advance velox version #69

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

mxdzs0612
Copy link
Collaborator

note: still lead to error introduced by facebookincubator/velox#7018 and I've tried my best to deal with it but failed. @jikunshang

That will fail all aggregate functions, like

Error Source: USER
Error Code: INVALID_ARGUMENT
Reason: Aggregate function signature is not supported: presto.default.avg(ROW<"":DOUBLE,"":BIGINT>). Supported signatures: (smallint) -> row(double,bigint) -> double, (integer) -> row(double,bigint) -> double, (bigint) -> row(double,bigint) -> double, (double) -> row(double,bigint) -> double, (real) -> row(double,bigint) -> real, (DECIMAL(a_precision,a_scale)) -> varbinary -> DECIMAL(a_precision,a_scale).
Retriable: False
Function: intermediateType
File: ../velox/velox/exec/Aggregate.cpp
Line: 267
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_14VeloxUserErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4exec9Aggregate16intermediateTypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISt10shared_ptrIKNS0_4TypeEESaISF_EE
# 4  _ZN8facebook5velox4exec15HashAggregationC2EiPNS1_9DriverCtxERKSt10shared_ptrIKNS0_4core15AggregationNodeEE
# 5  _ZN8facebook5velox4exec13DriverFactory12createDriverESt10unique_ptrINS1_9DriverCtxESt14default_deleteIS4_EESt10shared_ptrINS1_14ExchangeClientEESt8functionIFiiEE
# 6  _ZN8facebook5velox4exec4Task19createDriversLockedERSt10shared_ptrIS2_EjRSt6vectorIS3_INS1_6DriverEESaIS8_EE
# 7  _ZN8facebook5velox4exec4Task5startESt10shared_ptrIS2_Ejj
# 8  _ZN2io5trino6bridge10TaskHandle5startESt8functionIFvN5folly4UnitEEE
# 9  Java_io_trino_jni_TrinoBridge_createTask
# 10 0x00007f8e1c12553a

Maybe it comes with difference between Presto and Trino.

Copy link
Collaborator

@jikunshang jikunshang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a look about agg failure later. Can you try to make CI passed?

@@ -381,23 +381,23 @@ TypedExprPtr VeloxExprConverter::toVeloxExpr(
auto returnType = parseTypeSignature(pexpr.returnType);
if (getFunctionName(signature) == "presto.default.avg" ||
getFunctionName(signature) == "presto.default.sum") {
VLOG(1) << "if";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this.

} else if (auto sqlFunctionHandle =
std::dynamic_pointer_cast<protocol::SqlFunctionHandle>(
pexpr.functionHandle)) {
VLOG(1) << "else";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this.

@mxdzs0612
Copy link
Collaborator Author

I will take a look about agg failure later. Can you try to make CI passed?

UT of agg node cannot pass currently.. It's relative to the issue mentioned above.

According to the newest velox, functionHandle and arguments should be added in aggregations elements, I don't know which query @bigPYJ1151 ran to produce the JSON, maybe we should rerun it.

@bigPYJ1151
Copy link
Collaborator

I will take a look about agg failure later. Can you try to make CI passed?

UT of agg node cannot pass currently.. It's relative to the issue mentioned above.

According to the newest velox, functionHandle and arguments should be added in aggregations elements, I don't know which query @bigPYJ1151 ran to produce the JSON, maybe we should rerun it.

I used TPCH Q1 and picked AggregationNode only.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants