Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-15292: [C++] Typeclass alias is missing in ExtensionArray #15293

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

js8544
Copy link
Collaborator

@js8544 js8544 commented Jan 10, 2023

Which issue does this PR close?

Closes #15292

Rationale for this change

All array classes have the using TypeClass = xxx type alias except for ExtensionArray.

With the alias, it will be easier to write templated inline visitors such as the following code block:

class ExampleVisitor {
 public:
  template <typename T>
  Status Visit(const T& arr) {
    if constexpr (arrow::is_number_type<typename T::TypeClass>::value) {
      ///
    } else {
      ///
    }
    return Status::OK();
  }
};

Current it fails to compile with message: No type named 'TypeClass' in 'arrow::ExtensionArray'.

@github-actions
Copy link

@github-actions
Copy link

⚠️ GitHub issue #15292 has been automatically assigned in GitHub to PR creator.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @js8544

@pitrou pitrou merged commit df2aa38 into apache:master Jan 12, 2023
@ursabot
Copy link

ursabot commented Jan 13, 2023

Benchmark runs are scheduled for baseline = 252e1e0 and contender = df2aa38. df2aa38 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.48% ⬆️0.03%] test-mac-arm
[Finished ⬇️0.51% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.56% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] df2aa384 ec2-t3-xlarge-us-east-2
[Finished] df2aa384 test-mac-arm
[Finished] df2aa384 ursa-i9-9960x
[Finished] df2aa384 ursa-thinkcentre-m75q
[Finished] 252e1e04 ec2-t3-xlarge-us-east-2
[Failed] 252e1e04 test-mac-arm
[Finished] 252e1e04 ursa-i9-9960x
[Finished] 252e1e04 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

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

Successfully merging this pull request may close these issues.

[C++] Typeclass alias is missing in ExtensionArray
3 participants