Skip to content

Commit

Permalink
Merge pull request #234 from dbould/fix-failing-tests
Browse files Browse the repository at this point in the history
Fixed 3/7 failing tests
  • Loading branch information
greenlion committed May 16, 2017
2 parents 41935eb + 4cf0cc9 commit b4e8522
Show file tree
Hide file tree
Showing 13 changed files with 129 additions and 36 deletions.
21 changes: 18 additions & 3 deletions src/PHPSQLParser/processors/BracketProcessor.php
Expand Up @@ -57,12 +57,12 @@ protected function processTopLevel($sql) {
}

public function process($tokens) {

$token = $this->removeParenthesisFromStart($tokens[0]);
$subtree = $this->processTopLevel($token);

$remainingExpressions = $this->getRemainingNotBracketExpression($subtree);

if (isset($subtree['BRACKET'])) {
// TODO: here we lose some other parts of a statement like ORDER BY
$subtree = $subtree['BRACKET'];
}

Expand All @@ -73,7 +73,22 @@ public function process($tokens) {

return array(
array('expr_type' => ExpressionType::BRACKET_EXPRESSION, 'base_expr' => trim($tokens[0]),
'sub_tree' => $subtree));
'sub_tree' => $subtree, 'remaining_expressions' => $remainingExpressions));
}

private function getRemainingNotBracketExpression($subtree)
{
$remainingExpressions = array();
$ignoredKeys = array('BRACKET', 'SELECT', 'FROM');
$subtreeKeys = array_keys($subtree);

foreach($subtreeKeys as $key) {
if(!in_array($key, $ignoredKeys)) {
$remainingExpressions[$key] = $subtree[$key];
}
}

return $remainingExpressions;
}

}
Expand Down
14 changes: 13 additions & 1 deletion src/PHPSQLParser/processors/SQLChunkProcessor.php
Expand Up @@ -66,7 +66,18 @@ public function process($out) {
// TODO: this field should be a global STATEMENT field within the output
// we could add all other categories as sub_tree, it could also work with multipe UNIONs
$processor = new BracketProcessor($this->options);
$out['BRACKET'] = $processor->process($out['BRACKET']);
$processedBracket = $processor->process($out['BRACKET']);
$remainingExpressions = $processedBracket[0]['remaining_expressions'];

unset($processedBracket[0]['remaining_expressions']);

if(!empty($remainingExpressions)) {
foreach($remainingExpressions as $key=>$expression) {
$processedBracket[][$key] = $expression;
}
}

$out['BRACKET'] = $processedBracket;
}
if (!empty($out['CREATE'])) {
$processor = new CreateProcessor($this->options);
Expand Down Expand Up @@ -180,6 +191,7 @@ public function process($out) {
$processor = new WithProcessor($this->options);
$out['WITH'] = $processor->process($out['WITH']);
}

return $out;
}
}
Expand Down
47 changes: 44 additions & 3 deletions src/PHPSQLParser/processors/UnionProcessor.php
Expand Up @@ -100,16 +100,58 @@ protected function processMySQLUnion($queries) {
$queries[$unionType][$key] = $this->processDefault($this->removeParenthesisFromStart($token));
break;
}

$queries[$unionType][$key] = $this->processSQL($queries[$unionType][$key]);
break;
}
}
}

// it can be parsed or not
return $queries;
}

/**
* Moves the final union query into a separate output, so the remainder (such as ORDER BY) can
* be processed separately.
*/
protected function splitUnionRemainder($queries, $unionType, $outputArray)
{
$finalQuery = [];

//If this token contains a matching pair of brackets at the start and end, use it as the final query
foreach ($outputArray as $key => $token) {
$tokenAsArray = str_split(trim($token));
$keyCount = max(array_keys($tokenAsArray));

if (($tokenAsArray[0] == '(' && $tokenAsArray[$keyCount] == ')')) {
$queries[$unionType][] = $outputArray;
unset($outputArray[$key]);
break;
} elseif (strtoupper($token) == 'ORDER') {
break;
} else {
$finalQuery[] = $token;
unset($outputArray[$key]);
}
}

$finalQueryString = trim(implode($finalQuery));

if (!empty($finalQuery) && $finalQueryString != '') {
$queries[$unionType][] = $finalQuery;
}

$defaultProcessor = new DefaultProcessor($this->options);
$rePrepareSqlString = trim(implode($outputArray));

if (!empty($rePrepareSqlString)) {
$remainingQueries = $defaultProcessor->process($rePrepareSqlString);
$queries[] = $remainingQueries;
}

return $queries;
}

