public static JoinReorderingStrategy getJoinReorderingStrategy(Session session) { Boolean reorderJoins = session.getSystemProperty(REORDER_JOINS, Boolean.class); if (reorderJoins != null) { if (!reorderJoins) { return NONE; } return ELIMINATE_CROSS_JOINS; } return session.getSystemProperty(JOIN_REORDERING_STRATEGY, JoinReorderingStrategy.class); }
public static boolean isDefaultFilterFactorEnabled(Session session) { return session.getSystemProperty(DEFAULT_FILTER_FACTOR_ENABLED, Boolean.class); } }
public static boolean isRedistributeWrites(Session session) { return session.getSystemProperty(REDISTRIBUTE_WRITES, Boolean.class); }
public static boolean isExchangeCompressionEnabled(Session session) { return session.getSystemProperty(EXCHANGE_COMPRESSION, Boolean.class); }
public static boolean shouldPushAggregationThroughJoin(Session session) { return session.getSystemProperty(PUSH_AGGREGATION_THROUGH_JOIN, Boolean.class); }
public static boolean isForceSingleNodeOutput(Session session) { return session.getSystemProperty(FORCE_SINGLE_NODE_OUTPUT, Boolean.class); }
public static boolean useMarkDistinct(Session session) { return session.getSystemProperty(USE_MARK_DISTINCT, Boolean.class); }
public static boolean isOptimizeTopNRowNumber(Session session) { return session.getSystemProperty(OPTIMIZE_TOP_N_ROW_NUMBER, Boolean.class); }
public static JoinDistributionType getJoinDistributionType(Session session) { // distributed_join takes precedence until we remove it Boolean distributedJoin = session.getSystemProperty(DISTRIBUTED_JOIN, Boolean.class); if (distributedJoin != null) { if (!distributedJoin) { return BROADCAST; } return PARTITIONED; } return session.getSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.class); }
public static boolean isDynamicSchduleForGroupedExecution(Session session) { return session.getSystemProperty(DYNAMIC_SCHEDULE_FOR_GROUPED_EXECUTION, Boolean.class); }
public static boolean preferStreamingOperators(Session session) { return session.getSystemProperty(PREFER_STREAMING_OPERATORS, Boolean.class); }
public static boolean isScaleWriters(Session session) { return session.getSystemProperty(SCALE_WRITERS, Boolean.class); }
public static boolean isDictionaryAggregationEnabled(Session session) { return session.getSystemProperty(DICTIONARY_AGGREGATION, Boolean.class); }
public static boolean isNewOptimizerEnabled(Session session) { return session.getSystemProperty(ITERATIVE_OPTIMIZER, Boolean.class); }
public static boolean isDistributedSortEnabled(Session session) { return session.getSystemProperty(DISTRIBUTED_SORT, Boolean.class); }
public static int getQueryPriority(Session session) { Integer priority = session.getSystemProperty(QUERY_PRIORITY, Integer.class); checkArgument(priority > 0, "Query priority must be positive"); return priority; }
@Deprecated public static boolean isLegacyTimestamp(Session session) { return session.getSystemProperty(LEGACY_TIMESTAMP, Boolean.class); }
public static OptionalInt getMaxDriversPerTask(Session session) { Integer value = session.getSystemProperty(MAX_DRIVERS_PER_TASK, Integer.class); if (value == null) { return OptionalInt.empty(); } return OptionalInt.of(value); }
public static OptionalInt getConcurrentLifespansPerNode(Session session) { Integer result = session.getSystemProperty(CONCURRENT_LIFESPANS_PER_NODE, Integer.class); if (result == 0) { return OptionalInt.empty(); } else { checkArgument(result > 0, "Concurrent lifespans per node must be positive if set to non-zero"); return OptionalInt.of(result); } }
public static DataSize getAggregationOperatorUnspillMemoryLimit(Session session) { DataSize memoryLimitForMerge = session.getSystemProperty(AGGREGATION_OPERATOR_UNSPILL_MEMORY_LIMIT, DataSize.class); checkArgument(memoryLimitForMerge.toBytes() >= 0, "%s must be positive", AGGREGATION_OPERATOR_UNSPILL_MEMORY_LIMIT); return memoryLimitForMerge; }