Microbenchmakrs framework + Rewrite_depth tests

main
dbalakri 2023-11-17 18:59:06 -05:00
parent 091eee1437
commit f926fa6bca
22 changed files with 591 additions and 27 deletions

Binary file not shown.

View File

@ -0,0 +1,34 @@
package com.astraldb.catalyst
import org.apache.spark.sql.catalyst.plans.logical._
import org.apache.spark.sql.catalyst.expressions._
trait StringBasedAST {
def data: String
def hasChildren: Boolean
}
case class StringLeafNode(str: String) extends LeafNode with StringBasedAST {
override def output: Seq[Attribute] = Nil
override def data = str
override def hasChildren = false
}
case class StringUnaryNode(str: String, child: LogicalPlan)
extends UnaryNode with StringBasedAST {
override def output: Seq[Attribute] = child.output
override protected def withNewChildInternal(
newChild: LogicalPlan): StringUnaryNode = copy(child = newChild)
override def data = str
override def hasChildren = true
}
case class StringBinaryNode(str: String, left: LogicalPlan, right: LogicalPlan)
extends BinaryNode with StringBasedAST {
override def output: Seq[Attribute] =
left.output.zip(right.output).map { case (leftAttr, rightAttr) =>
leftAttr.withNullability(leftAttr.nullable && rightAttr.nullable)}
override protected def withNewChildrenInternal(
newLeft: LogicalPlan, newRight: LogicalPlan): StringBinaryNode =
copy(left = newLeft, right = newRight)
override def data = str
override def hasChildren = true
}

File diff suppressed because one or more lines are too long

View File

@ -795,5 +795,46 @@ object SparkMethods
{
LocalLimit(le, p.copy(child = udf.copy(child = maybePushLocalLimit(le, udf.child))))
}
def unapplyIntegerLiteral(a: Any): Option[Int] =
{
a match {
case Literal(a: Int, IntegerType) => Some(a)
case _ => None
}
}
def intFromIntegerLiteral(a: Any): Int =
{
a match {
case Literal(a: Int, IntegerType) => a
case _ => ???
}
}
def isNilPartitionSpec(partitionSpec: Seq[Expression]): Boolean =
{
partitionSpec == Nil
}
def supportsPushdownThroughWindow(
windowExpressions: Seq[NamedExpression]): Boolean = windowExpressions.forall {
case Alias(WindowExpression(_: Rank | _: DenseRank | _: RowNumber, WindowSpecDefinition(Nil, _,
SpecifiedWindowFrame(RowFrame, UnboundedPreceding, CurrentRow))), _) => true
case _ => false
}
def limitPushdownThroughWindowMatchTest(windowExpressions: Seq[NamedExpression], child: LogicalPlan, limit: Int): Boolean =
{
val conf = SQLConf.get
supportsPushdownThroughWindow(windowExpressions) && child.maxRows.forall(_ > limit) &&
limit < conf.topKSortFallbackThreshold
}
def LimitPushDownThroughWindow1(window: Window, limitExpr: Option[Int], orderSpec: Seq[SortOrder], child: LogicalPlan): LogicalPlan =
{
window.copy(child = Limit(limitExpr.asInstanceOf[Expression], Sort(orderSpec, true, child)))
}
def LimitPushDownThroughWindow2(project: Project, window: Window, limitExpr: Option[Int], orderSpec: Seq[SortOrder], child: LogicalPlan): LogicalPlan =
{
project.copy(child = window.copy(child = Limit(limitExpr.asInstanceOf[Expression], Sort(orderSpec, true, child))))
}
}

View File

