[ https://issues.apache.org/jira/browse/BEAM-5141?focusedWorklogId=136346&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-136346 ]
ASF GitHub Bot logged work on BEAM-5141: ---------------------------------------- Author: ASF GitHub Bot Created on: 20/Aug/18 23:23 Start Date: 20/Aug/18 23:23 Worklog Time Spent: 10m Work Description: amaliujia edited a comment on issue #6216: [BEAM-5141] Improve error message when SET unregistered options URL: https://github.com/apache/beam/pull/6216#issuecomment-414495185 Did some exploration work for that validation when SET happens. Doing the validation at `SET` could fail a `SET` with inappropriate option with existing error message. The problem that approach faces is when and how we validate a set of options that need to be changed when user changes `runner` by `SET`. It is a design choice that right now BeamSQL uses the lazy validation (e.g. validate at `SELECT`) to handle these cases, and another design choice is to use RESET to clear inappropriate options. Having the context in mind, we need remind users to `RESET` options when we detect the wrong options. It is possible to return `PropertyDescriptors` after majority validation is done in `PipelineOptionsFactory`. The concern here is we have to remove [checks related to `PropertyDescriptors`](https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java#L1509) in `PipelineOptionsFactory` (otherwise it will fail as what it is now and it will fail before we get `PropertyDescriptors`). Then where to implement the validation for other places which uses `PipelineOptionsFactory`? What could be done is still keep everything as what it is now. Once BeamSQL catches `IllegalArgumentException`, it fetches `PropertyDescriptors` check if need to customize error messages, which is already a very similar to the special exception approach. I think catching the special exception is better than catching `IllegalArgumentException` and check `PropertyDescriptors`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 136346) Time Spent: 7h (was: 6h 50m) > Improve error message when SET unregistered options > ---------------------------------------------------- > > Key: BEAM-5141 > URL: https://issues.apache.org/jira/browse/BEAM-5141 > Project: Beam > Issue Type: Improvement > Components: dsl-sql > Reporter: Rui Wang > Assignee: Rui Wang > Priority: Major > Fix For: Not applicable > > Time Spent: 7h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)