Github user ztao1987 commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/660#discussion_r63641232
--- Diff: src/test/feature/query/test-prepare.cpp ---
@@ -0,0 +1,75 @@
+#include <pwd.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <vector>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <iostream>
+
+#include "lib/command.h"
+#include "lib/common.h"
+#include "lib/data-gen.h"
+#include "lib/hawq-config.h"
+#include "lib/sql-util.h"
+
+#include "gtest/gtest.h"
+
+class TestQueryPrepare : public ::testing::Test {
+ public:
+ TestQueryPrepare() {}
+ ~TestQueryPrepare() {}
+};
+
+
+TEST_F(TestQueryPrepare, TestPrepareUniqueness) {
+ SQLUtility util;
+ util.execSQLFile("query/sql/prepare-uniqueness.sql",
+ "query/ans/prepare-uniqueness.ans");
+}
+
+TEST_F(TestQueryPrepare, TestPrepareParameters) {
+ SQLUtility util;
+ // prepare
+ util.execute("drop table if exists test1");
+ util.execute("drop table if exists test2");
+ util.execute("create table test1 ("
+ " unique1 int4,"
+ " unique2 int4,"
+ " two int4,"
+ " four int4,"
+ " ten int4,"
+ " twenty int4,"
+ " hundred int4,"
+ " thousand int4,"
+ " twothousand int4,"
+ " fivethous int4,"
+ " tenthous int4,"
+ " odd int4,"
+ " even int4,"
+ " stringu1 name,"
+ " stringu2 name,"
+ " string4 name) with oids");
+ util.execute("create table test2 ("
+ " name text,"
+ " thepath path)");
+
+ std::string pwd = Command::getCommandOutput("pwd");
--- End diff --
We used __FILE__ which is decided in compilation.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---