public function parseColumnNames($string, ContextAwareInterface $context = null)
    {
        $matchArray = [];
        preg_match_all("#~([a-zA-Z0-9_]\\.{0,1})+#", $string, $matchArray);
        $matchArray = array_unique($matchArray[0]);

        foreach ($matchArray as $match) {
            if($context){
                $nsMatch = $context->getNameInContext($match);
            }else{
                $nsMatch = $match;
            }

            $path=ltrim($nsMatch, "~");

            $tablePath = rtrim(substr($nsMatch, 1, strrpos($nsMatch, ".")), ".");

            $replace= $this->_doFQLTableName($tablePath, null, true)
                . "."
                . $this->getBaseFace()
                    ->getElement($path)
                    ->getSqlColumnName(true);

            $string = str_replace($match, $replace, $string);
        }

        return $string;
    }