public function process($inputArray) {
$outputArray = array();

Expand Down Expand Up @@ -169,14 +211,13 @@ public function process($inputArray) {
// or we don't have an UNION/UNION ALL
if (!empty($outputArray)) {
if ($unionType) {
$queries[$unionType][] = $outputArray;
$queries = $this->splitUnionRemainder($queries, $unionType, $outputArray);
} else {
$queries[] = $outputArray;
}
}

return $this->processMySQLUnion($queries);
}

}
?>
1 change: 0 additions & 1 deletion tests/bootstrap.php
Expand Up @@ -14,4 +14,3 @@ function getExpectedValue($path, $filename, $unserialize = true) {
$content = file_get_contents(dirname(__FILE__) . "/expected/" . array_pop($path) . "/" . $filename);
return ($unserialize ? unserialize($content) : $content);
}
?>
5 changes: 4 additions & 1 deletion tests/cases/parser/commentsTest.php
Expand Up @@ -32,7 +32,10 @@ public function testComments2() {
b
FROM test';
$p = $this->parser->parse($sql);
$expected = getExpectedValue(dirname(__FILE__), 'comment2.serialized');
$expectedEncoded = getExpectedValue(dirname(__FILE__), 'comment2.serialized', false);
$expectedSerialized = base64_decode($expectedEncoded);
$expected = unserialize($expectedSerialized);

$this->assertEquals($expected, $p, 'multi line comment');
}

Expand Down
16 changes: 9 additions & 7 deletions tests/cases/parser/issue117Test.php
Expand Up @@ -39,22 +39,24 @@
*
*/
namespace PHPSQLParser\Test\Parser;

use PHPSQLParser\PHPSQLParser;
use PHPSQLParser\PHPSQLCreator;
use Analog\Analog;
use PHPUnit_Framework_TestCase;

