Skip to content

[BEAM-8334] Expose Language Options for testing#9704

Merged
apilloud merged 1 commit intoapache:masterfrom
apilloud:languageoptions
Oct 3, 2019
Merged

[BEAM-8334] Expose Language Options for testing#9704
apilloud merged 1 commit intoapache:masterfrom
apilloud:languageoptions

Conversation

@apilloud
Copy link
Member

@apilloud apilloud commented Oct 1, 2019

This exposes Language Options for testing.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status --- --- Build Status
XLang --- --- --- Build Status --- --- ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@apilloud apilloud force-pushed the languageoptions branch 2 times, most recently from 3628bed to 0427598 Compare October 1, 2019 21:15
@apilloud
Copy link
Member Author

apilloud commented Oct 1, 2019

R: @amaliujia

@apilloud apilloud requested a review from amaliujia October 1, 2019 21:17
ResolvedStatement analyze(String sql) {
AnalyzerOptions options = initAnalyzerOptions(builder.queryParams);
AnalyzerOptions options = initAnalyzerOptions();
for (Map.Entry<String, Value> entry : builder.queryParams.entrySet()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am slightly against this move because the original intention is to initialize AnalyzerOptions in the same place to avoid many pieces of initializations (which will be hard to maintain). I meant "slightly" because I can see why you are moving it: it will require static parameters as input.

What do you think about the idea of having a AnalyzerOptions builder with default settings on fields?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree that we should have a single place that performs common init of AnalizerOptions and I think this change still achieves that goal. The query parameters are only set in the analyze path, so I think it actually creates more confusion to move it into a separate function. I have no strong opinions and can add a function if you'd like one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok maybe just a function and we can leave more work for future.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Please take another look.

@amaliujia
Copy link
Contributor

LGTM

@apilloud apilloud merged commit b01cc60 into apache:master Oct 3, 2019
@apilloud apilloud deleted the languageoptions branch October 3, 2019 16:45
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.

2 participants