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

Make dwio::common::WriterOptions polymorphic #10380

Closed
wants to merge 1 commit into from

Conversation

pedroerp
Copy link
Contributor

@pedroerp pedroerp commented Jul 2, 2024

Summary:
Making writer options a virtual class that could be specialized for
different file formats to enable Velox users to provided them as part of a
query plan.

Today, there are a few different ways to pass writer parameters (serdeParams and
hive config). They end up being serialized to strings, so can't be used with
non-serializable configs. Moreover, file format specific configurations and code
end-up in generic parts of the code, like HiveConnector.

This will allow us to better organize file format specific options; for now only
creating the framework to contain the changes.

Differential Revision: D59302873

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 2, 2024
Copy link

netlify bot commented Jul 2, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 559b475
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/669550fd0e9a09000803a710

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59302873

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59302873

pedroerp added a commit to pedroerp/velox-1 that referenced this pull request Jul 11, 2024
Summary:
Pull Request resolved: facebookincubator#10380

Making writer options a virtual class that could be specialized for
different file formats to enable Velox users to provided them as part of a
query plan.

Today, there are a few different ways to pass writer parameters (serdeParams and
hive config). They end up being serialized to strings, so can't be used with
non-serializable configs. Moreover, file format specific configurations and code
end-up in generic parts of the code, like HiveConnector.

This will allow us to better organize file format specific options; for now only
creating the framework to contain the changes.

Reviewed By: kunalkataria, kparichay

Differential Revision: D59302873
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59302873

pedroerp added a commit to pedroerp/velox-1 that referenced this pull request Jul 12, 2024
Summary:
Pull Request resolved: facebookincubator#10380

Making writer options a virtual class that could be specialized for
different file formats to enable Velox users to provided them as part of a
query plan.

Today, there are a few different ways to pass writer parameters (serdeParams and
hive config). They end up being serialized to strings, so can't be used with
non-serializable configs. Moreover, file format specific configurations and code
end-up in generic parts of the code, like HiveConnector.

This will allow us to better organize file format specific options; for now only
creating the framework to contain the changes.

Reviewed By: kunalkataria, kparichay

Differential Revision: D59302873
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59302873

pedroerp added a commit to pedroerp/velox-1 that referenced this pull request Jul 12, 2024
Summary:
Pull Request resolved: facebookincubator#10380

Making writer options a virtual class that could be specialized for
different file formats to enable Velox users to provided them as part of a
query plan.

Today, there are a few different ways to pass writer parameters (serdeParams and
hive config). They end up being serialized to strings, so can't be used with
non-serializable configs. Moreover, file format specific configurations and code
end-up in generic parts of the code, like HiveConnector.

This will allow us to better organize file format specific options; for now only
creating the framework to contain the changes.

Reviewed By: kunalkataria, kparichay

Differential Revision: D59302873
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59302873

pedroerp added a commit to pedroerp/velox-1 that referenced this pull request Jul 12, 2024
Summary:
Pull Request resolved: facebookincubator#10380

Making writer options a virtual class that could be specialized for
different file formats to enable Velox users to provided them as part of a
query plan.

Today, there are a few different ways to pass writer parameters (serdeParams and
hive config). They end up being serialized to strings, so can't be used with
non-serializable configs. Moreover, file format specific configurations and code
end-up in generic parts of the code, like HiveConnector.

This will allow us to better organize file format specific options; for now only
creating the framework to contain the changes.

Reviewed By: kunalkataria, kparichay

Differential Revision: D59302873
pedroerp added a commit to pedroerp/velox-1 that referenced this pull request Jul 12, 2024
Summary:
Pull Request resolved: facebookincubator#10380

Making writer options a virtual class that could be specialized for
different file formats to enable Velox users to provided them as part of a
query plan.

Today, there are a few different ways to pass writer parameters (serdeParams and
hive config). They end up being serialized to strings, so can't be used with
non-serializable configs. Moreover, file format specific configurations and code
end-up in generic parts of the code, like HiveConnector.

This will allow us to better organize file format specific options; for now only
creating the framework to contain the changes.

Reviewed By: kunalkataria, kparichay

Differential Revision: D59302873
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59302873

Summary:
Pull Request resolved: facebookincubator#10380

Making writer options a virtual class that could be specialized for
different file formats to enable Velox users to provided them as part of a
query plan.

Today, there are a few different ways to pass writer parameters (serdeParams and
hive config). They end up being serialized to strings, so can't be used with
non-serializable configs. Moreover, file format specific configurations and code
end-up in generic parts of the code, like HiveConnector.

This will allow us to better organize file format specific options; for now only
creating the framework to contain the changes.

Reviewed By: kunalkataria, kparichay

Differential Revision: D59302873
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59302873

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in e0680b9.

Copy link

Conbench analyzed the 1 benchmark run on commit e0680b9f.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

@@ -262,6 +267,7 @@ class HiveInsertTableHandle : public ConnectorInsertTableHandle {
const std::shared_ptr<HiveBucketProperty> bucketProperty_;
const std::optional<common::CompressionKind> compressionKind_;
const std::unordered_map<std::string, std::string> serdeParameters_;
const std::shared_ptr<dwio::common::WriterOptions> writerOptions_;
Copy link
Contributor

Choose a reason for hiding this comment

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

@pedroerp Hi Pedro, I just bumped into this code.

WriterOptions includes some contextual information (memory pool, spill config, etc.) so I guess it's the reason why it's not included in TableWriteNode's JSON serde, see code.

Do you think this is an issue? Given it's a special case that we include contextual information in query plan node.

Copy link
Contributor

Choose a reason for hiding this comment

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

Filed an issue: #12437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants