Github user parthchandra commented on a diff in the pull request:
https://github.com/apache/drill/pull/1037#discussion_r151512282
--- Diff: contrib/native/client/src/include/drill/userProperties.hpp ---
@@ -28,6 +28,18 @@ class DECLSPEC_DRILL_CLIENT DrillUserProperties{
static const std::map<std::string, uint32_t> USER_PROPERTIES;
DrillUserProperties(){};
+
+ /// @brief Update the property value associate with the property
key if the value is
+ /// empty.
+ ///
+ /// @param in_propName The property name.
+ /// @param in_propValue The property value.
+ void setPropertyIfEmpty(const std::string& in_propName, const
std::string& in_propValue){
+ // If the element value is empty, then update.
+ if (isPropSet(in_propName) &&
m_properties[in_propName].empty()){
--- End diff --
Better check would be
`if ( !isPropSet(in_propName) || m_properties[in_propName].empty() )`
---