atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shweth...@apache.org
Subject [2/4] incubator-atlas git commit: ATLAS-128 DSL - Add support for comparisions on list type (suma.shivaprasad via shwethags)
Date Mon, 05 Oct 2015 15:48:33 GMT
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/7660c9b2/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala
----------------------------------------------------------------------
diff --git a/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala b/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala
index 957a566..888486c 100755
--- a/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala
+++ b/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala
@@ -19,8 +19,12 @@
 package org.apache.atlas.query
 
 import com.thinkaurelius.titan.core.TitanGraph
+import com.thinkaurelius.titan.core.util.TitanCleanup
+import org.apache.atlas.discovery.graph.DefaultGraphPersistenceStrategy
 import org.apache.atlas.query.Expressions._
+import org.apache.atlas.repository.graph.{TitanGraphProvider, GraphBackedMetadataRepository}
 import org.apache.atlas.typesystem.types.TypeSystem
+import org.junit.Test
 import org.junit.runner.RunWith
 import org.scalatest.Matchers._
 import org.scalatest._
@@ -29,508 +33,1031 @@ import org.scalatest.junit.JUnitRunner
 @RunWith(classOf[JUnitRunner])
 class GremlinTest extends FunSuite with BeforeAndAfterAll with BaseGremlinTest {
 
-    var g: TitanGraph = null
+  var g: TitanGraph = null
+  var gp: GraphPersistenceStrategies = null;
+  var gProvider: TitanGraphProvider = null;
 
-    override def beforeAll() {
-        TypeSystem.getInstance().reset()
-        QueryTestsUtils.setupTypes
-        g = QueryTestsUtils.setupTestGraph
-    }
+  override def beforeAll() {
+    TypeSystem.getInstance().reset()
+    QueryTestsUtils.setupTypes
+    gProvider = new TitanGraphProvider();
+    gp = new DefaultGraphPersistenceStrategy(new GraphBackedMetadataRepository(gProvider))
+    g = QueryTestsUtils.setupTestGraph(gProvider)
 
-    override def afterAll() {
-        g.shutdown()
-    }
+  }
 
-    test("testClass") {
-        val r = QueryProcessor.evaluate(_class("DB"), g)
-        validateJson(r, "{\n  \"query\":\"DB\",\n  \"dataType\":{\n    \"superTypes\":[\n      \n    ],\n    \"hierarchicalMetaTypeName\":\"org.apache.atlas.typesystem.types.ClassType\",\n    \"typeName\":\"DB\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"name\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"owner\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"createTime\",\n        \"dataTypeName\":\"int\",\n    
     \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"DB\",\n      \"$id$\":{\n        \"id\":\"256\",\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"owner\":\"John ETL\",\n      \"name\":\"Sales\",\n      \"createTime\":1000\n    },\n    {\n      \"$typeName$\":\"DB\",\n      \"$id$\":{\n        \"id\":\"7424\",\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"owner\":\"Jane BI\",\n      \"name\":\"Reporting\",\n      \"createTime\":1500\n    }\n  ]\n}")
+  override def afterAll() {
+    g.shutdown()
+    try {
+      TitanCleanup.clear(g);
+    } catch {
+      case ex: Exception =>
+        print("Could not clear the graph ", ex);
     }
+  }
 
-    test("testName") {
-        val r = QueryProcessor.evaluate(_class("DB").field("name"), g)
-        validateJson(r, "{\n  \"query\":\"DB.name\",\n  \"dataType\":\"string\",\n  \"rows\":[\n    \"Sales\",\n    \"Reporting\"\n  ]\n}")
-    }
+  test("testClass") {
+    val r = QueryProcessor.evaluate(_class("DB"), g, gp)
+    validateJson(r, """{
+                      |    "query": "DB",
+                      |    "dataType": {
+                      |        "superTypes": [
+                      |
+                      |        ],
+                      |        "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
+                      |        "typeName": "DB",
+                      |        "attributeDefinitions": [
+                      |            {
+                      |                "name": "name",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "owner",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "createTime",
+                      |                "dataTypeName": "int",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                 },
+                      |                "isComposite": false,
+                      |               "isUnique": false,
+                      |               "isIndexable": true,
+                      |               "reverseAttributeName": null
+                      |
+                      |            },
+                      |            {
+                      |                "name": "clusterName",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |               "isComposite": false,
+                      |               "isUnique": false,
+                      |               "isIndexable": true,
+                      |               "reverseAttributeName": null
+                      |            }
+                      |            ]
+                      |        },
+                      |        "rows": [
+                      |            {
+                      |                "$typeName$": "DB",
+                      |                "$id$": {
+                      |                    "$typeName$": "DB",
+                      |                    "version": 0
+                      |                },
+                      |                "owner": "John ETL",
+                      |                "name": "Sales",
+                      |                "createTime": 1000,
+                      |                "clusterName": "test"
+                      |            },
+                      |            {
+                      |                "$typeName$": "DB",
+                      |                "$id$": {
+                      |                    "$typeName$": "DB",
+                      |                    "version": 0
+                      |                },
+                      |                "owner": "Jane BI",
+                      |                "name": "Reporting",
+                      |                "createTime": 1500,
+                      |                "clusterName": "test"
+                      |            }
+                      |        ]
+                      |    }""".stripMargin)
+  }
 
-    test("testFilter") {
-        var r = QueryProcessor.evaluate(_class("DB").where(id("name").`=`(string("Reporting"))), g)
-        validateJson(r, "{\n  \"query\":\"DB where (name = \\\"Reporting\\\")\",\n  \"dataType\":{\n    \"superTypes\":[\n      \n    ],\n    \"hierarchicalMetaTypeName\":\"org.apache.atlas.typesystem.types.ClassType\",\n    \"typeName\":\"DB\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"name\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"owner\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"createTime\",\n      
   \"dataTypeName\":\"int\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"DB\",\n      \"$id$\":{\n        \"id\":\"7424\",\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"owner\":\"Jane BI\",\n      \"name\":\"Reporting\",\n      \"createTime\":1500\n    }\n  ]\n}")
-    }
+  test("testName") {
+    val r = QueryProcessor.evaluate(_class("DB").field("name"), g, gp)
+    validateJson(r, "{\n  \"query\":\"DB.name\",\n  \"dataType\":\"string\",\n  \"rows\":[\n    \"Sales\",\n    \"Reporting\"\n  ]\n}")
+  }
 
-    test("testFilter2") {
-        var r = QueryProcessor.evaluate(_class("DB").where(id("DB").field("name").`=`(string("Reporting"))), g)
-        validateJson(r, "{\n  \"query\":\"DB where (name = \\\"Reporting\\\")\",\n  \"dataType\":{\n    \"superTypes\":[\n      \n    ],\n    \"hierarchicalMetaTypeName\":\"org.apache.atlas.typesystem.types.ClassType\",\n    \"typeName\":\"DB\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"name\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"owner\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"createTime\",\n      
   \"dataTypeName\":\"int\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"DB\",\n      \"$id$\":{\n        \"id\":\"7424\",\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"owner\":\"Jane BI\",\n      \"name\":\"Reporting\",\n      \"createTime\":1500\n    }\n  ]\n}")
-    }
+  test("testFilter") {
+    var r = QueryProcessor.evaluate(_class("DB").where(id("name").`=`(string("Reporting"))), g, gp)
+    validateJson(r, """{
+                      |    "query": "DB where (name = \"Reporting\")",
+                      |    "dataType": {
+                      |        "superTypes": [],
+                      |        "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
+                      |        "typeName": "DB",
+                      |        "attributeDefinitions": [
+                      |            {
+                      |                "name": "name",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "owner",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "createTime",
+                      |                "dataTypeName": "int",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "clusterName",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |               "isComposite": false,
+                      |               "isUnique": false,
+                      |               "isIndexable": true,
+                      |               "reverseAttributeName": null
+                      |            }
+                      |        ]
+                      |    },
+                      |    "rows": [
+                      |        {
+                      |            "$typeName$": "DB",
+                      |            "$id$": {
+                      |                "$typeName$": "DB",
+                      |                "version": 0
+                      |            },
+                      |            "owner": "Jane BI",
+                      |            "name": "Reporting",
+                      |            "createTime": 1500,
+                      |            "clusterName": "test"
+                      |        }
+                      |    ]
+                      |}""".stripMargin);
+  }
 
+  test("testFilter2") {
+    var r = QueryProcessor.evaluate(_class("DB").where(id("DB").field("name").`=`(string("Reporting"))), g, gp)
+    validateJson(r, """{
+                      |    "query": "DB where (name = \"Reporting\")",
+                      |    "dataType": {
+                      |        "superTypes": [],
+                      |        "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
+                      |        "typeName": "DB",
+                      |        "attributeDefinitions": [
+                      |            {
+                      |                "name": "name",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "owner",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "createTime",
+                      |                "dataTypeName": "int",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "clusterName",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |               "isComposite": false,
+                      |               "isUnique": false,
+                      |               "isIndexable": true,
+                      |               "reverseAttributeName": null
+                      |            }
+                      |        ]
+                      |    },
+                      |    "rows": [
+                      |        {
+                      |            "$typeName$": "DB",
+                      |            "$id$": {
+                      |                "$typeName$": "DB",
+                      |                "version": 0
+                      |            },
+                      |            "owner": "Jane BI",
+                      |            "name": "Reporting",
+                      |            "createTime": 1500,
+                      |            "clusterName": "test"
+                      |        }
+                      |    ]
+                      |}""".stripMargin);
+  }
 
-    test("testSelect") {
-        val r = QueryProcessor.evaluate(_class("DB").where(id("name").`=`(string("Reporting"))).
-            select(id("name"), id("owner")), g)
-        validateJson(r, "{\n  \"query\":\"DB where (name = \\\"Reporting\\\") as _src1 select _src1.name as _col_0, _src1.owner as _col_1\",\n  \"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct1\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"_col_0\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"_col_1\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"__tempQueryResultStruct1\",\n
       \"_col_1\":\"Jane BI\",\n      \"_col_0\":\"Reporting\"\n    }\n  ]\n}")
-    }
+  test("testSelect") {
+    val r = QueryProcessor.evaluate(_class("DB").where(id("name").`=`(string("Reporting"))).
+      select(id("name"), id("owner")), g, gp)
+    validateJson(r, """{
+                      |    "query": "DB where (name = \"Reporting\") as _src1 select _src1.name as _col_0, _src1.owner as _col_1",
+                      |    "dataType": {
+                      |        "typeName": "__tempQueryResultStruct1",
+                      |        "attributeDefinitions": [
+                      |            {
+                      |                "name": "_col_0",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "_col_1",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            }
+                      |        ]
+                      |    },
+                      |    "rows": [
+                      |        {
+                      |            "$typeName$": "__tempQueryResultStruct1",
+                      |            "_col_1": "Jane BI",
+                      |            "_col_0": "Reporting"
+                      |        }
+                      |    ]
+                      |}""".stripMargin);
+  }
 
-    test("testIsTrait") {
-        val r = QueryProcessor.evaluate(_class("Table").where(isTrait("Dimension")), g)
-        validateJson(r, """{
-                          |  "query":"Table where Table is Dimension",
-                          |  "dataType":{
-                          |    "superTypes":[
-                          |
-                          |    ],
-                          |    "hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.ClassType",
-                          |    "typeName":"Table",
-                          |    "attributeDefinitions":[
-                          |      {
-                          |        "name":"name",
-                          |        "dataTypeName":"string",
-                          |        "multiplicity":{
-                          |          "lower":0,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      },
-                          |      {
-                          |        "name":"db",
-                          |        "dataTypeName":"DB",
-                          |        "multiplicity":{
-                          |          "lower":1,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      },
-                          |      {
-                          |        "name":"sd",
-                          |        "dataTypeName":"StorageDesc",
-                          |        "multiplicity":{
-                          |          "lower":1,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      },
-                          |      {
-                          |        "name":"created",
-                          |        "dataTypeName":"date",
-                          |        "multiplicity":{
-                          |          "lower":0,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      }
-                          |    ]
-                          |  },
-                          |  "rows":[
-                          |    {
-                          |      "$typeName$":"Table",
-                          |      "$id$":{
-                          |        "$typeName$":"Table",
-                          |        "version":0
-                          |      },
-                          |      "created":"2014-12-11T02:35:58.440Z",
-                          |      "sd":{
-                          |        "$typeName$":"StorageDesc",
-                          |        "version":0
-                          |      },
-                          |      "db":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "name":"product_dim",
-                          |      "$traits$":{
-                          |        "Dimension":{
-                          |          "$typeName$":"Dimension"
-                          |        }
-                          |      }
-                          |    },
-                          |    {
-                          |      "$typeName$":"Table",
-                          |      "$id$":{
-                          |        "$typeName$":"Table",
-                          |        "version":0
-                          |      },
-                          |      "created":"2014-12-11T02:35:58.440Z",
-                          |      "sd":{
-                          |        "$typeName$":"StorageDesc",
-                          |        "version":0
-                          |      },
-                          |      "db":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "name":"time_dim",
-                          |      "$traits$":{
-                          |        "Dimension":{
-                          |          "$typeName$":"Dimension"
-                          |        }
-                          |      }
-                          |    },
-                          |    {
-                          |      "$typeName$":"Table",
-                          |      "$id$":{
-                          |        "$typeName$":"Table",
-                          |        "version":0
-                          |      },
-                          |      "created":"2014-12-11T02:35:58.440Z",
-                          |      "sd":{
-                          |        "$typeName$":"StorageDesc",
-                          |        "version":0
-                          |      },
-                          |      "db":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "name":"customer_dim",
-                          |      "$traits$":{
-                          |        "Dimension":{
-                          |          "$typeName$":"Dimension"
-                          |        }
-                          |      }
-                          |    }
-                          |  ]
-                          |}""".stripMargin)
-    }
+  test("testIsTrait") {
+    val r = QueryProcessor.evaluate(_class("Table").where(isTrait("Dimension")), g, gp)
+    validateJson(r, """{
+                      |  "query":"Table where Table is Dimension",
+                      |  "dataType":{
+                      |    "superTypes":[
+                      |
+                      |    ],
+                      |    "hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.ClassType",
+                      |    "typeName":"Table",
+                      |    "attributeDefinitions":[
+                      |      {
+                      |        "name":"name",
+                      |        "dataTypeName":"string",
+                      |        "multiplicity":{
+                      |          "lower":0,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      },
+                      |      {
+                      |        "name":"db",
+                      |        "dataTypeName":"DB",
+                      |        "multiplicity":{
+                      |          "lower":1,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      },
+                      |      {
+                      |        "name":"sd",
+                      |        "dataTypeName":"StorageDescriptor",
+                      |        "multiplicity":{
+                      |          "lower":1,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      },
+                      |      {
+                      |        "name":"created",
+                      |        "dataTypeName":"date",
+                      |        "multiplicity":{
+                      |          "lower":0,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      }
+                      |    ]
+                      |  },
+                      |  "rows":[
+                      |    {
+                      |      "$typeName$":"Table",
+                      |      "$id$":{
+                      |        "$typeName$":"Table",
+                      |        "version":0
+                      |      },
+                      |      "created":"2014-12-11T02:35:58.440Z",
+                      |      "sd":{
+                      |        "$typeName$":"StorageDescriptor",
+                      |        "version":0
+                      |      },
+                      |      "db":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "name":"product_dim",
+                      |      "$traits$":{
+                      |        "Dimension":{
+                      |          "$typeName$":"Dimension"
+                      |        }
+                      |      }
+                      |    },
+                      |    {
+                      |      "$typeName$":"Table",
+                      |      "$id$":{
+                      |        "$typeName$":"Table",
+                      |        "version":0
+                      |      },
+                      |      "created":"2014-12-11T02:35:58.440Z",
+                      |      "sd":{
+                      |        "$typeName$":"StorageDescriptor",
+                      |        "version":0
+                      |      },
+                      |      "db":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "name":"time_dim",
+                      |      "$traits$":{
+                      |        "Dimension":{
+                      |          "$typeName$":"Dimension"
+                      |        }
+                      |      }
+                      |    },
+                      |    {
+                      |      "$typeName$":"Table",
+                      |      "$id$":{
+                      |        "$typeName$":"Table",
+                      |        "version":0
+                      |      },
+                      |      "created":"2014-12-11T02:35:58.440Z",
+                      |      "sd":{
+                      |        "$typeName$":"StorageDescriptor",
+                      |        "version":0
+                      |      },
+                      |      "db":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "name":"customer_dim",
+                      |      "$traits$":{
+                      |        "Dimension":{
+                      |          "$typeName$":"Dimension"
+                      |        }
+                      |      }
+                      |    }
+                      |  ]
+                      |}""".stripMargin)
+  }
 
-    test("testhasField") {
-        val r = QueryProcessor.evaluate(_class("DB").where(hasField("name")), g)
-        validateJson(r, """{
-                          |  "query":"DB where DB has name",
-                          |  "dataType":{
-                          |    "superTypes":[
-                          |
-                          |    ],
-                          |    "hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.ClassType",
-                          |    "typeName":"DB",
-                          |    "attributeDefinitions":[
-                          |      {
-                          |        "name":"name",
-                          |        "dataTypeName":"string",
-                          |        "multiplicity":{
-                          |          "lower":0,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      },
-                          |      {
-                          |        "name":"owner",
-                          |        "dataTypeName":"string",
-                          |        "multiplicity":{
-                          |          "lower":0,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      },
-                          |      {
-                          |        "name":"createTime",
-                          |        "dataTypeName":"int",
-                          |        "multiplicity":{
-                          |          "lower":0,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      }
-                          |    ]
-                          |  },
-                          |  "rows":[
-                          |    {
-                          |      "$typeName$":"DB",
-                          |      "$id$":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "owner":"John ETL",
-                          |      "name":"Sales",
-                          |      "createTime":1000
-                          |    },
-                          |    {
-                          |      "$typeName$":"DB",
-                          |      "$id$":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "owner":"Jane BI",
-                          |      "name":"Reporting",
-                          |      "createTime":1500
-                          |    }
-                          |  ]
-                          |}""".stripMargin)
-    }
+  test("testhasField") {
+    val r = QueryProcessor.evaluate(_class("DB").where(hasField("name")), g, gp)
+    validateJson(r, """{
+                      |  "query":"DB where DB has name",
+                      |  "dataType":{
+                      |    "superTypes":[
+                      |
+                      |    ],
+                      |    "hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.ClassType",
+                      |    "typeName":"DB",
+                      |    "attributeDefinitions":[
+                      |      {
+                      |        "name":"name",
+                      |        "dataTypeName":"string",
+                      |        "multiplicity":{
+                      |          "lower":0,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      },
+                      |      {
+                      |        "name":"owner",
+                      |        "dataTypeName":"string",
+                      |        "multiplicity":{
+                      |          "lower":0,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      },
+                      |      {
+                      |        "name":"createTime",
+                      |        "dataTypeName":"int",
+                      |        "multiplicity":{
+                      |          "lower":0,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      },
+                      |      {
+                      |        "name":"clusterName",
+                      |        "dataTypeName":"string",
+                      |        "multiplicity":{
+                      |          "lower":0,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      }
+                      |    ]
+                      |  },
+                      |  "rows":[
+                      |    {
+                      |      "$typeName$":"DB",
+                      |      "$id$":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "owner":"John ETL",
+                      |      "name":"Sales",
+                      |      "createTime":1000,
+                      |      "clusterName":"test"
+                      |    },
+                      |    {
+                      |      "$typeName$":"DB",
+                      |      "$id$":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "owner":"Jane BI",
+                      |      "name":"Reporting",
+                      |      "createTime":1500,
+                      |      "clusterName":"test"
+                      |    }
+                      |  ]
+                      |}""".stripMargin)
+  }
 
-    test("testFieldReference") {
-        val r = QueryProcessor.evaluate(_class("DB").field("Table"), g)
-        validateJson(r, """{
-                          |  "query":"DB Table",
-                          |  "dataType":{
-                          |    "superTypes":[      ],
-                          |    "hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.ClassType",
-                          |    "typeName":"Table",
-                          |    "attributeDefinitions":[
-                          |      {
-                          |        "name":"name",
-                          |        "dataTypeName":"string",
-                          |        "multiplicity":{
-                          |          "lower":0,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      },
-                          |      {
-                          |        "name":"db",
-                          |        "dataTypeName":"DB",
-                          |        "multiplicity":{
-                          |          "lower":1,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      },
-                          |      {
-                          |        "name":"sd",
-                          |        "dataTypeName":"StorageDesc",
-                          |        "multiplicity":{
-                          |          "lower":1,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      },
-                          |      {
-                          |        "name":"created",
-                          |        "dataTypeName":"date",
-                          |        "multiplicity":{
-                          |          "lower":0,
-                          |          "upper":1,
-                          |          "isUnique":false
-                          |        },
-                          |        "isComposite":false,
-                          |        "isUnique":false,
-                          |        "isIndexable":true,
-                          |        "reverseAttributeName":null
-                          |      }
-                          |    ]
-                          |  },
-                          |  "rows":[
-                          |    {
-                          |      "$typeName$":"Table",
-                          |      "$id$":{
-                          |        "$typeName$":"Table",
-                          |        "version":0
-                          |      },
-                          |      "created":"2014-12-11T02:35:58.440Z",
-                          |      "sd":{
-                          |        "$typeName$":"StorageDesc",
-                          |        "version":0
-                          |      },
-                          |      "db":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "name":"sales_fact"
-                          |    },
-                          |    {
-                          |      "$typeName$":"Table",
-                          |      "$id$":{
-                          |        "$typeName$":"Table",
-                          |        "version":0
-                          |      },
-                          |      "created":"2014-12-11T02:35:58.440Z",
-                          |      "sd":{
-                          |        "$typeName$":"StorageDesc",
-                          |        "version":0
-                          |      },
-                          |      "db":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "name":"product_dim",
-                          |      "$traits$":{
-                          |        "Dimension":{
-                          |          "$typeName$":"Dimension"
-                          |        }
-                          |      }
-                          |    },
-                          |    {
-                          |      "$typeName$":"Table",
-                          |      "$id$":{
-                          |        "$typeName$":"Table",
-                          |        "version":0
-                          |      },
-                          |      "created":"2014-12-11T02:35:58.440Z",
-                          |      "sd":{
-                          |        "$typeName$":"StorageDesc",
-                          |        "version":0
-                          |      },
-                          |      "db":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "name":"time_dim",
-                          |      "$traits$":{
-                          |        "Dimension":{
-                          |          "$typeName$":"Dimension"
-                          |        }
-                          |      }
-                          |    },
-                          |    {
-                          |      "$typeName$":"Table",
-                          |      "$id$":{
-                          |        "$typeName$":"Table",
-                          |        "version":0
-                          |      },
-                          |      "created":"2014-12-11T02:35:58.440Z",
-                          |      "sd":{
-                          |        "$typeName$":"StorageDesc",
-                          |        "version":0
-                          |      },
-                          |      "db":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "name":"customer_dim",
-                          |      "$traits$":{
-                          |        "Dimension":{
-                          |          "$typeName$":"Dimension"
-                          |        }
-                          |      }
-                          |    },
-                          |    {
-                          |      "$typeName$":"Table",
-                          |      "$id$":{
-                          |        "$typeName$":"Table",
-                          |        "version":0
-                          |      },
-                          |      "created":"2014-12-11T02:35:58.440Z",
-                          |      "sd":{
-                          |        "$typeName$":"StorageDesc",
-                          |        "version":0
-                          |      },
-                          |      "db":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "name":"sales_fact_daily_mv"
-                          |    },
-                          |    {
-                          |      "$typeName$":"Table",
-                          |      "$id$":{
-                          |        "$typeName$":"Table",
-                          |        "version":0
-                          |      },
-                          |      "created":"2014-12-11T02:35:58.440Z",
-                          |      "sd":{
-                          |        "$typeName$":"StorageDesc",
-                          |        "version":0
-                          |      },
-                          |      "db":{
-                          |        "$typeName$":"DB",
-                          |        "version":0
-                          |      },
-                          |      "name":"sales_fact_monthly_mv"
-                          |    }
-                          |  ]
-                          |}""".stripMargin);
-    }
+  test("testFieldReference") {
+    val r = QueryProcessor.evaluate(_class("DB").field("Table"), g, gp)
+    validateJson(r, """{
+                      |  "query":"DB Table",
+                      |  "dataType":{
+                      |    "superTypes":[      ],
+                      |    "hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.ClassType",
+                      |    "typeName":"Table",
+                      |    "attributeDefinitions":[
+                      |      {
+                      |        "name":"name",
+                      |        "dataTypeName":"string",
+                      |        "multiplicity":{
+                      |          "lower":0,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      },
+                      |      {
+                      |        "name":"db",
+                      |        "dataTypeName":"DB",
+                      |        "multiplicity":{
+                      |          "lower":1,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      },
+                      |      {
+                      |        "name":"sd",
+                      |        "dataTypeName":"StorageDescriptor",
+                      |        "multiplicity":{
+                      |          "lower":1,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      },
+                      |      {
+                      |        "name":"created",
+                      |        "dataTypeName":"date",
+                      |        "multiplicity":{
+                      |          "lower":0,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      }
+                      |    ]
+                      |  },
+                      |  "rows":[
+                      |    {
+                      |      "$typeName$":"Table",
+                      |      "$id$":{
+                      |        "$typeName$":"Table",
+                      |        "version":0
+                      |      },
+                      |      "created":"2014-12-11T02:35:58.440Z",
+                      |      "sd":{
+                      |        "$typeName$":"StorageDescriptor",
+                      |        "version":0
+                      |      },
+                      |      "db":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "name":"sales_fact"
+                      |    },
+                      |    {
+                      |      "$typeName$":"Table",
+                      |      "$id$":{
+                      |        "$typeName$":"Table",
+                      |        "version":0
+                      |      },
+                      |      "created":"2014-12-11T02:35:58.440Z",
+                      |      "sd":{
+                      |        "$typeName$":"StorageDescriptor",
+                      |        "version":0
+                      |      },
+                      |      "db":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "name":"product_dim",
+                      |      "$traits$":{
+                      |        "Dimension":{
+                      |          "$typeName$":"Dimension"
+                      |        }
+                      |      }
+                      |    },
+                      |    {
+                      |      "$typeName$":"Table",
+                      |      "$id$":{
+                      |        "$typeName$":"Table",
+                      |        "version":0
+                      |      },
+                      |      "created":"2014-12-11T02:35:58.440Z",
+                      |      "sd":{
+                      |        "$typeName$":"StorageDescriptor",
+                      |        "version":0
+                      |      },
+                      |      "db":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "name":"time_dim",
+                      |      "$traits$":{
+                      |        "Dimension":{
+                      |          "$typeName$":"Dimension"
+                      |        }
+                      |      }
+                      |    },
+                      |    {
+                      |      "$typeName$":"Table",
+                      |      "$id$":{
+                      |        "$typeName$":"Table",
+                      |        "version":0
+                      |      },
+                      |      "created":"2014-12-11T02:35:58.440Z",
+                      |      "sd":{
+                      |        "$typeName$":"StorageDescriptor",
+                      |        "version":0
+                      |      },
+                      |      "db":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "name":"customer_dim",
+                      |      "$traits$":{
+                      |        "Dimension":{
+                      |          "$typeName$":"Dimension"
+                      |        }
+                      |      }
+                      |    },
+                      |    {
+                      |      "$typeName$":"Table",
+                      |      "$id$":{
+                      |        "$typeName$":"Table",
+                      |        "version":0
+                      |      },
+                      |      "created":"2014-12-11T02:35:58.440Z",
+                      |      "sd":{
+                      |        "$typeName$":"StorageDescriptor",
+                      |        "version":0
+                      |      },
+                      |      "db":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "name":"sales_fact_daily_mv"
+                      |    },
+                      |    {
+                      |      "$typeName$":"Table",
+                      |      "$id$":{
+                      |        "$typeName$":"Table",
+                      |        "version":0
+                      |      },
+                      |      "created":"2014-12-11T02:35:58.440Z",
+                      |      "sd":{
+                      |        "$typeName$":"StorageDescriptor",
+                      |        "version":0
+                      |      },
+                      |      "db":{
+                      |        "$typeName$":"DB",
+                      |        "version":0
+                      |      },
+                      |      "name":"sales_fact_monthly_mv"
+                      |    }
+                      |  ]
+                      |}""".stripMargin);
+  }
 
-    test("testBackReference") {
-        val r = QueryProcessor.evaluate(
-            _class("DB").as("db").field("Table").where(id("db").field("name").`=`(string("Reporting"))), g)
-        validateJson(r, null)
-    }
+  test("testBackReference") {
+    val r = QueryProcessor.evaluate(
+      _class("DB").as("db").field("Table").where(id("db").field("name").`=`(string("Reporting"))), g, gp)
+    validateJson(r, null)
+  }
 
-    test("testArith") {
-        val r = QueryProcessor.evaluate(_class("DB").where(id("name").`=`(string("Reporting"))).
-            select(id("name"), id("createTime") + int(1)), g)
-        validateJson(r, "{\n  \"query\":\"DB where (name = \\\"Reporting\\\") as _src1 select _src1.name as _col_0, (_src1.createTime + 1) as _col_1\",\n  \"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct3\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"_col_0\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"_col_1\",\n        \"dataTypeName\":\"int\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"__tempQueryResultStru
 ct3\",\n      \"_col_1\":1501,\n      \"_col_0\":\"Reporting\"\n    }\n  ]\n}")
-    }
+  test("testArith") {
+    val r = QueryProcessor.evaluate(_class("DB").where(id("name").`=`(string("Reporting"))).
+      select(id("name"), id("createTime") + int(1)), g, gp)
+    validateJson(r, "{\n  \"query\":\"DB where (name = \\\"Reporting\\\") as _src1 select _src1.name as _col_0, (_src1.createTime + 1) as _col_1\",\n  \"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct3\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"_col_0\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"_col_1\",\n        \"dataTypeName\":\"int\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"__tempQueryResultStruct3\
 ",\n      \"_col_1\":1501,\n      \"_col_0\":\"Reporting\"\n    }\n  ]\n}")
+  }
 
-    test("testComparisonLogical") {
-        val r = QueryProcessor.evaluate(_class("DB").where(id("name").`=`(string("Reporting")).
-            and(id("createTime") > int(0))), g)
-        validateJson(r, "{\n  \"query\":\"DB where (name = \\\"Reporting\\\") and (createTime > 0)\",\n  \"dataType\":{\n    \"superTypes\":[\n      \n    ],\n    \"hierarchicalMetaTypeName\":\"org.apache.atlas.typesystem.types.ClassType\",\n    \"typeName\":\"DB\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"name\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"owner\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"
 createTime\",\n        \"dataTypeName\":\"int\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"DB\",\n      \"$id$\":{\n        \"id\":\"7424\",\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"owner\":\"Jane BI\",\n      \"name\":\"Reporting\",\n      \"createTime\":1500\n    }\n  ]\n}")
-    }
+  test("testComparisonLogical") {
+    val r = QueryProcessor.evaluate(_class("DB").where(id("name").`=`(string("Reporting")).
+      and(id("createTime") > int(0))), g, gp)
+    validateJson(r, """{
+                      |    "query": "DB where (name = \"Reporting\") and (createTime > 0)",
+                      |    "dataType": {
+                      |        "superTypes": [
+                      |
+                      |        ],
+                      |        "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
+                      |        "typeName": "DB",
+                      |        "attributeDefinitions": [
+                      |            {
+                      |                "name": "name",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "owner",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "createTime",
+                      |                "dataTypeName": "int",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |                "isComposite": false,
+                      |                "isUnique": false,
+                      |                "isIndexable": true,
+                      |                "reverseAttributeName": null
+                      |            },
+                      |            {
+                      |                "name": "clusterName",
+                      |                "dataTypeName": "string",
+                      |                "multiplicity": {
+                      |                    "lower": 0,
+                      |                    "upper": 1,
+                      |                    "isUnique": false
+                      |                },
+                      |               "isComposite": false,
+                      |               "isUnique": false,
+                      |               "isIndexable": true,
+                      |               "reverseAttributeName": null
+                      |            }
+                      |        ]
+                      |    },
+                      |    "rows": [
+                      |        {
+                      |            "$typeName$": "DB",
+                      |            "$id$": {
+                      |                "$typeName$": "DB",
+                      |                "version": 0
+                      |            },
+                      |            "owner": "Jane BI",
+                      |            "name": "Reporting",
+                      |            "createTime": 1500,
+                      |            "clusterName": "test"
+                      |        }
+                      |    ]
+                      |}""".stripMargin);
+  }
 
-    test("testJoinAndSelect1") {
-        val r = QueryProcessor.evaluate(
-            _class("DB").as("db1").where(id("name").`=`(string("Sales"))).field("Table").as("tab").
-                where((isTrait("Dimension"))).
-                select(id("db1").field("name").as("dbName"), id("tab").field("name").as("tabName")), g
-        )
-        validateJson(r, "{\n  \"query\":\"DB as db1 where (name = \\\"Sales\\\") Table as tab where DB as db1 where (name = \\\"Sales\\\") Table as tab is Dimension as _src1 select db1.name as dbName, tab.name as tabName\",\n  \"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct5\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"dbName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n  
   ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"__tempQueryResultStruct5\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"product_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct5\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"time_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct5\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"customer_dim\"\n    }\n  ]\n}")
-    }
+  test("testJoinAndSelect1") {
+    val r = QueryProcessor.evaluate(
+      _class("DB").as("db1").where(id("name").`=`(string("Sales"))).field("Table").as("tab").
+        where((isTrait("Dimension"))).
+        select(id("db1").field("name").as("dbName"), id("tab").field("name").as("tabName")), g, gp
+    )
+    validateJson(r, "{\n  \"query\":\"DB as db1 where (name = \\\"Sales\\\") Table as tab where DB as db1 where (name = \\\"Sales\\\") Table as tab is Dimension as _src1 select db1.name as dbName, tab.name as tabName\",\n  \"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct5\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"dbName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\
 n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"__tempQueryResultStruct5\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"product_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct5\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"time_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct5\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"customer_dim\"\n    }\n  ]\n}")
+  }
 
-    test("testJoinAndSelect2") {
-        val r = QueryProcessor.evaluate(
-            _class("DB").as("db1").where((id("db1").field("createTime") > int(0))
-                .or(id("name").`=`(string("Reporting")))).field("Table").as("tab")
-                .select(id("db1").field("name").as("dbName"), id("tab").field("name").as("tabName")), g
-        )
-        validateJson(r, "{\n  \"query\":\"DB as db1 where (db1.createTime > 0) or (name = \\\"Reporting\\\") Table as tab select db1.name as dbName, tab.name as tabName\",\n  \"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct6\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"dbName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\"
 :\"__tempQueryResultStruct6\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"sales_fact\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"product_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"time_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"customer_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Reporting\",\n      \"tabName\":\"sales_fact_daily_mv\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Reporting\",\n      \"tabName\":\"sales_fact_monthly_mv\"\n    }\n  ]\n}")
-    }
+  test("testJoinAndSelect2") {
+    val r = QueryProcessor.evaluate(
+      _class("DB").as("db1").where((id("db1").field("createTime") > int(0))
+        .or(id("name").`=`(string("Reporting")))).field("Table").as("tab")
+        .select(id("db1").field("name").as("dbName"), id("tab").field("name").as("tabName")), g, gp
+    )
+    validateJson(r, "{\n  \"query\":\"DB as db1 where (db1.createTime > 0) or (name = \\\"Reporting\\\") Table as tab select db1.name as dbName, tab.name as tabName\",\n  \"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct6\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"dbName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$typeName$\":\"_
 _tempQueryResultStruct6\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"sales_fact\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"product_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"time_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"customer_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Reporting\",\n      \"tabName\":\"sales_fact_daily_mv\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct6\",\n      \"dbName\":\"Reporting\",\n      \"tabName\":\"sales_fact_monthly_mv\"\n    }\n  ]\n}")
+  }
 
-    test("testJoinAndSelect3") {
-        val r = QueryProcessor.evaluate(
-            _class("DB").as("db1").where((id("db1").field("createTime") > int(0))
-                .and(id("db1").field("name").`=`(string("Reporting")))
-                .or(id("db1").hasField("owner"))).field("Table").as("tab")
-                .select(id("db1").field("name").as("dbName"), id("tab").field("name").as("tabName")), g
-        )
-        validateJson(r, "{\n  \"query\":\"DB as db1 where (db1.createTime > 0) and (db1.name = \\\"Reporting\\\") or DB as db1 has owner Table as tab select db1.name as dbName, tab.name as tabName\",\n  \"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct7\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"dbName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\
 n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"sales_fact\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"product_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"time_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"customer_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Reporting\",\n      \"tabName\":\"sales_fact_daily_mv\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Reporting\",\n      \"tabName\":\"sales_fact_monthly_mv\"\n    }\n  ]\n}")
-    }
+  test("testJoinAndSelect3") {
+    val r = QueryProcessor.evaluate(
+      _class("DB").as("db1").where((id("db1").field("createTime") > int(0))
+        .and(id("db1").field("name").`=`(string("Reporting")))
+        .or(id("db1").hasField("owner"))).field("Table").as("tab")
+        .select(id("db1").field("name").as("dbName"), id("tab").field("name").as("tabName")), g, gp
+    )
+    validateJson(r, "{\n  \"query\":\"DB as db1 where (db1.createTime > 0) and (db1.name = \\\"Reporting\\\") or db1 has owner Table as tab select db1.name as dbName, tab.name as tabName\",\n  \"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct7\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"dbName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n  
     \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"sales_fact\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"product_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"time_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Sales\",\n      \"tabName\":\"customer_dim\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Reporting\",\n      \"tabName\":\"sales_fact_daily_mv\"\n    },\n    {\n      \"$typeName$\":\"__tempQueryResultStruct7\",\n      \"dbName\":\"Reporting\",\n      \"tabName\":\"sales_fact_monthly_mv\"\n    }\n  ]\n}")
+  }
 
-    test("testJoinAndSelect4") {
-      val r = QueryProcessor.evaluate(
-        _class("DB").as("db1").where(id("name").`=`(string("Sales"))).field("Table").as("tab").
-          where((isTrait("Dimension"))).
-          select(id("db1").as("dbO"), id("tab").field("name").as("tabName")), g
-      )
-      validateJson(r, "{\n  \"query\":\"DB as db1 where (name = \\\"Sales\\\") Table as tab where DB as db1 where (name = \\\"Sales\\\") Table as tab is Dimension as _src1 select db1 as dbO, tab.name as tabName\",\n  \"dataType\":{\n    \"typeName\":\"\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"dbO\",\n        \"dataTypeName\":\"DB\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$
 typeName$\":\"\",\n      \"dbO\":{\n        \"id\":\"256\",\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"tabName\":\"product_dim\"\n    },\n    {\n      \"$typeName$\":\"\",\n      \"dbO\":{\n        \"id\":\"256\",\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"tabName\":\"time_dim\"\n    },\n    {\n      \"$typeName$\":\"\",\n      \"dbO\":{\n        \"id\":\"256\",\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"tabName\":\"customer_dim\"\n    }\n  ]\n}")
-    }
+  test("testJoinAndSelect4") {
+    val r = QueryProcessor.evaluate(
+      _class("DB").as("db1").where(id("name").`=`(string("Sales"))).field("Table").as("tab").
+        where((isTrait("Dimension"))).
+        select(id("db1").as("dbO"), id("tab").field("name").as("tabName")), g, gp
+    )
+    validateJson(r, "{\n  \"query\":\"DB as db1 where (name = \\\"Sales\\\") Table as tab where DB as db1 where (name = \\\"Sales\\\") Table as tab is Dimension as _src1 select db1 as dbO, tab.name as tabName\",\n  \"dataType\":{\n    \"typeName\":\"\",\n    \"attributeDefinitions\":[\n      {\n        \"name\":\"dbO\",\n        \"dataTypeName\":\"DB\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      },\n      {\n        \"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        },\n        \"isComposite\":false,\n        \"isUnique\":false,\n        \"isIndexable\":true,\n        \"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      \"$ty
 peName$\":\"\",\n      \"dbO\":{\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"tabName\":\"product_dim\"\n    },\n    {\n      \"$typeName$\":\"\",\n      \"dbO\":{\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"tabName\":\"time_dim\"\n    },\n    {\n      \"$typeName$\":\"\",\n      \"dbO\":{\n        \"$typeName$\":\"DB\",\n        \"version\":0\n      },\n      \"tabName\":\"customer_dim\"\n    }\n  ]\n}")
+  }
 
-    test("testNegativeInvalidType") {
-      val p = new QueryParser
-      val e = p("from blah").right.get
-      an [ExpressionException] should be thrownBy QueryProcessor.evaluate(e, g)
-    }
+  test("testArrayComparision") {
+    val p = new QueryParser
+    val e = p("Partition as p where values = ['2015-01-01']," +
+      " table where name = 'sales_fact_daily_mv'," +
+      " db where name = 'Reporting' and clusterName = 'test' select p").right.get
+    val r = QueryProcessor.evaluate(e, g, gp)
+    validateJson(r, """{
+                      |  "query":"Partition as p where (values = [\"2015-01-01\"]) table where (name = \"sales_fact_daily_mv\") db where (name = \"Reporting\") and (clusterName = \"test\") as _src1 select p as _col_0",
+                      |  "dataType":{
+                      |    "typeName":"__tempQueryResultStruct2",
+                      |    "attributeDefinitions":[
+                      |      {
+                      |        "name":"_col_0",
+                      |        "dataTypeName":"Partition",
+                      |        "multiplicity":{
+                      |          "lower":0,
+                      |          "upper":1,
+                      |          "isUnique":false
+                      |        },
+                      |        "isComposite":false,
+                      |        "isUnique":false,
+                      |        "isIndexable":true,
+                      |        "reverseAttributeName":null
+                      |      }
+                      |    ]
+                      |  },
+                      |  "rows":[
+                      |    {
+                      |      "$typeName$":"__tempQueryResultStruct2",
+                      |      "_col_0":{
+                      |        "$typeName$":"Partition",
+                      |        "version":0
+                      |      }
+                      |    }
+                      |  ]
+                      |}""".stripMargin)
+  }
 
-    test("Bug37860") {
-        val p = new QueryParser
-        val e = p("Table as t where name = 'sales_fact' db where name = 'Sales' and owner = 'John ETL' select t").right.get
-        val r = QueryProcessor.evaluate(e, g)
-        validateJson(r)
-    }
+  test("testArrayComparisionWithSelectOnArray") {
+    val p = new QueryParser
+    val e = p("Partition as p where values = ['2015-01-01']," +
+      " table where name = 'sales_fact_da

<TRUNCATED>


Mime
View raw message