メインコンテンツまでスキップ

h3_非コンパクト

H3 セル IDの入力セットを指定された解像度に展開します。Spark Connect をサポートします。

対応する Databricks SQL 関数については、 h3_uncompact関数を参照してください。

構文

Python
from pyspark.databricks.sql import functions as dbf

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

パラメーター

パラメーター

Type

説明

col1

pyspark.sql.Column または str

圧縮解除する H3 セル ID の配列 (整数または文字列として表される)。

col2

pyspark.sql.Columnstr 、または int

非互換の H3 セル ID の解決。

Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([([599686030622195711, 599686015589810175, 599686014516068351,599686034917163007, 599686029548453887, 599686032769679359, 599686198125920255,599686023106002943, 599686027400970239, 599686013442326527, 599686012368584703,599686018811035647, 595182446027210751], 5,)], ['h3l_array', 'res'])
df.select(dbf.h3_uncompact('h3l_array', 'res').alias('result')).collect()
Output
[Row(result=[599686030622195711, 599686015589810175, 599686014516068351, 599686034917163007,     599686029548453887, 599686032769679359, 599686198125920255, 599686023106002943,     599686027400970239, 599686013442326527, 599686012368584703, 599686018811035647,     599686038138388479, 599686039212130303, 599686040285872127, 599686041359613951,     599686042433355775, 599686043507097599, 599686044580839423])]
Python
df.select(dbf.h3_uncompact('h3l_array', 5).alias('result')).collect()
Output
[Row(result=[599686030622195711, 599686015589810175, 599686014516068351, 599686034917163007,     599686029548453887, 599686032769679359, 599686198125920255, 599686023106002943,     599686027400970239, 599686013442326527, 599686012368584703, 599686018811035647,     599686038138388479, 599686039212130303, 599686040285872127, 599686041359613951,     599686042433355775, 599686043507097599, 599686044580839423])]