@ -72,6 +72,33 @@ object Tester
tests.map { case (name, result) => s"$name: ${result.runtime * 1000} ms (stddev = ${result.stddev * 1000}, ${result.iterations} iterations)" }.mkString("\n")
}
case class SubResults(
val input: LogicalPlan,
val astral: Result,
val bdd: Result,
)
{
def tests = Seq(
"Astral-Raw" -> astral,
"Astral-BDD" -> bdd,
)
def validate(completenessCheck: Boolean = false): Unit =
{
// assert(lesserSpark.plan == astral.plan, s"The astral plan is wrong: \n${diffPlanSummary("Spark-Fair", "Astral-Raw", lesserSpark.plan, astral.plan)}")
assert(astral.plan == bdd.plan, s"The bdd plan is wrong: \n${diffPlanSummary("Astral-Raw", "Astral-BDD", astral.plan, bdd.plan)}")
// if(completenessCheck){
// assert(spark.plan == bdd.plan, s"The final plan is not complete : \n${diffPlanSummary("Spark-Full", "Astral-BDD", spark.plan, bdd.plan)}")
// }
}
override def toString(): String =
tests.map { case (name, result) => s"\n\n$name\n$result" }.mkString
def summary: String =
tests.map { case (name, result) => s"$name: ${result.runtime * 1000} ms (stddev = ${result.stddev * 1000}, ${result.iterations} iterations)" }.mkString("\n")
}
def diffPlans(plan1: LogicalPlan, plan2: LogicalPlan): (String, String, String) =
{
val a = plan1.toString.split("\n")
@ -97,6 +124,12 @@ object Tester
println(s"Using Fair Spark Optimizer with ${LesserSparkOptimizer.rules.size} rules")
}
def dumpStatsBenchmark(): Unit =
{
println(s"Using Optimizer with ${BenchmarkOptimizer.rules.size} rule fragments based on ${BenchmarkOptimizer.rules.map { _.getClass.getSimpleName().replaceAll("\\$", "").replaceAll("[^a-zA-Z].+", "") }.toSet.size} rules")
println(s"Using BDD Optimizer with ${BenchmarkLogicalPlanBDDOptimizer.rules.size} rules")
}
def writeResultCSV(file: String, results: Seq[(String, AllResults)]): Unit =
{
val out = new BufferedWriter(new FileWriter(file))
@ -114,6 +147,23 @@ object Tester
out.close()
}
}
def writeSubResultCSV(file: String, results: Seq[(String, SubResults)]): Unit =
{
val out = new BufferedWriter(new FileWriter(file))
try {
out.write("experiment,"+results.head._2.tests.map { x =>
s"${x._1.toLowerCase}-avg,${x._1.toLowerCase}-stddev,${x._1.toLowerCase}-iter"
}.mkString(",")+"\n")
for( (label, result) <- results )
{
out.write(label+","+result.tests.map { x =>
s"${x._2.runtime},${x._2.stddev},${x._2.iterations}"
}.mkString(",")+"\n")
}
} finally {
out.close()
}
}
def test(df: DataFrame): AllResults =
{
@ -139,6 +189,19 @@ object Tester
)
}
def test(plan: LogicalPlan): SubResults =
{
SubResults(
input = plan,
astral = Result.time {
BenchmarkOptimizer.rewrite(plan)
},
bdd = Result.time {
BenchmarkLogicalPlanBDDOptimizer.rewrite(plan)
}
)
}
def fixpoint(target: LogicalPlan)(op: LogicalPlan => LogicalPlan): LogicalPlan =
{
var curr = target

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -494,6 +494,35 @@ object Catalyst extends HardcodedDefinition
Type.AST("LogicalPlan"),
Type.AST("LogicalPlan"),
)
Function("unapplyIntegerLiteral", Type.Option(Type.Int))(
Type.Any
)
Function("intFromIntegerLiteral", Type.Int)(
Type.Any
)
Function("isNilPartitionSpec", Type.Bool)(
Type.Array(Type.Native("NamedExpression"))
)
Function("limitPushdownThroughWindowMatchTest", Type.Bool)(
Type.Array(Type.Native("NamedExpression")),
Type.AST("LogicalPlan"),
Type.Int,
)
Function("LimitPushDownThroughWindow1", Type.AST("LogicalPlan"))(
Type.Node("Window"),
Type.Option(Type.Int),
Type.Array(Type.Native("SortOrder")),
Type.AST("LogicalPlan"),
)
Function("LimitPushDownThroughWindow2", Type.AST("LogicalPlan"))(
Type.Node("Project"),
Type.Node("Window"),
Type.Option(Type.Int),
Type.Array(Type.Native("SortOrder")),
Type.AST("LogicalPlan"),
)
Global("JoinHint.NONE", Type.Native("JoinHint"))
Global("RightOuter", Type.Native("JoinType"))
Global("LeftOuter", Type.Native("JoinType"))
@ -1278,6 +1307,74 @@ object Catalyst extends HardcodedDefinition
)
//////////////////////////////////////////////////////
// https://github.com/apache/spark/blob/7e689c7ed548e109f4d7f26338934789810719eb/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/LimitPushDownThroughWindow.scala#L32
Rule("LimitPushDownThroughWindow-1", "LogicalPlan")(
Match("LocalLimit")(
Bind("limitexpr"),
Bind("window", Match("Window")(
Bind("windowExpressions"),
Bind("partitionSpec"),
Bind("orderSpec"),
Bind("child")
))
) and BindExpression("limitExpr", Apply("unapplyIntegerLiteral")(
Ref("limitexpr")
)) and BindExpression("limit", Apply("intFromIntegerLiteral")(
Ref("limitexpr")
)) and Test(
Apply("isNilPartitionSpec")(
Ref("partitionSpec")
)) and Test(
Apply("limitPushdownThroughWindowMatchTest")(
Ref("windowExpressions"),
Ref("child"),
Ref("limit"),
))
)(
Apply("LimitPushDownThroughWindow1")(
Ref("window"),
Ref("limitExpr"),
Ref("orderSpec"),
Ref("child"),
)
)
Rule("LimitPushDownThroughWindow-2", "LogicalPlan")(
Match("LocalLimit")(
Bind("limitexpr"),
Bind("project", Match("Project")(
MatchAny,
Bind("window", Match("Window")(
Bind("windowExpressions"),
Bind("partitionSpec"),
Bind("orderSpec"),
Bind("child")
))
))
) and BindExpression("limitExpr", Apply("unapplyIntegerLiteral")(
Ref("limitexpr")
)) and BindExpression("limit", Apply("intFromIntegerLiteral")(
Ref("limitexpr")
)) and Test(
Apply("isNilPartitionSpec")(
Ref("partitionSpec")
)) and Test(
Apply("limitPushdownThroughWindowMatchTest")(
Ref("windowExpressions"),
Ref("child"),
Ref("limit"),
))
)(
Apply("LimitPushDownThroughWindow2")(
Ref("project"),
Ref("window"),
Ref("limitExpr"),
Ref("orderSpec"),
Ref("child"),
)
)
//////////////////////////////////////////////////////
// https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala#L850
// case p @ Project(_, p2: Project) if !p2.outputSet.subsetOf(p.references) =>

