Proposed changes change explode-json-array-xx func signature from string to json type to improve function behavior Issue Number: close #xxx
Search before asking I had searched in the issues and found no similar issues. Version 1.12 What's Wrong? 使用explode_json_array_string 函数解析 jsonObject 数组时解析为空 结果: k1 e1 1 null 1 null select k1, e1 from (select 1 as k1 ) t lateral view exp..
一个JSONArray为: [{"id":"1","name":"zhangsan"},{"id":"2","name":"lisi"},{"id":"3","name":"wangwu"},...] 1. 用get_json_object() 处理这种并不是很友好: 我们可以这样: SELECT explode(split(regexp_replace( regexp_replace( '[{"id":"1","name":"zhangsan"},{"id":"2"...
importorg.apache.spark.sql.SparkSessionvalspark=SparkSession.builder().appName("JSON to Array Explode Example").getOrCreate()valdata=Seq(("Alice",30,"""["reading", "painting", "traveling"]"""),("Bob",25,"""["swimming", "cooking"]"""))valdf=spark.createDataFrame(data).toDF("name...
@Anish Gupta Could you create the Hive table using JsonSerde and then apply explode array as per this SO - 240407