Quick one guys. I am facing an issue while querying a float JSON Column, as it returns the following error:
"Error while compiling statement: FAILED: SemanticException [Error 10014]: line 11:5 Wrong arguments ''$.percentage'': No matching method for class org.apache.hadoop.hive.ql.udf.UDFJson with (struct<id:int,percentage:float>, string). Possible choices: FUNC(string, string)'"
What might be the issue ? I want to get the percentage field(FLOAT)
column simple_tax_class:
{"id":1,"percentage":18.0}
-- Query that I am using
-- Catalog
SELECT
cod_country AS COUNTRY_CODE
,CONCAT(t.cod_country,'_',t.simple_id) AS COD_CATALOG_SIMPLE
,IF(t.simple_is_visible = TRUE, 1, 0) AS VISIBILITY
,t.simple_prices_price AS ORIGINAL_PRICE
,t.simple_prices_special_price AS SELLING_PRICE
,t.simple_prices_cost AS COST_PRICE
,t.simple_tax_class AS TAX_CLASS
,get_json_object(t.simple_tax_class,'$.percentage') AS Percentage
FROM product_simple t
limit 10