partiql/partiql-lang-kotlin

Internalize ANTLR-generated parser sources

alancai98 opened this issue · 2 comments

As of v0.14.5, all the ANTLR-generated parser sources in the partiql-parser subproject are marked as public. See the docs -- https://javadoc.io/doc/org.partiql/partiql-parser/0.14.5/partiql-parser/org.partiql.parser.antlr/index.html. We currently do not intend for these to be implemented outside of other packages within our codebase (ideally just partiql-parser).

We should try to do one or a combination of the following:

  1. Make the ANTLR-generated parser package-private. It's currently Java code and not Kotlin code so package-private rather than internal.
  2. Add a comment that the ANTLR-generated sources are intended to be implemented only by other partiql packages (similar to what we had done for sprout-generated interfaces -- #1413).
  3. Move the ANTLR-generated sources behind an internal namespace and add a comment that we do not intend for APIs under the internal namespace are not intended to be implemented.

Likely can't do the first point (make package-private) until we deprecate and remove the PIG-parser from partiql-ast.

#1452 was merged to v1 branch. Change will be part of the next major version release.