Skip to content

Commit 910c2c9

Browse files
committed
Fix options
1 parent 4273ea9 commit 910c2c9

File tree

4 files changed

+51
-7
lines changed

4 files changed

+51
-7
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
# c++1z was used prior to c++17 being standardized, and is therefore more
2020
# widely accepted by compilers. This may lead to strange behavior or compiler
2121
# errors in earlier compilers.
22-
build --cxxopt="-std=c++1z"
22+
build --cxxopt="-std=c++1z" --features=-supports_dynamic_linker

alphasql/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ cc_library(
3737
"@com_google_zetasql//zetasql/public:simple_catalog",
3838
"@com_google_zetasql//zetasql/public:type",
3939
"@com_google_zetasql//zetasql/public:analyzer",
40+
"@com_google_zetasql//zetasql/analyzer:analyzer_impl",
41+
"@com_google_zetasql//zetasql/analyzer:resolver",
4042
"@com_google_zetasql//zetasql/public:language_options",
4143
"@com_google_zetasql//zetasql/parser:parser",
4244
"@boost//:property_tree",
@@ -70,6 +72,7 @@ cc_binary(
7072
"@com_google_zetasql//zetasql/base:status",
7173
"@com_google_zetasql//zetasql/base:statusor",
7274
"@com_google_zetasql//zetasql/public:analyzer",
75+
"@com_google_zetasql//zetasql/analyzer:analyzer_impl",
7376
"@com_google_zetasql//zetasql/public:catalog",
7477
"@com_google_zetasql//zetasql/public:evaluator",
7578
"@com_google_zetasql//zetasql/public:evaluator_table_iterator",
@@ -105,7 +108,7 @@ cc_library(
105108
name = "dag_lib",
106109
hdrs = ["dag_lib.h"],
107110
deps = [
108-
"@com_google_zetasql//zetasql/public:analyzer",
111+
"@com_google_zetasql//zetasql/analyzer:analyzer_impl",
109112
"@com_google_zetasql//zetasql/resolved_ast",
110113
"@com_google_absl//absl/flags:flag",
111114
"@com_google_absl//absl/flags:parse",

bazel/zetasql.patch

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,67 @@
1+
diff --git zetasql/analyzer/BUILD zetasql/analyzer/BUILD
2+
index 91c73c6..57e5609 100644
3+
--- zetasql/analyzer/BUILD
4+
+++ zetasql/analyzer/BUILD
5+
@@ -18,7 +18,7 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
6+
load(":builddefs.bzl", "gen_analyzer_test")
7+
8+
package(
9+
- default_visibility = ["//zetasql/base:zetasql_implementation"],
10+
+ default_visibility = ["//visibility:public"],
11+
)
12+
13+
filegroup(
114
diff --git zetasql/base/BUILD zetasql/base/BUILD
215
index 75c8e3e..7874e07 100644
316
--- zetasql/base/BUILD
417
+++ zetasql/base/BUILD
518
@@ -17,7 +17,7 @@
619
licenses(["notice"]) # Apache v2.0
7-
20+
821
package(
922
- default_visibility = [":zetasql_implementation"],
1023
+ default_visibility = ["//visibility:public"],
1124
)
12-
25+
1326
package_group(
1427
diff --git zetasql/parser/BUILD zetasql/parser/BUILD
1528
index 5c3c636..5404163 100644
1629
--- zetasql/parser/BUILD
1730
+++ zetasql/parser/BUILD
1831
@@ -20,7 +20,7 @@ load("//bazel:bison.bzl", "genyacc")
1932
load("//bazel:flex.bzl", "genlex")
20-
33+
2134
package(
2235
- default_visibility = ["//zetasql/base:zetasql_implementation"],
2336
+ default_visibility = ["//visibility:public"],
2437
)
25-
38+
2639
genrule(
40+
41+
--- zetasql/public/simple_catalog.h
42+
+++ zetasql/public/simple_catalog.h
43+
@@ -55,6 +55,11 @@ class SimpleTableProto;
44+
//
45+
// This class is thread-safe.
46+
class SimpleCatalog : public EnumerableCatalog {
47+
+ friend void dropOwnedTable(SimpleCatalog* catalog, const std::string& name);
48+
+ friend void dropOwnedTableIfExists(SimpleCatalog* catalog, const std::string& name);
49+
+ friend void dropOwnedFunction(SimpleCatalog* catalog, const std::string& full_name_without_group);
50+
+
51+
+
52+
public:
53+
// Construct a Catalog with catalog name <name>.
54+
//
55+
56+
diff --git zetasql/public/sql_formatter.cc zetasql/public/sql_formatter.cc
57+
index 26e52ed..28e8928 100644
58+
--- zetasql/public/sql_formatter.cc
59+
+++ zetasql/public/sql_formatter.cc
60+
@@ -72,6 +72,7 @@ absl::Status FormatSql(const std::string& sql, std::string* formatted_sql) {
61+
std::vector<ParseToken> parse_tokens;
62+
ParseTokenOptions options;
63+
options.stop_at_end_of_statement = true;
64+
+ options.include_comments = true;
65+
const int statement_start = location.byte_position();
66+
const absl::Status token_status =
67+
GetParseTokens(options, &location, &parse_tokens);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Analyzing "samples/sample-ci/sample/create_datawarehouse3.sql"
22
ERROR: INVALID_ARGUMENT: Table not found: `bigquery-public-data.samples.gsod` [at samples/sample-ci/sample/create_datawarehouse3.sql:5:3]
33
catalog:
4-
dataset.main
54
tablename2
5+
dataset.main
66
tablename1

0 commit comments

Comments
 (0)