Skip to content

Commit 0f60418

Browse files
Supporting skip header for value 1
1 parent bb1f3f3 commit 0f60418

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Property Name Description
255255
Metastore.
256256

257257
``skip_header_line_count`` Number of header lines to skip when reading CSV or TEXTFILE tables. None (ignored if not set). Must be non-negative. Only valid for
258-
When set to ``1``, a header row will be written when creating new CSV and TEXTFILE formats. Values greater than ``0`` are not
258+
When set to ``1``, a header row will be written when creating new CSV and TEXTFILE formats. Values greater than ``1`` are not
259259
CSV or TEXTFILE tables. supported for ``CREATE TABLE AS`` or ``INSERT`` operations.
260260

261261
``skip_footer_line_count`` Number of footer lines to skip when reading CSV or TEXTFILE tables. None (ignored if not set). Must be non-negative. Only valid for

presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,8 +1692,8 @@ public HiveOutputTableHandle beginCreateTable(ConnectorSession session, Connecto
16921692
throw new PrestoException(NOT_SUPPORTED, "CREATE TABLE AS not supported when Avro schema url is set");
16931693
}
16941694
getHeaderSkipCount(tableMetadata.getProperties()).ifPresent(headerSkipCount -> {
1695-
if (headerSkipCount > 0) {
1696-
throw new PrestoException(NOT_SUPPORTED, format("Creating Hive table with data with value of %s property greater than 0 is not supported", SKIP_HEADER_COUNT_KEY));
1695+
if (headerSkipCount > 1) {
1696+
throw new PrestoException(NOT_SUPPORTED, format("Creating Hive table with data with value of %s property greater than 1 is not supported", SKIP_HEADER_COUNT_KEY));
16971697
}
16981698
});
16991699

0 commit comments

Comments
 (0)