src/Data/Tools/BizDataObj_SQLHelper.php
private function _convertSqlExpression($dataObj, $sqlExpr)
    {
        $dataSqlObj = $this->getDataSqlObj();
        $sqlstr = $sqlExpr;
        $startpos = 0;
        while (true) {
            $fieldname = substr_lr($sqlstr, "[", "]", $startpos);
            if ($fieldname == "")
                break;
            else {
                $bizField = $dataObj->bizRecord->get($fieldname);
                $tableColumn = $dataSqlObj->getTableColumn($bizField->join, $bizField->column);
                $sqlstr = str_replace("[$fieldname]", $tableColumn, $sqlstr);
                $startpos = strpos($sqlstr, '['); // Move startpos to the first [ (if it exists) in order to be detect by next itteration
            }
        }
        return $sqlstr;
    }
private function _convertSqlExpression($dataObj, $sqlExpr)
    {
        $dataSqlObj = $this->getDataSqlObj();
        $sqlstr = $sqlExpr;
        $startpos = 0;
        while (true) {
            $fieldname = substr_lr($sqlstr, "[", "]", $startpos);
            if ($fieldname == "")
                break;
            else {
                $bizField = $dataObj->bizRecord->get($fieldname);
                $tableColumn = $dataSqlObj->getTableColumn($bizField->join, $bizField->column);
                $sqlstr = str_replace("[$fieldname]", $tableColumn, $sqlstr);
                $startpos = strpos($sqlstr, '['); // Move startpos to the first [ (if it exists) in order to be detect by next itteration
            }
        }
        return $sqlstr;
    }
Convert Sql Expression
Replace [field name] in the SQL expression with table_alias.column

@param BizDataObj $dataObj - the instance of BizDataObj
@param string $sqlExpr - SQL expression supported by the database engine. The syntax is FUNC([FieldName1]...[FieldName2]...)
@return string real sql expression with column names