Skip to content

Commit 9029592

Browse files
committed
[Iceberg] rename "target_split_size" to "target_split_size_bytes"
1 parent f6c9750 commit 9029592

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

presto-docs/src/main/sphinx/connector/iceberg.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ Property Name Description
468468
``iceberg.rows_for_metadata_optimization_threshold`` Overrides the behavior of the connector property
469469
``iceberg.rows-for-metadata-optimization-threshold`` in the current
470470
session.
471-
``iceberg.target_split_size`` Overrides the target split size for all tables in a query in bytes.
471+
``iceberg.target_split_size_bytes`` Overrides the target split size for all tables in a query in bytes.
472472
Set to 0 to use the value in each Iceberg table's
473473
``read.split.target-size`` property.
474474
``iceberg.affinity_scheduling_file_section_size`` When the ``node_selection_strategy`` or

presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergSessionProperties.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public final class IcebergSessionProperties
6666
public static final String STATISTIC_SNAPSHOT_RECORD_DIFFERENCE_WEIGHT = "statistic_snapshot_record_difference_weight";
6767
public static final String ROWS_FOR_METADATA_OPTIMIZATION_THRESHOLD = "rows_for_metadata_optimization_threshold";
6868
public static final String STATISTICS_KLL_SKETCH_K_PARAMETER = "statistics_kll_sketch_k_parameter";
69-
public static final String TARGET_SPLIT_SIZE = "target_split_size";
69+
public static final String TARGET_SPLIT_SIZE_BYTES = "target_split_size_bytes";
7070

7171
private final List<PropertyMetadata<?>> sessionProperties;
7272

@@ -193,7 +193,7 @@ public IcebergSessionProperties(
193193
icebergConfig.getStatisticsKllSketchKParameter(),
194194
false))
195195
.add(longProperty(
196-
TARGET_SPLIT_SIZE,
196+
TARGET_SPLIT_SIZE_BYTES,
197197
"The target split size. Set to 0 to use the iceberg table's read.split.target-size property",
198198
0L,
199199
false));
@@ -333,6 +333,6 @@ public static int getStatisticsKllSketchKParameter(ConnectorSession session)
333333

334334
public static Long getTargetSplitSize(ConnectorSession session)
335335
{
336-
return session.getProperty(TARGET_SPLIT_SIZE, Long.class);
336+
return session.getProperty(TARGET_SPLIT_SIZE_BYTES, Long.class);
337337
}
338338
}

presto-iceberg/src/test/java/com/facebook/presto/iceberg/TestIcebergSplitManager.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import static com.facebook.presto.hive.HiveCommonSessionProperties.NODE_SELECTION_STRATEGY;
4747
import static com.facebook.presto.iceberg.IcebergQueryRunner.ICEBERG_CATALOG;
4848
import static com.facebook.presto.iceberg.IcebergSessionProperties.PUSHDOWN_FILTER_ENABLED;
49-
import static com.facebook.presto.iceberg.IcebergSessionProperties.TARGET_SPLIT_SIZE;
49+
import static com.facebook.presto.iceberg.IcebergSessionProperties.TARGET_SPLIT_SIZE_BYTES;
5050
import static com.facebook.presto.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED;
5151
import static org.testng.Assert.assertEquals;
5252
import static org.testng.Assert.assertNotNull;
@@ -178,7 +178,7 @@ private void testGetSplitsByNonIdentityPartitionColumns(String tableName, boolea
178178
public void testSplitSchedulingWithTablePropertyAndSession()
179179
{
180180
Session session = Session.builder(getSession())
181-
.setCatalogSessionProperty("iceberg", IcebergSessionProperties.TARGET_SPLIT_SIZE, "0")
181+
.setCatalogSessionProperty("iceberg", IcebergSessionProperties.TARGET_SPLIT_SIZE_BYTES, "0")
182182
.build();
183183
assertQuerySucceeds("CREATE TABLE test_split_size as SELECT * FROM UNNEST(sequence(1, 512)) as t(i)");
184184
// verify that the session property hasn't propagated into the table
@@ -198,7 +198,7 @@ public void testSplitSchedulingWithTablePropertyAndSession()
198198
// Set it to 1 with the session property to override the table value and verify we get the
199199
// same number of splits as when the table value is set to 1.
200200
Session minSplitSession = Session.builder(session)
201-
.setCatalogSessionProperty("iceberg", TARGET_SPLIT_SIZE, "1")
201+
.setCatalogSessionProperty("iceberg", TARGET_SPLIT_SIZE_BYTES, "1")
202202
.build();
203203
assertEquals(getSplitsForSql(minSplitSession, selectQuery).size(), maxSplits);
204204
assertQuerySucceeds("DROP TABLE test_split_size");
@@ -209,7 +209,7 @@ public void testSoftAffinitySchedulingSectionConfig()
209209
{
210210
Session maxIdentifiers = Session.builder(getSession())
211211
.setCatalogSessionProperty("iceberg", AFFINITY_SCHEDULING_FILE_SECTION_SIZE, "1B")
212-
.setCatalogSessionProperty("iceberg", TARGET_SPLIT_SIZE, "1")
212+
.setCatalogSessionProperty("iceberg", TARGET_SPLIT_SIZE_BYTES, "1")
213213
.setCatalogSessionProperty("iceberg", NODE_SELECTION_STRATEGY, "SOFT_AFFINITY")
214214
.build();
215215
assertQuerySucceeds("CREATE TABLE test_affinity_section_scheduling as SELECT * FROM UNNEST(sequence(1, 512)) as t(i)");

0 commit comments

Comments
 (0)