From 53e059c9c4863b17f65dd4cb8ad0dec5da650452 Mon Sep 17 00:00:00 2001 From: Dan Hemberger <846186+hemberger@users.noreply.github.com> Date: Sat, 8 Apr 2023 10:56:52 -0700 Subject: [PATCH] Update src/SqlAst/IfNullReturnTypeExtension.php Add reference link to MySQL docs Co-authored-by: Markus Staab --- src/SqlAst/IfNullReturnTypeExtension.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SqlAst/IfNullReturnTypeExtension.php b/src/SqlAst/IfNullReturnTypeExtension.php index 757dc04b3..07bc5c4d4 100644 --- a/src/SqlAst/IfNullReturnTypeExtension.php +++ b/src/SqlAst/IfNullReturnTypeExtension.php @@ -47,6 +47,7 @@ public function getReturnType(FunctionCall $expression, QueryScope $scope): ?Typ // The result type is always the "more general" of the two args // in the order: string, float, integer. + // see https://dev.mysql.com/doc/refman/5.7/en/flow-control-functions.html#function_ifnull if ($this->isResultString($argType1NoNull, $argType2NoNull)) { $resultType = $resultType->toString(); } elseif ($this->isResultFloat($argType1NoNull, $argType2NoNull)) {