diff options
author | Henry Castro <hcastro@collabora.com> | 2023-08-30 10:25:51 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-09-01 21:39:57 +0200 |
commit | 6896c46567c571a7ae6eb60268de962e3d4ae8bb (patch) | |
tree | adcadb653adb2942d802a8b0a7b3d4f0d338ff38 | |
parent | 3d910abdaa18bbd237834f412675ab25d90836bc (diff) |
connectiviy: fix to detect column data type
if Base SQL query:
SELECT COUNT("test"."id") from Test
If changed to Spanish UI, detect the column type
from a neutral context parser.
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I1faa8ff8417a0fc4996b289bd2ce0baad52fc00c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156298
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156425
Tested-by: Jenkins
-rw-r--r-- | connectivity/source/parse/sqliterator.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 1a205953f7aa..683391f66f6a 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -2109,7 +2109,11 @@ sal_Int32 OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode* _pNo nType = DataType::DOUBLE; } else + { nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() ); + if (nType == DataType::SQLNULL) + nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, m_rParser.getNeutral() ); + } } return nType; |