Pular para o conteúdo principal

h3_maxchild

Retorna o filho do valor máximo da célula H3 de entrada na resolução especificada. Compatível com Spark Connect.

Para a função Databricks SQL correspondente, consulte a funçãoh3_maxchild.

Sintaxe

Python
from pyspark.databricks.sql import functions as dbf

dbf.h3_maxchild(col1=<col1>, col2=<col2>)

Parâmetros

Parâmetro

Tipo

Descrição

col1

pyspark.sql.Column ou str

Um ID de célula H3, representado por int ou um str

col2

pyspark.sql.Column, str, ou int

A resolução do ID da célula filha com o valor máximo a ser retornado. Deve ser não negativo e maior ou igual à resolução do primeiro argumento.

Exemplos

Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(599686042433355775, 10,)], ['h3l', 'res'])
df.select(dbf.h3_maxchild('h3l', 'res').alias('result')).collect()
Output
[Row(result=622204040416821247)]
Python
df.select(dbf.h3_maxchild('h3l', 10).alias('result')).collect()
Output
[Row(result=622204040416821247)]