drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill issue #1021: DRILL-5923: Display name for query state
Date Wed, 08 Nov 2017 01:12:12 GMT
Github user paul-rogers commented on the issue:

    https://github.com/apache/drill/pull/1021
  
    @arina-ielchiieva, @prasadns14, here is my two cents.
    
    The names and numbers used in the protobuf definitions are part of Drill's public network
API. This API is not versioned, so we can't really change it. If we changed the names, then,
say, C-code or Java code that expects the old names will break. Being part of the public API,
that code may not even be in the Drill source tree; perhaps someone has generated, say, a
Python binding. So, can't change the public API.
    
    For purely aesthetic reasons, the contributor wishes to change the message displayed in
the UI. This is purely a UI decision (the user is not expected to map the display names to
the Protobuf enums.) And, the display name is subject to change. Maybe other UIs want to use
other names. Maybe we want to show icons, or abbreviate the names ("Fail", "OK", etc.) And,
of course, what if the display name should have spaces other characters: "In Progress", "In
Queue" or "Didn't Work!". Can't put those in enum names. You get the idea.
    
    For this reason, the mapping from enum values to display names should be part of the UI,
not the network protocol definition. The present change provides a UI-specific mapping from
API Protobuf enum values to display strings, which seems like a good idea.
    
    So, the key questions are:
    
    * Should we use display strings other than the Protobuf constants (seems a good idea.)
    * Should we do the mapping in Java or in Freemarker? (Java seems simpler.)
    
    Thoughts?


---

Mime
View raw message