How to fix AssertionError: assertion failed: unsafe symbol Unstable (child of <none>) in runtime reflection universe
Asked Answered
A

0

2
I am trying to filter a dataframe like below

'

 val industry_df = industry_df0.filter( col("classification_type").===("GICS") )

'

Me getting error

java.lang.AssertionError: assertion failed: unsafe symbol Unstable (child of <none>) in runtime reflection universe
    at scala.reflect.internal.Symbols$Symbol.<init>(Symbols.scala:205)
    at scala.reflect.internal.Symbols$TypeSymbol.<init>(Symbols.scala:3030)
    at scala.reflect.internal.Symbols$ClassSymbol.<init>(Symbols.scala:3222)

1) What am I doing wrong here ? How to fix it?

2) When I try to do $("classification_type").===("GICS")

I am getting $ not found error , what should I include to use $ on dataframe.

3) I am trying to use join query with spark-sql but it is not working , how to debug it ? Ofcourse this query LOGIC working on oracle db.

'
 val result_df =  sparkSession.sql("""
             select a.company_id, a.data_date, a.model_id, b.domicile_country_code, d.two_digit_iso_code, d.capiq_geo_name  
               from model_lnk a join company_filter_vals b on a.company_id=b.company_id 
               join reg_lnk c 
               join country d on c.ctry_geo_code=d.geo_code
               where  a.model_id in (3020,3030)
               and b.model_group_id in (select model_group_id from model where model_id in (3020,3030))
           """  )

         result_df.show(2)

'
Aurelia answered 11/12, 2018 at 15:40 Comment(4)
@T.Gawęda can you please help me.Aurelia
@RameshMaharjan can you please help meAurelia
Please edit your question, correct formating and split into few questions. Now this question contains 3 questions and is too broadHerzen
I agree with @T.Gawęda. you need to reformat the question and make the data testable for the stackoverflow users so that they can test it and answer it. How can we recreate the error and help you out ? that should be your focus when you ask questions.Maillol

© 2022 - 2024 — McMap. All rights reserved.