cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Internal Error when querying a doubleType column of a delta table using ">" "<" operators

Christoph
New Contributor II

Hi there,

we are currently facing a pretty confusing issue:

We have a delta table (~2TB) which has been working just fine over the last few years and months. For a few days or weeks now, querying the table on one of its columns, letยดs call it double_column, from datatype DoubleType, using ">" "<" operators, results in an error.

So a query like...

SELECT * FROM example_table WHERE double_column > 1

... would throw an error, whereas using "==" or "!="... works just fine.

The following error is thrown:

AssertionError: assertion failed
org.apache.spark.SparkException: [INTERNAL_ERROR] The Spark SQL phase planning failed with an internal error. You hit a bug in Spark or the Spark plugins you use. Please, report this bug to the corresponding communities or vendors, and provide the full stack trace.

However, querying an older version of the table works  just fine:

SELECT * FROM example_table VERSION AS OF 100 WHERE double_column > 1

...returns the desired result.

 

Whatยดs even more confusing, when we query the latest version of the table using...

SELECT * FROM example_table VERSION AS OF 500 [this is the latest version] WHERE double_column > 1

...it works as well, even though it should query the same state of the table as the first query, right?

 

Would be nice if anyone has some suggestions on how to fix this ๐Ÿ™‚

kind regards
Christoph

3 REPLIES 3

-werners-
Esteemed Contributor III

Nice ๐Ÿ™‚
Do you happen to use a Photon cluster?  If so, can you run a test without Photon?

Christoph
New Contributor II

No, Photon was not activated on any of the clusters I tried running the queries on.

The easiest solution for this problem is casting the column double_column to FloatType. Then it works as expected again, I coudnยดt figure out why though. So this will be our short term fix, but still we would like to understand this issue ๐Ÿ˜„ 

-werners-
Esteemed Contributor III

it might be a bug which is already logged, or a new one.  You can check the Spark Jira pages.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.