From 49011e4f8fc3d17b55c3a76ba80ec6136cb8c538 Mon Sep 17 00:00:00 2001 From: Andrea Bignamini <bignamini@oats.inaf.it> Date: Fri, 5 May 2017 12:52:32 +0200 Subject: [PATCH] Remove check on remote columns The check on same number of columns has been removed. The check on not found column has been removed. In this way the remote table can possibly have columns not mapped by Nadir. --- src/ProtocolManager.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/ProtocolManager.cpp b/src/ProtocolManager.cpp index 0a5b855..7e6a896 100644 --- a/src/ProtocolManager.cpp +++ b/src/ProtocolManager.cpp @@ -178,13 +178,14 @@ ResponseSP ProtocolManager::prepareValidation(RequestSP request_sp) throw std::runtime_error(errorStream.str()); } - if(validationReq.columns_size() != (int)informationList.size()) - { - std::stringstream errorStream; - errorStream << "Table " << m_validatedSchema << "." - << m_validatedTable << " has different columns size"; - throw std::runtime_error(errorStream.str()); - } + // Same number of columns check removed + // if(validationReq.columns_size() != (int)informationList.size()) + // { + // std::stringstream errorStream; + // errorStream << "Table " << m_validatedSchema << "." + // << m_validatedTable << " has different columns size"; + // throw std::runtime_error(errorStream.str()); + // } for(int i=0; i<validationReq.columns_size(); ++i) validateColumn(validationReq.columns(i), informationList); @@ -378,12 +379,13 @@ void ProtocolManager::validateColumn(const Request::Validation::Column& column, } } - if(!found) - { - std::stringstream errorStream; - errorStream << "Column " << column.name() << " not found"; - throw std::runtime_error(errorStream.str()); - } + // Column not found check removed + // if(!found) + // { + // std::stringstream errorStream; + // errorStream << "Column " << column.name() << " not found"; + // throw std::runtime_error(errorStream.str()); + // } } //============================================================================== -- GitLab