thomasrebele commented on code in PR #115: URL: https://github.com/apache/hive-site/pull/115#discussion_r3905264444
########## content/docs/latest/user/hive-hplsql/functions/to-timestamp.md: ########## @@ -0,0 +1,46 @@ +--- +title: "Apache Hive : TO_TIMESTAMP Function - HPL/SQL Reference" +date: 2026-08-12 +--- + +# Apache Hive : TO_TIMESTAMP Function - HPL/SQL Reference + +TO_TIMESTAMP function converts a string to TIMESTAMP data type using the specified format. + +**Syntax**: + +``` +TO_TIMESTAMP(string_expression, format_expression); +``` + +**Return Data Type:** + +TIMESTAMP + +**Format Elements**: + +| YYYY | 4-digit year | Review Comment: The table's header should describe the columns. This header contains some values. ########## content/docs/latest/user/hive-hplsql/functions/part-count.md: ########## @@ -0,0 +1,72 @@ +--- +title: "Apache Hive : PART_COUNT Function" +date: 2026-08-12 +--- + +# Apache Hive : PART_COUNT Function + +PART_COUNT function returns the number partitions in the specified table. + +**Syntax**: + +``` +PART_COUNT([db_name.]table_name, part_col=filter, ...); +``` + +**Parameters:** + +| [dbname.]table_name | Identifier, variable or expression | +| --- | --- | +| part_col=filter | One or more partition filters | + +**Notes**: + +- HPL/SQL uses the following Hive statement to get the partition information: + +``` +SHOW PARTITIONS db_name.tab_name [PARTITION (part_col=filter, ...)] +``` + +**Return Value:** + +- The number of partitions +- NULL if the table does not exist or an error occurs + +**Return Type:** + +INT + +**Examples:** + +Table *db.orders* is partitioned by *dt* and *region* columns and has the following partitions: + +| dt=2015-09-01/region=1 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/part-count-by.md: ########## @@ -0,0 +1,72 @@ +--- +title: "Apache Hive : PART_COUNT_BY Function" +date: 2026-08-12 +--- + +# Apache Hive : PART_COUNT_BY Function + +PART_COUNT_BY function returns the number partitions grouped by specified partition columns in the table. + +**Syntax**: + +``` +PART_COUNT_BY([db_name.]table_name, [part_col, ...]); +``` + +**Parameters:** + +| [dbname.]table_name | Identifier, variable or expression | +| --- | --- | +| part_col | One or more partition columns used for aggregation | + +**Return Value:** + +- The number of top-level partitions if *part_col* is not specified +- Partition value and total number of existing partitions with the same value if *part_col* is not specified + +**Examples:** + +Table *db.orders* is partitioned by *dt* and *region* columns and has the following partitions: + +| dt=2015-09-01/region=1 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/min-part-string.md: ########## @@ -0,0 +1,82 @@ +--- +title: "Apache Hive : MIN_PART_STRING Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MIN_PART_STRING Function - HPL/SQL + +MIN_PART_STRING function finds the minimum value (first in alphabetical order) for the specified partition column of type STRING (VARCHAR/CHAR). + +**Syntax**: + +``` +MIN_PART_STRING([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the minimum value + +**Return Value:** + +- The minimum string for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +STRING (VARCHAR/CHAR). + +**Example 1:** + +Table *db.orders* is partitioned by *country* and has the following partitions: + +| country=US | +| --- | +| country=UK | +| country=DE | + +Find the minimum value of the partition: + +``` +MIN_PART_STRING(db.orders); +``` + +Result: DE + +**Example 2:** + +Table *db.sales* is partitioned by *country* and *local_date* and has the following partitions: + +| country=US/local_date=2014-12-02 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/statements/open.md: ########## @@ -0,0 +1,59 @@ +--- +title: "Apache Hive : OPEN Statement - HPL/SQL Reference" +date: 2026-08-12 +--- + +# Apache Hive : OPEN Statement - HPL/SQL Reference + +OPEN statement opens a cursor. + +**Syntax**: + +``` +OPEN cursor_name [FOR expression | select_statement]; +``` + +**Description:** +| cursor_name | The name of the previously declared cursor if FOR clause is not specified | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/part-count-by.md: ########## @@ -0,0 +1,72 @@ +--- +title: "Apache Hive : PART_COUNT_BY Function" +date: 2026-08-12 +--- + +# Apache Hive : PART_COUNT_BY Function + +PART_COUNT_BY function returns the number partitions grouped by specified partition columns in the table. + +**Syntax**: + +``` +PART_COUNT_BY([db_name.]table_name, [part_col, ...]); +``` + +**Parameters:** + +| [dbname.]table_name | Identifier, variable or expression | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/min-part-date.md: ########## @@ -0,0 +1,82 @@ +--- +title: "Apache Hive : MIN_PART_DATE Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MIN_PART_DATE Function - HPL/SQL + +MIN_PART_DATE function finds the minimum value for the specified partition column of type DATE. + +**Syntax**: + +``` +MIN_PART_DATE([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the minimum value + +**Return Value:** + +- The minimum date for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +DATE. + +**Example 1:** + +Table *db.orders* is partitioned by *local_date* and has the following partitions: + +| local_date=2014-12-02 | +| --- | +| local_date=2014-12-03 | +| local_date=2014-12-04 | + +Find the minimum value of the partition: + +``` +MIN_PART_DATE(db.orders); +``` + +Result: 2014-12-02 + +**Example 2:** + +Table *db.sales* is partitioned by *country* and *local_date* and has the following partitions: + +| country=US/local_date=2014-12-02 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/max-part-string.md: ########## @@ -0,0 +1,82 @@ +--- +title: "Apache Hive : MAX_PART_STRING Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MAX_PART_STRING Function - HPL/SQL + +MAX_PART_STRING function finds the maximum value (last in alphabetical order) for the specified partition column of type STRING (VARCHAR/CHAR). + +**Syntax**: + +``` +MAX_PART_STRING([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the maximum value + +**Return Value:** + +- The maximum string for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +STRING (VARCHAR/CHAR). + +**Example 1:** + +Table *db.orders* is partitioned by *country* and has the following partitions: + +| country=US | +| --- | +| country=UK | +| country=DE | + +Find the maximum value of the partition: + +``` +MAX_PART_STRING(db.orders); +``` + +Result: US + +**Example 2:** + +Table *db.sales* is partitioned by *country* and *local_date* and has the following partitions: + +| country=US/local_date=2014-12-02 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/max-part-int.md: ########## @@ -0,0 +1,85 @@ +--- +title: "Apache Hive : MAX_PART_INT Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MAX_PART_INT Function - HPL/SQL + +MAX_PART_INT function finds the maximum value for the specified partition column of type INT. + +**Syntax**: + +``` +MAX_PART_INT([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the maximum value +- If the partition contains non-integer values they are ignored + +**Return Value:** + +- The maximum INT value for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +INT. + +**Example 1:** + +Table *db.orders* is partitioned by *country*, *local_dt* and *hour* and has the following partitions: + +| country=US/local_dt=2014-12-05/hour=1 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/max-part-date.md: ########## @@ -0,0 +1,82 @@ +--- +title: "Apache Hive : MAX_PART_DATE Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MAX_PART_DATE Function - HPL/SQL + +MAX_PART_DATE function finds the maximum value for the specified partition column of type DATE. + +**Syntax**: + +``` +MAX_PART_DATE([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the maximum value + +**Return Value:** + +- The maximum date for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +DATE. + +**Example 1:** + +Table *db.orders* is partitioned by *local_date* and has the following partitions: + +| local_date=2014-12-02 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/max-part-date.md: ########## @@ -0,0 +1,82 @@ +--- +title: "Apache Hive : MAX_PART_DATE Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MAX_PART_DATE Function - HPL/SQL + +MAX_PART_DATE function finds the maximum value for the specified partition column of type DATE. + +**Syntax**: + +``` +MAX_PART_DATE([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the maximum value + +**Return Value:** + +- The maximum date for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +DATE. + +**Example 1:** + +Table *db.orders* is partitioned by *local_date* and has the following partitions: + +| local_date=2014-12-02 | +| --- | +| local_date=2014-12-03 | +| local_date=2014-12-04 | + +Find the maximum value of the partition: + +``` +MAX_PART_DATE(db.orders); +``` + +Result: 2014-12-04 + +**Example 2:** + +Table *db.sales* is partitioned by *country* and *local_date* and has the following partitions: + +| country=US/local_date=2014-12-02 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/part-count.md: ########## @@ -0,0 +1,72 @@ +--- +title: "Apache Hive : PART_COUNT Function" +date: 2026-08-12 +--- + +# Apache Hive : PART_COUNT Function + +PART_COUNT function returns the number partitions in the specified table. + +**Syntax**: + +``` +PART_COUNT([db_name.]table_name, part_col=filter, ...); +``` + +**Parameters:** + +| [dbname.]table_name | Identifier, variable or expression | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/min-part-int.md: ########## @@ -0,0 +1,86 @@ +--- +title: "Apache Hive : MIN_PART_INT Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MIN_PART_INT Function - HPL/SQL + +MIN_PART_INT function finds the minimum value for the specified partition column of type INT. + +**Syntax**: + +``` +MIN_PART_INT([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the minimum value +- If the partition contains non-integer values they are ignored + +**Return Value:** + +- The minimum INT value for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +INT. + +**Example 1:** + +Table *db.orders* is partitioned by *country*, *local_dt* and *hour* and has the following partitions: + +| country=US/local_dt=2014-12-05/hour=1 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/min-part-int.md: ########## @@ -0,0 +1,86 @@ +--- +title: "Apache Hive : MIN_PART_INT Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MIN_PART_INT Function - HPL/SQL + +MIN_PART_INT function finds the minimum value for the specified partition column of type INT. + +**Syntax**: + +``` +MIN_PART_INT([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the minimum value +- If the partition contains non-integer values they are ignored + +**Return Value:** + +- The minimum INT value for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +INT. + +**Example 1:** + +Table *db.orders* is partitioned by *country*, *local_dt* and *hour* and has the following partitions: + +| country=US/local_dt=2014-12-05/hour=1 | +| --- | +| country=US/local_dt=2014-12-05/hour=2 | +| country=US/local_dt=2014-12-05/hour=3 | +| country=US/local_dt=2014-12-05/hour=UNKNOWN | + +Find the minimum value of the partition *hour*: + +``` +MIN_PART_INT(db.orders, hour); +``` + +Result: 1 + +**Example 2:** + +Table *db.sales* is partitioned by *country*, *local_date* and *hour* has the following partitions: + +| country=US/local_dt=2014-12-06/hour=1 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/max-part-string.md: ########## @@ -0,0 +1,82 @@ +--- +title: "Apache Hive : MAX_PART_STRING Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MAX_PART_STRING Function - HPL/SQL + +MAX_PART_STRING function finds the maximum value (last in alphabetical order) for the specified partition column of type STRING (VARCHAR/CHAR). + +**Syntax**: + +``` +MAX_PART_STRING([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the maximum value + +**Return Value:** + +- The maximum string for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +STRING (VARCHAR/CHAR). + +**Example 1:** + +Table *db.orders* is partitioned by *country* and has the following partitions: + +| country=US | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/min-part-date.md: ########## @@ -0,0 +1,82 @@ +--- +title: "Apache Hive : MIN_PART_DATE Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MIN_PART_DATE Function - HPL/SQL + +MIN_PART_DATE function finds the minimum value for the specified partition column of type DATE. + +**Syntax**: + +``` +MIN_PART_DATE([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the minimum value + +**Return Value:** + +- The minimum date for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +DATE. + +**Example 1:** + +Table *db.orders* is partitioned by *local_date* and has the following partitions: + +| local_date=2014-12-02 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). ########## content/docs/latest/user/hive-hplsql/functions/max-part-int.md: ########## @@ -0,0 +1,85 @@ +--- +title: "Apache Hive : MAX_PART_INT Function - HPL/SQL" +date: 2026-08-12 +--- + +# Apache Hive : MAX_PART_INT Function - HPL/SQL + +MAX_PART_INT function finds the maximum value for the specified partition column of type INT. + +**Syntax**: + +``` +MAX_PART_INT([db_name.]table_name [, column_name [, part_col=filter, ...]]); +``` + +**Parameters:** + +| **Parameter** | **Type** | **Value** | **Description** | +| --- | --- | --- | --- | +| [dbname.]table_name | VARCHAR | Identifier, variable or expression | Table name | +| column_name | VARCHAR | Identifier, variable or expression | Partition column name | +| part_col=filter | | | Partition filter | + +**Notes**: + +- If column name is not specified, the first partition column is used +- Partition filter applied before finding the maximum value +- If the partition contains non-integer values they are ignored + +**Return Value:** + +- The maximum INT value for the specified partition +- NULL if the table or partition do not exist, or the table is empty + +**Return Type:** + +INT. + +**Example 1:** + +Table *db.orders* is partitioned by *country*, *local_dt* and *hour* and has the following partitions: + +| country=US/local_dt=2014-12-05/hour=1 | +| --- | +| country=US/local_dt=2014-12-05/hour=2 | +| country=US/local_dt=2014-12-05/hour=3 | +| country=US/local_dt=2014-12-05/hour=UNKNOWN | + +Find the maximum value of the partition *hour*: + +``` +MAX_PART_INT(db.orders, hour); +``` + +Result: 3 + +**Example 2:** + +Table *db.sales* is partitioned by *country*, *local_date* and *hour* has the following partitions: + +| country=US/local_dt=2014-12-06/hour=1 | Review Comment: See [my other comment](https://github.com/apache/hive-site/pull/115/changes#r3905264444). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
