sgrodzicki / php-sql-parser

Automatically exported from code.google.com/p/php-sql-parser
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

STD incorrectly categorised as function and not aggregate_function #135

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
STD(col) is incorrectly categorized as "function" and not "aggregate_function" 
as the interchangeable "stddev":

    [1] => array(5) {
      ["expr_type"] => string(18) "aggregate_function"
      ["alias"] => bool(false)
      ["base_expr"] => string(6) "stddev"
      ["sub_tree"] => array(1) {
        [0] => array(4) {
          ["expr_type"] => string(6) "colref"
          ["base_expr"] => string(1) "x"
          ["no_quotes"] => array(2) {
            ["delim"] => bool(false)
            ["parts"] => array(1) {
              [0] => string(1) "x"
            }
          }
          ["sub_tree"] => bool(false)
        }
      }
      ["delim"] => string(1) ","
    }
    [2] => array(5) {
      ["expr_type"] => string(8) "function"
      ["alias"] => bool(false)
      ["base_expr"] => string(3) "std"
      ["sub_tree"] => array(1) {
        [0] => array(4) {
          ["expr_type"] => string(6) "colref"
          ["base_expr"] => string(1) "x"
          ["no_quotes"] => array(2) {
            ["delim"] => bool(false)
            ["parts"] => array(1) {
              [0] => string(1) "x"
            }
          }
          ["sub_tree"] => bool(false)
        }
      }
      ["delim"] => bool(false)
    }

Original issue reported on code.google.com by adrian.p...@googlemail.com on 8 Apr 2014 at 10:02

GoogleCodeExporter commented 8 years ago
I have fixed the problem in r1281.

Original comment by pho...@gmx.de on 9 Apr 2014 at 3:35