class Issue117Test extends \PHPUnit_Framework_TestCase {
public function testIssue117() {

class Issue117Test extends PHPUnit_Framework_TestCase
{
public function testIssue117()
{
// TODO: not solved, ORDER BY has been lost
$sql = "(((SELECT x FROM table)) ORDER BY x)";
//$sql = "(SELECT x FROM table) ORDER BY x";
$parser = new PHPSQLParser($sql, true);
$p = $parser->parsed;
Analog::log(print_r($p, true));

$expected = getExpectedValue(dirname(__FILE__), 'issue117.serialized');
$this->assertEquals($expected, $p, 'parentheses on the first position of statement');

$this->assertEquals($expected, $p, 'parentheses on the first position of statement');
}
}

Expand Down
15 changes: 7 additions & 8 deletions tests/cases/parser/issue95Test.php
Expand Up @@ -39,15 +39,14 @@
*
*/
namespace PHPSQLParser\Test\Parser;
use PHPSQLParser\PHPSQLParser;
use PHPSQLParser\PHPSQLCreator;

class issue95Test extends \PHPUnit_Framework_TestCase {

public function testIssue95() {

use PHPUnit_Framework_TestCase;
use PHPSQLParser\PHPSQLParser;

// TODO: not solved, the parser doesn't recognize the UNION
class issue95Test extends PHPUnit_Framework_TestCase
{
public function testIssue95()
{
$sql="SELECT * FROM ((SELECT 1 AS `ID`) UNION (SELECT 2 AS `ID`)) AS `Tmp`";

try {
Expand All @@ -56,8 +55,8 @@ public function testIssue95() {

$p = $parser->parsed;
$expected = getExpectedValue(dirname(__FILE__), 'issue95.serialized');
$this->assertEquals($expected, $p, 'union within the from clause');

$this->assertEquals($expected, $p, 'union within the from clause');
}
}

35 changes: 29 additions & 6 deletions tests/cases/parser/unionTest.php
Expand Up @@ -39,12 +39,15 @@
*
*/
namespace PHPSQLParser\Test\Parser;
use PHPUnit_Framework_TestCase;
use PHPSQLParser\PHPSQLParser;
use PHPSQLParser\PHPSQLCreator;
use Analog\Analog;

class UnionTest extends \PHPUnit_Framework_TestCase {
public function testUnion1() {
class UnionTest extends PHPUnit_Framework_TestCase
{
public function testUnion1()
{
$parser = new PHPSQLParser();

$sql = 'SELECT colA From test a
Expand All @@ -57,22 +60,42 @@ public function testUnion1() {
$this->assertEquals($expected, $p, 'simple union');
}

public function testUnion2() {
// TODO: the order-by clause has not been parsed
public function testUnion2()
{
$parser = new PHPSQLParser();
$sql = '(SELECT colA From test a)
$sql = '(SELECT colA From test a)
union all
(SELECT colB from test b) order by 1';
$p = $parser->parse($sql, true);
$expected = getExpectedValue(dirname(__FILE__), 'union2.serialized');

$this->assertEquals($expected, $p, 'mysql union with order-by');
}
public function testUnion3() {

public function testUnion3()
{
$sql = "SELECT x FROM ((SELECT y FROM z WHERE (y > 2) ) UNION ALL (SELECT a FROM z WHERE (y < 2))) as f ";
$parser = new PHPSQLParser();
$p = $parser->parse($sql, true);
$expected = getExpectedValue(dirname(__FILE__), 'union3.serialized');
$this->assertEquals($expected, $p, 'complicated mysql union');
}

public function testUnion4()
{
$parser = new PHPSQLParser();

$sql = 'SELECT colA From test a
union
SELECT colB from test
as b order by 1';

$p = $parser->parse($sql, true);
Analog::log(serialize($p));
$expectedSerialized = getExpectedValue(dirname(__FILE__), 'union4.serialized', false);
$expected = unserialize(base64_decode($expectedSerialized));

$this->assertEquals($expected, $p, 'simple union with order by and no brackets');
}
}
?>
5 changes: 1 addition & 4 deletions tests/expected/parser/comment2.serialized
@@ -1,4 +1 @@
a:2:{s:6:"SELECT";a:3:{i:0;a:6:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:1:"a";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"a";}}s:8:"sub_tree";b:0;s:5:"delim";s:1:",";}i:1;a:2:{s:9:"expr_type";s:7:"comment";s:5:"value";s:109:"/*
multi line
comment
*/";}i:2;a:6:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:1:"b";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"b";}}s:8:"sub_tree";b:0;s:5:"delim";b:0;}}s:4:"FROM";a:1:{i:0;a:10:{s:9:"expr_type";s:5:"table";s:5:"table";s:4:"test";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:4:"test";}}s:5:"alias";b:0;s:5:"hints";b:0;s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:4:"test";s:8:"sub_tree";b:0;}}}
YToyOntzOjY6IlNFTEVDVCI7YTozOntpOjA7YTo2OntzOjk6ImV4cHJfdHlwZSI7czo2OiJjb2xyZWYiO3M6NToiYWxpYXMiO2I6MDtzOjk6ImJhc2VfZXhwciI7czoxOiJhIjtzOjk6Im5vX3F1b3RlcyI7YToyOntzOjU6ImRlbGltIjtiOjA7czo1OiJwYXJ0cyI7YToxOntpOjA7czoxOiJhIjt9fXM6ODoic3ViX3RyZWUiO2I6MDtzOjU6ImRlbGltIjtzOjE6IiwiO31pOjE7YToyOntzOjk6ImV4cHJfdHlwZSI7czo3OiJjb21tZW50IjtzOjU6InZhbHVlIjtzOjEwNjoiLyogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdWx0aSBsaW5lIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tbWVudAogICAgICAgICAgICAgICAgICAgICAgICAqLyI7fWk6MjthOjY6e3M6OToiZXhwcl90eXBlIjtzOjY6ImNvbHJlZiI7czo1OiJhbGlhcyI7YjowO3M6OToiYmFzZV9leHByIjtzOjE6ImIiO3M6OToibm9fcXVvdGVzIjthOjI6e3M6NToiZGVsaW0iO2I6MDtzOjU6InBhcnRzIjthOjE6e2k6MDtzOjE6ImIiO319czo4OiJzdWJfdHJlZSI7YjowO3M6NToiZGVsaW0iO2I6MDt9fXM6NDoiRlJPTSI7YToxOntpOjA7YToxMDp7czo5OiJleHByX3R5cGUiO3M6NToidGFibGUiO3M6NToidGFibGUiO3M6NDoidGVzdCI7czo5OiJub19xdW90ZXMiO2E6Mjp7czo1OiJkZWxpbSI7YjowO3M6NToicGFydHMiO2E6MTp7aTowO3M6NDoidGVzdCI7fX1zOjU6ImFsaWFzIjtiOjA7czo1OiJoaW50cyI7YjowO3M6OToiam9pbl90eXBlIjtzOjQ6IkpPSU4iO3M6ODoicmVmX3R5cGUiO2I6MDtzOjEwOiJyZWZfY2xhdXNlIjtiOjA7czo5OiJiYXNlX2V4cHIiO3M6NDoidGVzdCI7czo4OiJzdWJfdHJlZSI7YjowO319fQ==
2 changes: 1 addition & 1 deletion tests/expected/parser/issue117.serialized
@@ -1 +1 @@
a:1:{s:7:"BRACKET";a:1:{i:0;a:4:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:36:"(((SELECT x FROM table)) ORDER BY x)";s:8:"sub_tree";a:1:{i:0;a:4:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:23:"((SELECT x FROM table))";s:8:"sub_tree";a:1:{i:0;a:4:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:21:"(SELECT x FROM table)";s:8:"sub_tree";a:1:{i:0;a:4:{s:9:"expr_type";s:5:"query";s:9:"base_expr";s:19:"SELECT x FROM table";s:8:"sub_tree";a:2:{s:6:"SELECT";a:1:{i:0;a:7:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:1:"x";s:9:"no_quotes";s:1:"x";s:8:"sub_tree";b:0;s:5:"delim";b:0;s:8:"position";i:10;}}s:4:"FROM";a:1:{i:0;a:10:{s:9:"expr_type";s:5:"table";s:5:"table";s:5:"table";s:9:"no_quotes";s:5:"table";s:5:"alias";b:0;s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:5:"table";s:8:"sub_tree";b:0;s:8:"position";i:17;}}}s:8:"position";i:3;}}s:8:"position";i:2;}}s:8:"position";i:1;}}s:8:"position";i:0;}}}
a:1:{s:7:"BRACKET";a:2:{i:0;a:4:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:36:"(((SELECT x FROM table)) ORDER BY x)";s:8:"sub_tree";a:1:{i:0;a:4:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:23:"((SELECT x FROM table))";s:8:"sub_tree";a:1:{i:0;a:4:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:21:"(SELECT x FROM table)";s:8:"sub_tree";a:1:{i:0;a:4:{s:9:"expr_type";s:5:"query";s:9:"base_expr";s:19:"SELECT x FROM table";s:8:"sub_tree";a:2:{s:6:"SELECT";a:1:{i:0;a:7:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:1:"x";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"x";}}s:8:"sub_tree";b:0;s:5:"delim";b:0;s:8:"position";i:10;}}s:4:"FROM";a:1:{i:0;a:11:{s:9:"expr_type";s:5:"table";s:5:"table";s:5:"table";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:5:"table";}}s:5:"alias";b:0;s:5:"hints";b:0;s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:5:"table";s:8:"sub_tree";b:0;s:8:"position";i:17;}}}s:8:"position";i:3;}}s:8:"position";i:2;}}s:8:"position";i:1;}}s:8:"position";i:0;}i:1;a:1:{s:5:"ORDER";a:1:{i:0;a:6:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:1:"x";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"x";}}s:8:"sub_tree";b:0;s:9:"direction";s:3:"ASC";s:8:"position";i:34;}}}}}
1 change: 1 addition & 0 deletions tests/expected/parser/issue95.serialized
@@ -0,0 +1 @@
a:2:{s:6:"SELECT";a:1:{i:0;a:5:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:1:"*";s:8:"sub_tree";b:0;s:5:"delim";b:0;}}s:4:"FROM";a:1:{i:0;a:8:{s:9:"expr_type";s:16:"table_expression";s:5:"alias";a:4:{s:2:"as";b:1;s:4:"name";s:5:"`Tmp`";s:9:"base_expr";s:8:"AS `Tmp`";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:3:"Tmp";}}}s:5:"hints";b:0;s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:43:"(SELECT 1 AS `ID`) UNION (SELECT 2 AS `ID`)";s:8:"sub_tree";a:1:{s:5:"UNION";a:2:{i:0;a:1:{s:6:"SELECT";a:1:{i:0;a:5:{s:9:"expr_type";s:5:"const";s:5:"alias";a:4:{s:2:"as";b:1;s:4:"name";s:4:"`ID`";s:9:"base_expr";s:7:"AS `ID`";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:2:"ID";}}}s:9:"base_expr";s:1:"1";s:8:"sub_tree";b:0;s:5:"delim";b:0;}}}i:1;a:1:{s:6:"SELECT";a:1:{i:0;a:5:{s:9:"expr_type";s:5:"const";s:5:"alias";a:4:{s:2:"as";b:1;s:4:"name";s:4:"`ID`";s:9:"base_expr";s:7:"AS `ID`";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:2:"ID";}}}s:9:"base_expr";s:1:"2";s:8:"sub_tree";b:0;s:5:"delim";b:0;}}}}}}}}
2 changes: 1 addition & 1 deletion tests/expected/parser/union2.serialized
@@ -1 +1 @@
a:1:{s:9:"UNION ALL";a:2:{i:0;a:2:{s:6:"SELECT";a:1:{i:0;a:6:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:4:"colA";s:9:"no_quotes";s:4:"colA";s:8:"sub_tree";b:0;s:8:"position";i:8;}}s:4:"FROM";a:1:{i:0;a:10:{s:9:"expr_type";s:5:"table";s:5:"table";s:4:"test";s:9:"no_quotes";s:4:"test";s:5:"alias";a:5:{s:2:"as";b:0;s:4:"name";s:1:"a";s:9:"no_quotes";s:1:"a";s:9:"base_expr";s:1:"a";s:8:"position";i:23;}s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:6:"test a";s:8:"sub_tree";b:0;s:8:"position";i:18;}}}i:1;a:2:{s:6:"SELECT";a:1:{i:0;a:6:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:4:"colB";s:9:"no_quotes";s:4:"colB";s:8:"sub_tree";b:0;s:8:"position";i:60;}}s:4:"FROM";a:1:{i:0;a:10:{s:9:"expr_type";s:5:"table";s:5:"table";s:4:"test";s:9:"no_quotes";s:4:"test";s:5:"alias";a:5:{s:2:"as";b:0;s:4:"name";s:1:"b";s:9:"no_quotes";s:1:"b";s:9:"base_expr";s:1:"b";s:8:"position";i:75;}s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:6:"test b";s:8:"sub_tree";b:0;s:8:"position";i:70;}}}}}
a:2:{s:9:"UNION ALL";a:2:{i:0;a:2:{s:6:"SELECT";a:1:{i:0;a:7:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:4:"colA";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:4:"colA";}}s:8:"sub_tree";b:0;s:5:"delim";b:0;s:8:"position";i:8;}}s:4:"FROM";a:1:{i:0;a:11:{s:9:"expr_type";s:5:"table";s:5:"table";s:4:"test";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:4:"test";}}s:5:"alias";a:5:{s:2:"as";b:0;s:4:"name";s:1:"a";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"a";}}s:9:"base_expr";s:1:"a";s:8:"position";i:23;}s:5:"hints";b:0;s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:6:"test a";s:8:"sub_tree";b:0;s:8:"position";i:18;}}}i:1;a:2:{s:6:"SELECT";a:1:{i:0;a:7:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:4:"colB";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:4:"colB";}}s:8:"sub_tree";b:0;s:5:"delim";b:0;s:8:"position";i:76;}}s:4:"FROM";a:1:{i:0;a:11:{s:9:"expr_type";s:5:"table";s:5:"table";s:4:"test";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:4:"test";}}s:5:"alias";a:5:{s:2:"as";b:0;s:4:"name";s:1:"b";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"b";}}s:9:"base_expr";s:1:"b";s:8:"position";i:91;}s:5:"hints";b:0;s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:6:"test b";s:8:"sub_tree";b:0;s:8:"position";i:86;}}}}i:0;a:1:{s:5:"ORDER";a:1:{i:0;a:4:{s:9:"expr_type";s:3:"pos";s:9:"base_expr";s:1:"1";s:9:"direction";s:3:"ASC";s:8:"position";i:103;}}}}
1 change: 1 addition & 0 deletions tests/expected/parser/union4.serialized
@@ -0,0 +1 @@
YToyOntzOjU6IlVOSU9OIjthOjI6e2k6MDthOjI6e3M6NjoiU0VMRUNUIjthOjE6e2k6MDthOjc6e3M6OToiZXhwcl90eXBlIjtzOjY6ImNvbHJlZiI7czo1OiJhbGlhcyI7YjowO3M6OToiYmFzZV9leHByIjtzOjQ6ImNvbEEiO3M6OToibm9fcXVvdGVzIjthOjI6e3M6NToiZGVsaW0iO2I6MDtzOjU6InBhcnRzIjthOjE6e2k6MDtzOjQ6ImNvbEEiO319czo4OiJzdWJfdHJlZSI7YjowO3M6NToiZGVsaW0iO2I6MDtzOjg6InBvc2l0aW9uIjtpOjc7fX1zOjQ6IkZST00iO2E6MTp7aTowO2E6MTE6e3M6OToiZXhwcl90eXBlIjtzOjU6InRhYmxlIjtzOjU6InRhYmxlIjtzOjQ6InRlc3QiO3M6OToibm9fcXVvdGVzIjthOjI6e3M6NToiZGVsaW0iO2I6MDtzOjU6InBhcnRzIjthOjE6e2k6MDtzOjQ6InRlc3QiO319czo1OiJhbGlhcyI7YTo1OntzOjI6ImFzIjtiOjA7czo0OiJuYW1lIjtzOjE6ImEiO3M6OToibm9fcXVvdGVzIjthOjI6e3M6NToiZGVsaW0iO2I6MDtzOjU6InBhcnRzIjthOjE6e2k6MDtzOjE6ImEiO319czo5OiJiYXNlX2V4cHIiO3M6MToiYSI7czo4OiJwb3NpdGlvbiI7aToyMjt9czo1OiJoaW50cyI7YjowO3M6OToiam9pbl90eXBlIjtzOjQ6IkpPSU4iO3M6ODoicmVmX3R5cGUiO2I6MDtzOjEwOiJyZWZfY2xhdXNlIjtiOjA7czo5OiJiYXNlX2V4cHIiO3M6NjoidGVzdCBhIjtzOjg6InN1Yl90cmVlIjtiOjA7czo4OiJwb3NpdGlvbiI7aToxNzt9fX1pOjE7YToyOntzOjY6IlNFTEVDVCI7YToxOntpOjA7YTo3OntzOjk6ImV4cHJfdHlwZSI7czo2OiJjb2xyZWYiO3M6NToiYWxpYXMiO2I6MDtzOjk6ImJhc2VfZXhwciI7czo0OiJjb2xCIjtzOjk6Im5vX3F1b3RlcyI7YToyOntzOjU6ImRlbGltIjtiOjA7czo1OiJwYXJ0cyI7YToxOntpOjA7czo0OiJjb2xCIjt9fXM6ODoic3ViX3RyZWUiO2I6MDtzOjU6ImRlbGltIjtiOjA7czo4OiJwb3NpdGlvbiI7aTo1Mzt9fXM6NDoiRlJPTSI7YToxOntpOjA7YToxMTp7czo5OiJleHByX3R5cGUiO3M6NToidGFibGUiO3M6NToidGFibGUiO3M6NDoidGVzdCI7czo5OiJub19xdW90ZXMiO2E6Mjp7czo1OiJkZWxpbSI7YjowO3M6NToicGFydHMiO2E6MTp7aTowO3M6NDoidGVzdCI7fX1zOjU6ImFsaWFzIjthOjU6e3M6MjoiYXMiO2I6MTtzOjQ6Im5hbWUiO3M6MToiYiI7czo5OiJiYXNlX2V4cHIiO3M6NDoiYXMgYiI7czo5OiJub19xdW90ZXMiO2E6Mjp7czo1OiJkZWxpbSI7YjowO3M6NToicGFydHMiO2E6MTp7aTowO3M6MToiYiI7fX1zOjg6InBvc2l0aW9uIjtpOjc3O31zOjU6ImhpbnRzIjtiOjA7czo5OiJqb2luX3R5cGUiO3M6NDoiSk9JTiI7czo4OiJyZWZfdHlwZSI7YjowO3M6MTA6InJlZl9jbGF1c2UiO2I6MDtzOjk6ImJhc2VfZXhwciI7czoxODoidGVzdCAKICAgICAgICBhcyBiIjtzOjg6InN1Yl90cmVlIjtiOjA7czo4OiJwb3NpdGlvbiI7aTo2Mzt9fX19aTowO2E6MTp7czo1OiJPUkRFUiI7YToxOntpOjA7YTo0OntzOjk6ImV4cHJfdHlwZSI7czozOiJwb3MiO3M6OToiYmFzZV9leHByIjtzOjE6IjEiO3M6OToiZGlyZWN0aW9uIjtzOjM6IkFTQyI7czo4OiJwb3NpdGlvbiI7aTo5MTt9fX19

0 comments on commit b4e8522

Please sign in to comment.