--V.map (\t -> nvlRTuple c defaultVal t) tab    

-- | It receives an RTable, a search value and a default value. It returns a new RTable which is identical to the source one
-- but for each RTuple, for the specified column:
--   * if the search value was found then the specified Return Value is returned
--   * else the default value is returned  (if the ignore indicator is not set)  
-- If you pass an empty RTable, then it returns an empty RTable
-- Calls error if the column does not exist
decodeRTable ::            
        ColumnName  -- ^ ColumnName key
    ->  RDataType   -- ^ Search value
    ->  RDataType   -- ^ Return value
    ->  RDataType   -- ^ Default value        
    ->  IgnoreDefault -- ^ Ignore default indicator     
    ->  RTable      -- ^ input RTable
    ->  RTable
decodeRTable cName searchVal returnVal defaultVal ignoreInd tab = 
    if isRTabEmpty tab
        then emptyRTable
        else
            V.map (\t -> upsertRTuple cName (decodeColValue cName searchVal returnVal defaultVal ignoreInd t) t) tab
decodeRTable ::            
        ColumnName  -- ^ ColumnName key
    ->  RDataType   -- ^ Search value
    ->  RDataType   -- ^ Return value
    ->  RDataType   -- ^ Default value        
    ->  IgnoreDefault -- ^ Ignore default indicator     
    ->  RTable      -- ^ input RTable
    ->  RTable
decodeRTable cName searchVal returnVal defaultVal ignoreInd tab = 
    if isRTabEmpty tab
        then emptyRTable
        else
            V.map (\t -> upsertRTuple cName (decodeColValue cName searchVal returnVal defaultVal ignoreInd t) t) tab
decodeRTable cName searchVal returnVal defaultVal ignoreInd tab = 
    if isRTabEmpty tab
        then emptyRTable
        else
            V.map (\t -> upsertRTuple cName (decodeColValue cName searchVal returnVal defaultVal ignoreInd t) t) tab