[ 
https://issues.apache.org/jira/browse/BEAM-5141?focusedWorklogId=136342&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-136342
 ]

ASF GitHub Bot logged work on BEAM-5141:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Aug/18 23:20
            Start Date: 20/Aug/18 23:20
    Worklog Time Spent: 10m 
      Work Description: amaliujia commented 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 option that needs change when user change `runner` by `SET`. 
It is a design choice and right now BeamSQL uses the lazy validation (e.g. 
validate at `SELECT`) to handle these cases, and another design choice is to 
use RESET 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. The concern here is we have to remove checks 
related `PropertyDescriptors` 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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 136342)
    Time Spent: 6h 40m  (was: 6.5h)

> 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: 6h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to