Skip to content

Conversation

@zhixingheyi-tian
Copy link

@zhixingheyi-tian zhixingheyi-tian commented Jan 3, 2023

Here, reserve action doesn't bring benefit.

const auto numDependents = outputType->size() - numKeys;
dependentChannels_.reserve(numDependents);
decoders_.reserve(numDependents);

Instead, it will cause issues when outputType->size() < numKeys. Such as: apache/incubator-gluten#790.
So just remove them.

@zhixingheyi-tian
Copy link
Author

cc @zhejiangxiaomai ,
Has passed apache/incubator-gluten#793

@zhixingheyi-tian
Copy link
Author

cc @rui-mo

}

// Identify the non-key build side columns and make a decoder for each.
const auto numDependents = outputType->size() - numKeys;
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the test case you mentioned, what is the number of numDependents? I guess the reserve function fails only when the reserved value is non-positive, am I correct?

Copy link
Author

Choose a reason for hiding this comment

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

@rui-mo
If the value < 0, will trigger exception.

terminate called after throwing an instance of 'std::length_error'
  what():  vector::reserve
Aborted

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess a better solution would be to check whether the reserved value is greater than 0. If yes, the reserve functions can be called.

Copy link
Author

@zhixingheyi-tian zhixingheyi-tian Jan 4, 2023

Choose a reason for hiding this comment

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

If-Else branch is not better for CPU performance.
And here, reserve will not bring benefit because output schema field is limited.

Copy link
Collaborator

Choose a reason for hiding this comment

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

To reserve before use the vector is a common code style in Velox, and they have gave me some comments on that before. I think we'd better follow that. As for the performance, I think if else would not affect the performance too much here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@rui-mo
Copy link
Collaborator

rui-mo commented Jan 4, 2023

Maybe we need to discuss this issue with Velox, and use the upstreamed fix. Merge this for now.

@rui-mo rui-mo merged commit 5d4bd10 into oap-project:main Jan 4, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Jan 5, 2023
zhejiangxiaomai pushed a commit that referenced this pull request Jan 11, 2023
zhejiangxiaomai pushed a commit that referenced this pull request Jan 11, 2023
zhejiangxiaomai pushed a commit that referenced this pull request Jan 31, 2023
zhejiangxiaomai pushed a commit that referenced this pull request Feb 22, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Feb 27, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Mar 6, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Mar 27, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Mar 29, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Mar 29, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Apr 14, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Apr 17, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Apr 19, 2023
zhejiangxiaomai pushed a commit to zhejiangxiaomai/velox that referenced this pull request Apr 20, 2023
zhejiangxiaomai added a commit to zhejiangxiaomai/velox that referenced this pull request May 31, 2023
relative pr:

Fix hashjoin runtime issue oap-project#106
INVALID_STATE on HashJoin when spill is turned on oap-project#154
SIGABRT on DecimalAvgAggregate<UnscaleLongDecimal, UnscaleShortDecimal> when spilling is engaged oap-project#236
Support kPreceeding & kFollowing for window range frame type oap-project#287
zhejiangxiaomai added a commit to zhejiangxiaomai/velox that referenced this pull request May 31, 2023
relative pr:

Fix hashjoin runtime issue oap-project#106
INVALID_STATE on HashJoin when spill is turned on oap-project#154
SIGABRT on DecimalAvgAggregate<UnscaleLongDecimal, UnscaleShortDecimal> when spilling is engaged oap-project#236
Support kPreceeding & kFollowing for window range frame type oap-project#287
zhejiangxiaomai added a commit to zhejiangxiaomai/velox that referenced this pull request Jul 3, 2023
relative pr:

Fix hashjoin runtime issue oap-project#106
INVALID_STATE on HashJoin when spill is turned on oap-project#154
SIGABRT on DecimalAvgAggregate<UnscaleLongDecimal, UnscaleShortDecimal> when spilling is engaged oap-project#236
Support kPreceeding & kFollowing for window range frame type oap-project#287
zhejiangxiaomai added a commit to zhejiangxiaomai/velox that referenced this pull request Jul 4, 2023
relative pr:

Fix hashjoin runtime issue oap-project#106
INVALID_STATE on HashJoin when spill is turned on oap-project#154
SIGABRT on DecimalAvgAggregate<UnscaleLongDecimal, UnscaleShortDecimal> when spilling is engaged oap-project#236
Support kPreceeding & kFollowing for window range frame type oap-project#287
zhejiangxiaomai added a commit to zhejiangxiaomai/velox that referenced this pull request Jul 11, 2023
relative pr:

Fix hashjoin runtime issue oap-project#106
INVALID_STATE on HashJoin when spill is turned on oap-project#154
SIGABRT on DecimalAvgAggregate<UnscaleLongDecimal, UnscaleShortDecimal> when spilling is engaged oap-project#236
Support kPreceeding & kFollowing for window range frame type oap-project#287
zhejiangxiaomai added a commit to zhejiangxiaomai/velox that referenced this pull request Jul 12, 2023
relative pr:

Fix hashjoin runtime issue oap-project#106
INVALID_STATE on HashJoin when spill is turned on oap-project#154
SIGABRT on DecimalAvgAggregate<UnscaleLongDecimal, UnscaleShortDecimal> when spilling is engaged oap-project#236
Support kPreceeding & kFollowing for window range frame type oap-project#287
zhejiangxiaomai added a commit to zhejiangxiaomai/velox that referenced this pull request Jul 12, 2023
relative pr:

Fix hashjoin runtime issue oap-project#106
INVALID_STATE on HashJoin when spill is turned on oap-project#154
SIGABRT on DecimalAvgAggregate<UnscaleLongDecimal, UnscaleShortDecimal> when spilling is engaged oap-project#236
Support kPreceeding & kFollowing for window range frame type oap-project#287
zhejiangxiaomai added a commit to zhejiangxiaomai/velox that referenced this pull request Jul 17, 2023
relative pr:

Fix hashjoin runtime issue oap-project#106
INVALID_STATE on HashJoin when spill is turned on oap-project#154
SIGABRT on DecimalAvgAggregate<UnscaleLongDecimal, UnscaleShortDecimal> when spilling is engaged oap-project#236
Support kPreceeding & kFollowing for window range frame type oap-project#287
marin-ma added a commit to marin-ma/velox-oap that referenced this pull request Dec 15, 2023
* Add doc for arrow backend

* README.md
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.

3 participants