question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Delta Core 1.0.1 still building with ANTLR 4.7 instead of ANTLR 4.8

See original GitHub issue

Bug

Describe the problem

I am building a Spark 3.1.3 environment that uses the matching version of Delta Core (1.0.1) for OSS delta table support. This version of Delta Core was released on February 11th, 2022. However, when invoking the first Spark SQL query, I am getting an error message: ANTLR Tool version 4.7 used for code generation does not match the current runtime version 4.8ANTLR Tool version 4.7 used for code generation does not match the current runtime version 4.8+

This issue was was first reported in https://github.com/delta-io/delta/issues/686 and addressed by https://github.com/delta-io/delta/pull/676. However, this never made it into the next build of 1.0.1 for Spark 3.1.x.

Anyway, the result is that Spark 3.1.3 is built with version 4.8-1 https://github.com/apache/spark/blob/v3.1.3/pom.xml#L192 and Delta Core 1.0.1 is built with version 4.7 https://github.com/delta-io/delta/blob/v1.0.1/build.sbt#L61. From what I can see, all versions of Spark 3.1.x used this same 4.8-1 ANTLR version.

Steps to reproduce

Start Spark with delta-core 1.0.1 on Spark 3.1.3, with the configuration options set:

spark.sql.extensions: io.delta.sql.DeltaSparkSessionExtension
spark.sql.catalog.spark_catalog: org.apache.spark.sql.delta.catalog.DeltaCatalog

Invoke any spark-sql code after starting an interactive shell.

Observed results

Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /__ / .__/\_,_/_/ /_/\_\   version 3.1.3
      /_/

Using Python version 3.9.2 (default, Feb 28 2021 17:03:44)
Spark context Web UI available at http://967611c91d57:4040
Spark context available as 'sc' (master = local[*], app id = local-1654051675565).
SparkSession available as 'spark'.
>>> spark.sql("show databases").show(100, False)
ANTLR Tool version 4.7 used for code generation does not match the current runtime version 4.8ANTLR Tool version 4.7 used for code generation does not match the current runtime version 4.8+----------------------------------------+
|namespace                               |
+----------------------------------------+

Expected results

I expected that the fix for https://github.com/delta-io/delta/pull/676 should be present in Delta Core 1.0.1 since this release is older than the pull request. My guess is that the fix ended up on master and was divergent from the Delta Core 1.0.x development branch for which it was destined, but I’m not entirely sure.

Environment information

  • Delta Lake version: 1.0.1
  • Spark version: 3.1.3
  • Scala version: 2.12

Willingness to contribute

The Delta Lake Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the Delta Lake code base?

  • Yes. I can contribute a fix for this bug independently.
  • Yes. I would be willing to contribute a fix for this bug with guidance from the Delta Lake community.
  • No. I cannot contribute a bug fix at this time.

I think is a relatively simple fix for anyone to add into a 1.0.2 release.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zsxwingcommented, Jun 3, 2022

Cool. I’m going to close this. As the release work for us is not cheap, we will not make a new release just for this ANTLR benign error. But I will keep it in mind. If we find any critical issue that we would need to make a new 1.0.x release, we will also fix this one together.

1reaction
zsxwingcommented, Jun 1, 2022

Did you also hit other issues, or just feel the error is annoying? This error is annoying but we haven’t seen any real issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependency declaration error in ANTLR 4.10.1 - Stack Overflow
I stumbled across this issue attempting to use ANTLR4 in a PHP environment. While the issue still exists afaik (I'm on PHP7.4.3 and ......
Read more >
Databricks Runtime 10.0 (Unsupported)
Databricks Runtime 10.0 includes Apache Spark 3.2.0. In this section: Highlights. Core and Spark SQL. Structured Streaming. PySpark.
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug :1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to users, introduce a simple stability voting system and have a core...
Read more >
Databricks Runtime 11.0 - Azure - Microsoft Learn
In this article. New features and improvements; Behavior changes; Bug fixes; Library upgrades; Apache Spark; Maintenance updates; System ...
Read more >
Debian -- Software Packages in "bullseye", Subsection doc
... tool for constructing compilers etc - documentation; antlr4-doc (4.7.2-5): ANTLR ... cinnamon-doc (4.8.6-2+deb11u1): Innovative and comfortable desktop ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found