View File

@ -0,0 +1,53 @@
package com.astraldb.catalyst
import com.astraldb.spec.HardcodedDefinition
import com.astraldb.spec.Type
import scala.collection.View.Filter
object ExtendedDSL extends HardcodedDefinition
{
/////// DSL
Ast("LogicalPlan")(
Node("StringLeafNode")(
"data" -> Type.String
),
Node("StringUnaryNode")(
"data" -> Type.String,
"child" -> Type.AST("LogicalPlan")
),
Node("StringBinaryNode")(
"data" -> Type.String,
"left" -> Type.AST("LogicalPlan"),
"right" -> Type.AST("LogicalPlan")
)
)
/////// EXTERNAL FUNCTIONS
/////// REWRITE RULES
Rule("micro_rule_rewrite", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("purposesNode", Match("StringBinaryNode")(Bind("purposes"),Bind("purposesChild1"),Bind("purposesChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("purposes") eq String("purposes")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("purposes-rewritten"),Ref("purposesChild1"),Ref("purposesChild2")))))))))))))))))))))))
Rule("micro_rule_2", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("xxxssxvtNode", Match("StringBinaryNode")(Bind("xxxssxvt"),Bind("xxxssxvtChild1"),Bind("xxxssxvtChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("xxxssxvt") eq String("xxxssxvt")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("xxxssxvt-rewritten"),Ref("xxxssxvtChild1"),Ref("xxxssxvtChild2")))))))))))))))))))))))
Rule("micro_rule_3", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("upcnnctuNode", Match("StringBinaryNode")(Bind("upcnnctu"),Bind("upcnnctuChild1"),Bind("upcnnctuChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("upcnnctu") eq String("upcnnctu")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("upcnnctu-rewritten"),Ref("upcnnctuChild1"),Ref("upcnnctuChild2")))))))))))))))))))))))
Rule("micro_rule_4", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("exuicrcqNode", Match("StringBinaryNode")(Bind("exuicrcq"),Bind("exuicrcqChild1"),Bind("exuicrcqChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("exuicrcq") eq String("exuicrcq")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("exuicrcq-rewritten"),Ref("exuicrcqChild1"),Ref("exuicrcqChild2")))))))))))))))))))))))
Rule("micro_rule_5", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("njdwlmscNode", Match("StringBinaryNode")(Bind("njdwlmsc"),Bind("njdwlmscChild1"),Bind("njdwlmscChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("njdwlmsc") eq String("njdwlmsc")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("njdwlmsc-rewritten"),Ref("njdwlmscChild1"),Ref("njdwlmscChild2")))))))))))))))))))))))
Rule("micro_rule_6", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("hsmcviykNode", Match("StringBinaryNode")(Bind("hsmcviyk"),Bind("hsmcviykChild1"),Bind("hsmcviykChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("hsmcviyk") eq String("hsmcviyk")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("hsmcviyk-rewritten"),Ref("hsmcviykChild1"),Ref("hsmcviykChild2")))))))))))))))))))))))
Rule("micro_rule_7", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("iblsadiqNode", Match("StringBinaryNode")(Bind("iblsadiq"),Bind("iblsadiqChild1"),Bind("iblsadiqChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("iblsadiq") eq String("iblsadiq")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("iblsadiq-rewritten"),Ref("iblsadiqChild1"),Ref("iblsadiqChild2")))))))))))))))))))))))
Rule("micro_rule_8", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("xzngbhhpNode", Match("StringBinaryNode")(Bind("xzngbhhp"),Bind("xzngbhhpChild1"),Bind("xzngbhhpChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("xzngbhhp") eq String("xzngbhhp")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("xzngbhhp-rewritten"),Ref("xzngbhhpChild1"),Ref("xzngbhhpChild2")))))))))))))))))))))))
Rule("micro_rule_9", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("izvrqkwvNode", Match("StringBinaryNode")(Bind("izvrqkwv"),Bind("izvrqkwvChild1"),Bind("izvrqkwvChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("izvrqkwv") eq String("izvrqkwv")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("izvrqkwv-rewritten"),Ref("izvrqkwvChild1"),Ref("izvrqkwvChild2")))))))))))))))))))))))
Rule("micro_rule_10", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("gonvnpvlNode", Match("StringBinaryNode")(Bind("gonvnpvl"),Bind("gonvnpvlChild1"),Bind("gonvnpvlChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("gonvnpvl") eq String("gonvnpvl")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("gonvnpvl-rewritten"),Ref("gonvnpvlChild1"),Ref("gonvnpvlChild2")))))))))))))))))))))))
Rule("micro_rule_11", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("rmuwvhibNode", Match("StringBinaryNode")(Bind("rmuwvhib"),Bind("rmuwvhibChild1"),Bind("rmuwvhibChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("rmuwvhib") eq String("rmuwvhib")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("rmuwvhib-rewritten"),Ref("rmuwvhibChild1"),Ref("rmuwvhibChild2")))))))))))))))))))))))
Rule("micro_rule_12", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("itjqhmspNode", Match("StringBinaryNode")(Bind("itjqhmsp"),Bind("itjqhmspChild1"),Bind("itjqhmspChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("itjqhmsp") eq String("itjqhmsp")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("itjqhmsp-rewritten"),Ref("itjqhmspChild1"),Ref("itjqhmspChild2")))))))))))))))))))))))
Rule("micro_rule_13", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("ytbfzuzsNode", Match("StringBinaryNode")(Bind("ytbfzuzs"),Bind("ytbfzuzsChild1"),Bind("ytbfzuzsChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("ytbfzuzs") eq String("ytbfzuzs")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("ytbfzuzs-rewritten"),Ref("ytbfzuzsChild1"),Ref("ytbfzuzsChild2")))))))))))))))))))))))
Rule("micro_rule_14", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("fpzwdkvdNode", Match("StringBinaryNode")(Bind("fpzwdkvd"),Bind("fpzwdkvdChild1"),Bind("fpzwdkvdChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("fpzwdkvd") eq String("fpzwdkvd")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("fpzwdkvd-rewritten"),Ref("fpzwdkvdChild1"),Ref("fpzwdkvdChild2")))))))))))))))))))))))
Rule("micro_rule_15", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("viwhnicfNode", Match("StringBinaryNode")(Bind("viwhnicf"),Bind("viwhnicfChild1"),Bind("viwhnicfChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("viwhnicf") eq String("viwhnicf")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("viwhnicf-rewritten"),Ref("viwhnicfChild1"),Ref("viwhnicfChild2")))))))))))))))))))))))
Rule("micro_rule_16", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("eicdsumeNode", Match("StringBinaryNode")(Bind("eicdsume"),Bind("eicdsumeChild1"),Bind("eicdsumeChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("eicdsume") eq String("eicdsume")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("eicdsume-rewritten"),Ref("eicdsumeChild1"),Ref("eicdsumeChild2")))))))))))))))))))))))
Rule("micro_rule_17", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("kspwwzozNode", Match("StringBinaryNode")(Bind("kspwwzoz"),Bind("kspwwzozChild1"),Bind("kspwwzozChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("kspwwzoz") eq String("kspwwzoz")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("kspwwzoz-rewritten"),Ref("kspwwzozChild1"),Ref("kspwwzozChild2")))))))))))))))))))))))
Rule("micro_rule_18", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("swffyaotNode", Match("StringBinaryNode")(Bind("swffyaot"),Bind("swffyaotChild1"),Bind("swffyaotChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("swffyaot") eq String("swffyaot")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("swffyaot-rewritten"),Ref("swffyaotChild1"),Ref("swffyaotChild2")))))))))))))))))))))))
Rule("micro_rule_19", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("dytmhgurNode", Match("StringBinaryNode")(Bind("dytmhgur"),Bind("dytmhgurChild1"),Bind("dytmhgurChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("dytmhgur") eq String("dytmhgur")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("dytmhgur-rewritten"),Ref("dytmhgurChild1"),Ref("dytmhgurChild2")))))))))))))))))))))))
Rule("micro_rule_20", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("pmjgdsuzNode", Match("StringBinaryNode")(Bind("pmjgdsuz"),Bind("pmjgdsuzChild1"),Bind("pmjgdsuzChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("pmjgdsuz") eq String("pmjgdsuz")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("pmjgdsuz-rewritten"),Ref("pmjgdsuzChild1"),Ref("pmjgdsuzChild2")))))))))))))))))))))))
Rule("micro_rule_21", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("patvzsjcNode", Match("StringBinaryNode")(Bind("patvzsjc"),Bind("patvzsjcChild1"),Bind("patvzsjcChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("patvzsjc") eq String("patvzsjc")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("patvzsjc-rewritten"),Ref("patvzsjcChild1"),Ref("patvzsjcChild2")))))))))))))))))))))))
Rule("micro_rule_22", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("dyycqrhnNode", Match("StringBinaryNode")(Bind("dyycqrhn"),Bind("dyycqrhnChild1"),Bind("dyycqrhnChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("dyycqrhn") eq String("dyycqrhn")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("dyycqrhn-rewritten"),Ref("dyycqrhnChild1"),Ref("dyycqrhnChild2")))))))))))))))))))))))
Rule("micro_rule_23", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("nifglbcvNode", Match("StringBinaryNode")(Bind("nifglbcv"),Bind("nifglbcvChild1"),Bind("nifglbcvChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("nifglbcv") eq String("nifglbcv")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("nifglbcv-rewritten"),Ref("nifglbcvChild1"),Ref("nifglbcvChild2")))))))))))))))))))))))
Rule("micro_rule_24", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("bpcwgcxmNode", Match("StringBinaryNode")(Bind("bpcwgcxm"),Bind("bpcwgcxmChild1"),Bind("bpcwgcxmChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("bpcwgcxm") eq String("bpcwgcxm")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("bpcwgcxm-rewritten"),Ref("bpcwgcxmChild1"),Ref("bpcwgcxmChild2")))))))))))))))))))))))
Rule("micro_rule_25", "LogicalPlan")(Bind("thisNode", Match("StringBinaryNode")(Bind("this"),Bind("thisChild1"),Bind("isNode", Match("StringBinaryNode")(Bind("is"),Bind("isChild1"),Bind("theNode", Match("StringBinaryNode")(Bind("the"),Bind("theChild1"),Bind("pathNode", Match("StringBinaryNode")(Bind("path"),Bind("pathChild1"),Bind("thatNode", Match("StringBinaryNode")(Bind("that"),Bind("thatChild1"),Bind("needsNode", Match("StringBinaryNode")(Bind("needs"),Bind("needsChild1"),Bind("toNode", Match("StringBinaryNode")(Bind("to"),Bind("toChild1"),Bind("beNode", Match("StringBinaryNode")(Bind("be"),Bind("beChild1"),Bind("matchedNode", Match("StringBinaryNode")(Bind("matched"),Bind("matchedChild1"),Bind("andNode", Match("StringBinaryNode")(Bind("and"),Bind("andChild1"),Bind("rewrittenNode", Match("StringBinaryNode")(Bind("rewritten"),Bind("rewrittenChild1"),Bind("intoNode", Match("StringBinaryNode")(Bind("into"),Bind("intoChild1"),Bind("anNode", Match("StringBinaryNode")(Bind("an"),Bind("anChild1"),Bind("otherNode", Match("StringBinaryNode")(Bind("other"),Bind("otherChild1"),Bind("subtreeNode", Match("StringBinaryNode")(Bind("subtree"),Bind("subtreeChild1"),Bind("withNode", Match("StringBinaryNode")(Bind("with"),Bind("withChild1"),Bind("aNode", Match("StringBinaryNode")(Bind("a"),Bind("aChild1"),Bind("new_pathNode", Match("StringBinaryNode")(Bind("new_path"),Bind("new_pathChild1"),Bind("forNode", Match("StringBinaryNode")(Bind("for"),Bind("forChild1"),Bind("testingNode", Match("StringBinaryNode")(Bind("testing"),Bind("testingChild1"),Bind("bmnleqbjNode", Match("StringBinaryNode")(Bind("bmnleqbj"),Bind("bmnleqbjChild1"),Bind("bmnleqbjChild2")))))))))))))))))))))))))))))))))))))))))))and Test( Ref("this") eq String("this"))and Test( Ref("is") eq String("is"))and Test( Ref("the") eq String("the"))and Test( Ref("path") eq String("path"))and Test( Ref("that") eq String("that"))and Test( Ref("needs") eq String("needs"))and Test( Ref("to") eq String("to"))and Test( Ref("be") eq String("be"))and Test( Ref("matched") eq String("matched"))and Test( Ref("and") eq String("and"))and Test( Ref("rewritten") eq String("rewritten"))and Test( Ref("into") eq String("into"))and Test( Ref("an") eq String("an"))and Test( Ref("other") eq String("other"))and Test( Ref("subtree") eq String("subtree"))and Test( Ref("with") eq String("with"))and Test( Ref("a") eq String("a"))and Test( Ref("new_path") eq String("new_path"))and Test( Ref("for") eq String("for"))and Test( Ref("testing") eq String("testing"))and Test( Ref("bmnleqbj") eq String("bmnleqbj")))(Construct("StringBinaryNode")(String("this-rewritten"),Ref("thisChild1"),Construct("StringBinaryNode")(String("is-rewritten"),Ref("isChild1"),Construct("StringBinaryNode")(String("the-rewritten"),Ref("theChild1"),Construct("StringBinaryNode")(String("path-rewritten"),Ref("pathChild1"),Construct("StringBinaryNode")(String("that-rewritten"),Ref("thatChild1"),Construct("StringBinaryNode")(String("needs-rewritten"),Ref("needsChild1"),Construct("StringBinaryNode")(String("to-rewritten"),Ref("toChild1"),Construct("StringBinaryNode")(String("be-rewritten"),Ref("beChild1"),Construct("StringBinaryNode")(String("matched-rewritten"),Ref("matchedChild1"),Construct("StringBinaryNode")(String("and-rewritten"),Ref("andChild1"),Construct("StringBinaryNode")(String("rewritten-rewritten"),Ref("rewrittenChild1"),Construct("StringBinaryNode")(String("into-rewritten"),Ref("intoChild1"),Construct("StringBinaryNode")(String("an-rewritten"),Ref("anChild1"),Construct("StringBinaryNode")(String("other-rewritten"),Ref("otherChild1"),Construct("StringBinaryNode")(String("subtree-rewritten"),Ref("subtreeChild1"),Construct("StringBinaryNode")(String("with-rewritten"),Ref("withChild1"),Construct("StringBinaryNode")(String("a-rewritten"),Ref("aChild1"),Construct("StringBinaryNode")(String("new_path-rewritten"),Ref("new_pathChild1"),Construct("StringBinaryNode")(String("for-rewritten"),Ref("forChild1"),Construct("StringBinaryNode")(String("testing-rewritten"),Ref("testingChild1"),Construct("StringBinaryNode")(String("bmnleqbj-rewritten"),Ref("bmnleqbjChild1"),Ref("bmnleqbjChild2")))))))))))))))))))))))
}

View File

@ -15,6 +15,7 @@ object Generate
{
def main(args: Array[String]): Unit =
{
try {
Catalyst.definition.validate()
} catch {
@ -58,5 +59,32 @@ object Generate
of.close()
println(file)
try {
ExtendedDSL.definition.validate()
} catch {
case err: (AssertionError | MatchTypecheckError | ExpressionTypecheckError) =>
System.err.println(err.getMessage())
// err.printStackTrace()
System.exit(-1)
}
val treefamilies = Seq[Type.AST](
Type.AST("LogicalPlan")
)
for( (file, content) <- Render(ExtendedDSL.definition, treefamilies, true) )
{
val of = new BufferedWriter(new FileWriter(file))
of.write("""package com.astraldb.catalyst
|import org.apache.spark.sql.catalyst.expressions._
|import org.apache.spark.sql.catalyst.plans._
|import org.apache.spark.sql.catalyst.plans.logical._
|import org.apache.spark.sql.catalyst.rules.Rule
|import scala.collection.mutable
|""".stripMargin)
of.write(content)
of.close()
println(file)
}
}
}

View File

@ -5,13 +5,24 @@ import com.astraldb.spec.Type
object Optimizer
{
def apply(definition: Definition): String =
def apply(definition: Definition, benchmark: Boolean = false): String =
{
scala.Optimizer(definition.rules.map { _.safeLabel }).toString
if(benchmark)
{
scala.Optimizer(definition.rules.map { "Benchmark" + _.safeLabel }, "BenchmarkOptimizer").toString
} else {
scala.Optimizer(definition.rules.map { _.safeLabel }).toString
}
}
def bdd(family: Type.AST): String =
def bdd(family: Type.AST, benchmark: Boolean = false): String =
{
scala.BDDOptimizer(Seq(s"${family.scalaType}BDD"), s"${family.scalaType}BDDOptimizer").toString
if(benchmark)
{
scala.BDDOptimizer(Seq(s"Benchmark${family.scalaType}BDD"), s"Benchmark${family.scalaType}BDDOptimizer").toString
} else
{
scala.BDDOptimizer(Seq(s"${family.scalaType}BDD"), s"${family.scalaType}BDDOptimizer").toString
}
}
}

View File

@ -6,21 +6,39 @@ import com.astraldb.bdd
object Render
{
def apply(schema: Definition, bddFamilies: Seq[Type.AST] = Seq.empty): Map[String, String] =
def apply(schema: Definition, bddFamilies: Seq[Type.AST] = Seq.empty, benchmark: Boolean = false): Map[String, String] =
{
val bddRule: Seq[(Type.AST, bdd.BDD)] =
bddFamilies.map { f =>
f -> bdd.Compiler.bdd(schema, f)
}
if (benchmark)
{
val bddRule: Seq[(Type.AST, bdd.BDD)] =
bddFamilies.map { f =>
f -> bdd.Compiler.bdd(schema, f)
}
Map(
"BenchmarkOptimizer.scala" -> Optimizer(schema, true),
) ++ (bddRule.flatMap { case (family, bdd) => Seq(
s"Benchmark${family.scalaType}BDD.scala" -> Rule(schema, bdd, family, true),
s"Benchmark${family.scalaType}BDDOptimizer.scala" -> Optimizer.bdd(family, true)
)}.toMap) ++ schema.rules.map { rule =>
s"Benchmark${rule.safeLabel}.scala" -> Rule(schema, rule, true)
}.toMap
Map(
"Optimizer.scala" -> Optimizer(schema),
) ++ (bddRule.flatMap { case (family, bdd) => Seq(
s"${family.scalaType}BDD.scala" -> Rule(schema, bdd, family),
s"${family.scalaType}BDDOptimizer.scala" -> Optimizer.bdd(family)
)}.toMap) ++ schema.rules.map { rule =>
s"${rule.safeLabel}.scala" -> Rule(schema, rule)
}.toMap
} else {
val bddRule: Seq[(Type.AST, bdd.BDD)] =
bddFamilies.map { f =>
f -> bdd.Compiler.bdd(schema, f)
}
Map(
"Optimizer.scala" -> Optimizer(schema),
) ++ (bddRule.flatMap { case (family, bdd) => Seq(
s"${family.scalaType}BDD.scala" -> Rule(schema, bdd, family, false),
s"${family.scalaType}BDDOptimizer.scala" -> Optimizer.bdd(family)
)}.toMap) ++ schema.rules.map { rule =>
s"${rule.safeLabel}.scala" -> Rule(schema, rule)
}.toMap
}
}
def print(schema: Definition): Unit =

View File

@ -5,13 +5,25 @@ import com.astraldb.bdd
object Rule
{
def apply(schema: spec.Definition, rule: spec.Rule): String =
def apply(schema: spec.Definition, rule: spec.Rule, benchmark: Boolean = false): String =
{
scala.Rule(schema, rule).toString
if(benchmark)
{
scala.Rule(schema, rule, "Benchmark").toString
} else
{
scala.Rule(schema, rule).toString
}
}
def apply(schema: spec.Definition, rule: bdd.BDD, family: spec.Type.AST) =
def apply(schema: spec.Definition, rule: bdd.BDD, family: spec.Type.AST, benchmark: Boolean): String =
{
scala.BDDBatch(schema, family, rule).toString
if(benchmark)
{
scala.BDDBatch(schema, family, rule, "Benchmark").toString
} else
{
scala.BDDBatch(schema, family, rule).toString
}
}
}

View File

@ -4,9 +4,9 @@
@import com.astraldb.codegen
@import com.astraldb.codegen.Code
@(schema: Definition, family: Type.AST, bdd: BDD)
@(schema: Definition, family: Type.AST, bdd: BDD, clazz: String = "")
object @{family.scalaType}BDD extends Rule[@{family.scalaType}]
object @{clazz}@{family.scalaType}BDD extends Rule[@{family.scalaType}]
{
def apply(plan: @{family.scalaType}): @{family.scalaType} =
plan.transform { case plan =>

View File

@ -1,6 +1,6 @@
@import com.astraldb.spec.Definition
@(rules: Seq[String], clazz: String = "Optimizer")
@(rules: Seq[String], clazz: String = "BDDOptimizer")
object @clazz
{

View File

@ -7,7 +7,7 @@
@import com.astraldb.codegen.CodeScope
@import com.astraldb.typecheck.TypecheckMatch
@(schema: Definition, rule: Rule)
@(schema: Definition, rule: Rule, clazz: String = "")
@{
val matchSchema = TypecheckMatch(
@ -18,7 +18,7 @@
)
}
object @{rule.safeLabel} extends Rule[@{rule.family.scalaType}]
object @{clazz}@{rule.safeLabel} extends Rule[@{rule.family.scalaType}]
{
def apply(plan: @{rule.family.scalaType}): @{rule.family.scalaType} =
plan.transform { case plan =>

View File

@ -106,8 +106,8 @@ object astral extends Module
{
def scalaVersion = "2.12.15"
def generatedSources = T{ astral.catalyst.rendered() }
def mainClass = Some("com.astraldb.catalyst.TPCHTest")
def generatedSources = T{ astral.catalyst.rendered() }
def ivyDeps = Agg(
ivy"org.apache.spark::spark-sql::3.4.1",

View File

@ -0,0 +1,57 @@
import random
import string
import numpy as np
for count in [10, 20, 30, 40, 50, 60,70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]:
candidate = ['this','is', 'the', 'path', 'that', 'needs', 'to','be', 'matched', 'and', 'rewritten', 'into', 'an','other','subtree','with', 'a', 'new_path', 'for', 'testing', 'purposes']
# candidate = ['this','is', 'the', 'path', 'that']
leaf_array = []
candidate_result_array = ''
for i in range(0, len(candidate)):
ran = ''.join(random.choices(string.ascii_uppercase, k = 1))
candidate_result_array = candidate_result_array + 'StringBinaryNode("' + candidate[i] + '",' + 'StringLeafNode("' + str(ran) + '"),'
candidate_result_array = candidate_result_array + 'StringBinaryNode("+",StringLeafNode("a"),StringLeafNode("b"))'
for i in range(0, len(candidate)):
candidate_result_array = candidate_result_array + ')'
# print(candidate_result_array)
for i in range(1, count):
ran1 = ''.join(random.choices(string.ascii_uppercase, k = 1))
leaf_array.append('StringLeafNode("' + str(ran1) + '")')
leaf_array = np.array(leaf_array)
np.random.shuffle(leaf_array)
# print(leaf_array)
result_array = leaf_array
input_array = leaf_array
iter = 1
while len(input_array) != 1:
# print(len(input_array))
if (iter == 2):
result_array.append(candidate_result_array)
# np.random.shuffle(result_array)
input_array = result_array
result_array = []
for i in range(0,len(input_array),2):
if (i == len(input_array)-1):
result_array.append(input_array[i])
else:
# print(input_array)
# print(input_array[i])
# print(input_array[i+1])
punctuations = ['+', '-', '*', '&', '^', '!', '@', '#', '%','?']
ran2 = ''.join(random.choices(punctuations, k = 1))
result_array.append('StringBinaryNode("' + str(ran2) +'",' + str(input_array[i])+ ',' + str(input_array[i+1]) + ")")
iter = iter + 1
with open('generated_benchmarks/data/query_'+str(count)+'.in', 'w') as f:
print(str(input_array[0]), file = f)
# print("(RootNode" + str(input_array[0]) + ")")

View File

@ -0,0 +1,27 @@
package com.astraldb.catalyst
import com.astraldb.spec.HardcodedDefinition
import com.astraldb.spec.Type
import scala.collection.View.Filter
object ExtendedDSL extends HardcodedDefinition
{
/////// DSL
Ast("LogicalPlan")(
Node("StringLeafNode")(
"data" -> Type.String
),
Node("StringUnaryNode")(
"data" -> Type.String,
"child" -> Type.AST("LogicalPlan")
),
Node("StringBinaryNode")(
"data" -> Type.String,
"left" -> Type.AST("LogicalPlan"),
"right" -> Type.AST("LogicalPlan")
)
)
/////// EXTERNAL FUNCTIONS
/////// REWRITE RULES

View File

@ -0,0 +1,34 @@
import random
import string
import numpy as np
import sys
with open('generated_benchmarks/rewrite_depth/rules_'+sys.argv[1]+'.crule', 'r') as rule_file:
rules = rule_file.readlines()
# print(rules)
with open('astral/catalyst/src/com/astraldb/catalyst/ExtendedDSL.scala', 'w') as dsl_file:
with open('generated_benchmarks/rewrite_depth/dsl.scala') as header_file:
header = header_file.read()
footer = "}\n"
dsl_file.write(header)
for j in range(0,25):
dsl_file.write(' ' + rules[j])
dsl_file.write(footer)
with open('generated_benchmarks/data/query_1000.in','r') as data_file:
ast = data_file.read()
with open('astral/catalyst/impl/src/com/astraldb/catalyst/Microbenchmarks.scala', 'w') as test_file:
header = "package com.astraldb.catalyst\nobject Microbenchmarks {\n \tdef main(args: Array[String]): Unit = {\n\t\tTester.dumpStatsBenchmark()\n"
data = "\t\tval tree = " + ast
test = "\t\tprintln(\"===================================\")\n\t\tprintln(s\"Query_1000\")\n\t\tprintln(\"===================================\")\n\t\tval result = Tester.test(tree)\n\t\tprintln(result.summary)\n\t\tTester.writeResultCSV(\"benchmark_"+sys.argv[1]+".csv\", Seq((s\"benchmark\", result))"
footer = "\n\t}\n}\n"
test_file.write(header)
test_file.write(data)
test_file.write(test)
test_file.write(footer)
test_file.close()

View File

@ -0,0 +1,76 @@
import random
import string
import numpy as np
match_string = ['this','is', 'the', 'path', 'that', 'needs', 'to','be', 'matched', 'and', 'rewritten', 'into', 'an','other','subtree','with', 'a', 'new_path', 'for', 'testing', 'purposes']
# match_string = ['this','is', 'the']
# match_string = ['this','is', 'the', 'path', 'that', 'needs', 'to','be', 'rewritten']
def rule_gen_recursive(random_match_string, rule_name):
# print(random_match_string)
subs_string = random_match_string
random_match_string_replacement = []
rule_string_recursive = ''
# rule_string_recursive += rule_string_recursive + '(define matched_rule_' + str(count_recursive) +' (matchAndReplace (bind Root (mPHeadTail (mPExact RootNode) (mPItemInDeepUnless (mPExact this) (mPHeadTail (bind this (mPExact this))'
rule_string_recursive += rule_string_recursive + 'Rule("micro_rule_' + rule_name +'", "LogicalPlan")('
for elem in random_match_string:
random_match_string_replacement.append('Bind("' + elem + 'Node", Match("StringBinaryNode")(Bind("'+elem+'"),Bind("'+elem+'Child1"),')
for elem in random_match_string_replacement:
target_index = random_match_string_replacement.index(elem)
random_match_string_replacement[target_index] = elem
for elem in random_match_string_replacement:
rule_string_recursive += elem
rule_string_recursive += 'Bind("'+random_match_string[-1]+'Child2")'
for elem in random_match_string:
rule_string_recursive +='))'
for elem in random_match_string:
rule_string_recursive += 'and Test( Ref("' +elem+'") eq String("'+elem+'"))'
rule_string_recursive += ')'
rule_string_recursive += '('
for elem in subs_string:
rule_string_recursive += 'Construct("StringBinaryNode")(String("'+elem+'-rewritten"),Ref("'+elem+'Child1"),'
rule_string_recursive += 'Ref("' + subs_string[-1] + 'Child2")'
for elem in subs_string:
rule_string_recursive +=')'
rule_string_recursive += ') '
# rule_string_recursive += '))'
# print(rule_string_recursive)
# print(rule_string_recursive, file = f)
return rule_string_recursive.strip() + "\n"
depth = [1,2,3,4,5,6,7,8,9,10,15,20,25]
rule_count = 25
for i in depth:
count_recursive = 1
with open('generated_benchmarks/rewrite_depth/rules_'+str(i)+'.crule', 'w') as f:
for l in range(0, rule_count):
random_match_string = match_string[0:20]
for m in range(0, (len(match_string)-len(random_match_string))):
size = len(match_string[len(random_match_string)])
if (size == 1 or size == 3 or size == 2):
strlen = 5
else:
strlen = size
ran = ''.join(random.choices(string.ascii_lowercase, k = strlen))
random_match_string.append(ran)
# print(random_match_string)
f.write(rule_gen_recursive(random_match_string, str(count_recursive)))
count_recursive = count_recursive + 1
f.close()
with open('generated_benchmarks/rewrite_depth/rules_'+str(i)+'.crule', 'r') as file:
data = file.readlines()
data[i-1] = rule_gen_recursive(match_string, "rewrite")
with open('generated_benchmarks/rewrite_depth/rules_'+str(i)+'.crule', 'w') as file:
file.writelines(data)