Skip to content

Commit 1a979f8

Browse files
committed
Initial
1 parent 1edd566 commit 1a979f8

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

velox/core/QueryConfig.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ class QueryConfig {
3636
static constexpr const char* kQueryMaxMemoryPerNode =
3737
"query_max_memory_per_node";
3838

39+
/// If true, Velox will use an ANSI-compliant dialect. For example, Velox will
40+
/// throw a runtime exception instead of returning null results when the inputs
41+
/// to a SQL operator or function are invalid.
42+
static constexpr const char* kAnsiEnabled = "ansi_enabled";
43+
3944
/// User provided session timezone. Stores a string with the actual timezone
4045
/// name, e.g: "America/Los_Angeles".
4146
static constexpr const char* kSessionTimezone = "session_timezone";
@@ -864,6 +869,10 @@ class QueryConfig {
864869
return get<uint64_t>(kExprMaxCompiledRegexes, 100);
865870
}
866871

872+
bool ansiEnabled() const {
873+
return get<bool>(kAnsiEnabled, false);
874+
}
875+
867876
bool adjustTimestampToTimezone() const {
868877
return get<bool>(kAdjustTimestampToTimezone, false);
869878
}

velox/docs/configs.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ Generic Configuration
4343
- integer
4444
- 80
4545
- Abandons partial TopNRowNumber if number of output rows equals or exceeds this percentage of the number of input rows.
46+
* - ansi_enabled
47+
- bool
48+
- false
49+
- If true, Velox will use an ANSI-compliant dialect. For example, Velox will throw a runtime exception instead of
50+
returning null results when the inputs to a SQL operator or function are invalid.
4651
* - session_timezone
4752
- string
4853
-

0 commit comments

Comments
 (0)