Skip to content

ORC-1457: [C++] Fix ambiguous overload of Type::createRowBatch - #1557

Closed
wgtmac wants to merge 1 commit into
apache:mainfrom
wgtmac:ORC-1457
Closed

wgtmac wants to merge 1 commit into
apache:mainfrom
wgtmac:ORC-1457

Conversation

@wgtmac

@wgtmac wgtmac commented Jun 30, 2023

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Remove default parameters from one overload of Type::createRowBatch to eliminate ambiguity.

Why are the changes needed?

The overloads of Type::createRowBatch are ambiguous when default parameters are used.

virtual std::unique_ptr<ColumnVectorBatch> createRowBatch(
  uint64_t size, MemoryPool& pool, bool encoded = false) const = 0;

virtual std::unique_ptr<ColumnVectorBatch> createRowBatch(
  uint64_t size, MemoryPool& pool, bool encoded = false,
  bool useTightNumericVector = false) const = 0;

How was this patch tested?

Make sure all tests pass.

@github-actions github-actions Bot added the CPP label Jun 30, 2023

@coderex2522 coderex2522 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 LGTM.

@wgtmac wgtmac closed this in 81b955e Jun 30, 2023
wgtmac added a commit that referenced this pull request Jun 30, 2023
### What changes were proposed in this pull request?

Remove default parameters from one overload of Type::createRowBatch to eliminate ambiguity.

### Why are the changes needed?

The overloads of Type::createRowBatch are ambiguous when default parameters are used.
```cpp
virtual std::unique_ptr<ColumnVectorBatch> createRowBatch(
  uint64_t size, MemoryPool& pool, bool encoded = false) const = 0;

virtual std::unique_ptr<ColumnVectorBatch> createRowBatch(
  uint64_t size, MemoryPool& pool, bool encoded = false,
  bool useTightNumericVector = false) const = 0;
```

### How was this patch tested?

Make sure all tests pass.

Closes #1557 from wgtmac/ORC-1457.

Authored-by: Gang Wu <[email protected]>
Signed-off-by: Gang Wu <[email protected]>
(cherry picked from commit 81b955e)
Signed-off-by: Gang Wu <[email protected]>
@dongjoon-hyun

dongjoon-hyun commented Jul 1, 2023 •

Copy link
Copy Markdown
Member

Thank you for fixing this. Could you set the milestone, @wgtmac ?

@wgtmac wgtmac modified the milestones: 2.0.0, 1.9.1 Jul 1, 2023
@dongjoon-hyun dongjoon-hyun modified the milestones: 2.0.0, 1.9.1 Aug 1, 2023
cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
### What changes were proposed in this pull request?

Remove default parameters from one overload of Type::createRowBatch to eliminate ambiguity.

### Why are the changes needed?

The overloads of Type::createRowBatch are ambiguous when default parameters are used.
```cpp
virtual std::unique_ptr<ColumnVectorBatch> createRowBatch(
  uint64_t size, MemoryPool& pool, bool encoded = false) const = 0;

virtual std::unique_ptr<ColumnVectorBatch> createRowBatch(
  uint64_t size, MemoryPool& pool, bool encoded = false,
  bool useTightNumericVector = false) const = 0;
```

### How was this patch tested?

Make sure all tests pass.

Closes apache#1557 from wgtmac/ORC-1457.

Authored-by: Gang Wu <[email protected]>
Signed-off-by: Gang Wu <[email protected]>
@wgtmac
wgtmac deleted the ORC-1457 branch February 27, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants