Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions presto-docs/src/main/sphinx/presto_cpp/properties-session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,21 @@ Native Execution only. Enable window spilling on native engine.
* **Default value:** ``true``

Native Execution only. Enable writer spilling on native engine.

``native_max_output_buffer_size``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Type:** ``bigint``
* **Default value:** ``33554432``

The maximum size in bytes for the task's buffered output. The buffer is shared among all drivers. Default is 32MB.

``native_max_page_partitioning_buffer_size``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Type:** ``bigint``
* **Default value:** ``33554432``

The maximum bytes to buffer per PartitionedOutput operator to avoid creating tiny SerializedPages.
For PartitionedOutputNode::Kind::kPartitioned, PartitionedOutput operator would buffer up to that number of
bytes / number of destinations for each destination before producing a SerializedPage. Default is 32MB.
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ public final class SystemSessionProperties
public static final String NATIVE_QUERY_TRACE_NODE_IDS = "native_query_trace_node_ids";
public static final String NATIVE_QUERY_TRACE_MAX_BYTES = "native_query_trace_max_bytes";
public static final String NATIVE_QUERY_TRACE_REG_EXP = "native_query_trace_task_reg_exp";
public static final String NATIVE_MAX_PAGE_PARTITIONING_BUFFER_SIZE = "native_max_page_partitioning_buffer_size";
public static final String NATIVE_MAX_OUTPUT_BUFFER_SIZE = "native_max_output_buffer_size";

public static final String DEFAULT_VIEW_SECURITY_MODE = "default_view_security_mode";
public static final String JOIN_PREFILTER_BUILD_SIDE = "join_prefilter_build_side";
Expand Down Expand Up @@ -1805,6 +1807,17 @@ public SystemSessionProperties(
"The regexp of traced task id. We only enable trace on a task if its id matches.",
"",
false),
longProperty(NATIVE_MAX_OUTPUT_BUFFER_SIZE,
"The maximum size in bytes for the task's buffered output. The buffer is shared among all drivers.",
200L << 20,
false),
longProperty(NATIVE_MAX_PAGE_PARTITIONING_BUFFER_SIZE,
"The maximum bytes to buffer per PartitionedOutput operator to avoid creating tiny " +
"SerializedPages. For PartitionedOutputNode::Kind::kPartitioned, PartitionedOutput operator " +
"would buffer up to that number of bytes / number of destinations for each destination before " +
"producing a SerializedPage.",
Comment on lines +1816 to +1818
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

align on left

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkstyle does not seem to like it when I tried to align the concatenated strings left..

24L << 20,
false),
booleanProperty(
RANDOMIZE_OUTER_JOIN_NULL_KEY,
"(Deprecated) Randomize null join key for outer join",
Expand Down
23 changes: 22 additions & 1 deletion presto-native-execution/presto_cpp/main/SessionProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,32 @@ SessionProperties::SessionProperties() {
kQueryTraceTaskRegExp,
"The regexp of traced task id. We only enable trace on a task if its id"
" matches.",
BIGINT(),
VARCHAR(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was that an existing bug that we are fixing along with introducing new session properties?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that was a bug..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to add some release note around the bug fix? Or its minor enough that no release note needed?

false,
QueryConfig::kQueryTraceTaskRegExp,
c.queryTraceTaskRegExp());

addSessionProperty(
kMaxOutputBufferSize,
"The maximum size in bytes for the task's buffered output. The buffer is"
" shared among all drivers.",
BIGINT(),
false,
QueryConfig::kMaxOutputBufferSize,
std::to_string(c.maxOutputBufferSize()));

addSessionProperty(
kMaxPartitionedOutputBufferSize,
"The maximum bytes to buffer per PartitionedOutput operator to avoid"
"creating tiny SerializedPages. For "
"PartitionedOutputNode::Kind::kPartitioned, PartitionedOutput operator"
"would buffer up to that number of bytes / number of destinations for "
"each destination before producing a SerializedPage.",
BIGINT(),
false,
QueryConfig::kMaxPartitionedOutputBufferSize,
std::to_string(c.maxPartitionedOutputBufferSize()));

// If `legacy_timestamp` is true, the coordinator expects timestamp
// conversions without a timezone to be converted to the user's
// session_timezone.
Expand Down
13 changes: 13 additions & 0 deletions presto-native-execution/presto_cpp/main/SessionProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,19 @@ class SessionProperties {
static constexpr const char* kQueryTraceTaskRegExp =
"native_query_trace_task_reg_exp";

/// The maximum size in bytes for the task's buffered output. The buffer is
/// shared among all drivers.
static constexpr const char* kMaxOutputBufferSize =
"native_max_output_buffer_size";

/// The maximum bytes to buffer per PartitionedOutput operator to avoid
/// creating tiny SerializedPages. For
/// PartitionedOutputNode::Kind::kPartitioned, PartitionedOutput operator
/// would buffer up to that number of bytes / number of destinations for each
/// destination before producing a SerializedPage.
static constexpr const char* kMaxPartitionedOutputBufferSize =
"native_max_page_partitioning_buffer_size";

SessionProperties();

const std::unordered_map<std::string, std::shared_ptr<SessionProperty>>&
Expand Down