Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use antlr parser to parse the types in extensions #64

Merged
merged 24 commits into from
Nov 5, 2024

Conversation

scgkiran
Copy link
Contributor

  1. This needs a go generate changes to pull the grammar from substarit-core and auto generate antlr parser. For now I included the files in this PR.
  2. This is just parser replacement. No new functionality added w.r.to loading new extensions or supporting type derivation.

@scgkiran scgkiran marked this pull request as draft October 30, 2024 13:55
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 81.56313% with 92 lines in your changes missing coverage. Please review.

Project coverage is 56.50%. Comparing base (5ba7f5e) to head (1828711).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
types/parser/visitor.go 80.59% 35 Missing and 4 partials ⚠️
types/parser/parse.go 68.65% 18 Missing and 3 partials ⚠️
extensions/variants.go 38.09% 12 Missing and 1 partial ⚠️
types/any_type.go 0.00% 6 Missing ⚠️
types/parameterized_decimal_type.go 63.63% 4 Missing ⚠️
types/parameterized_user_defined_type.go 97.32% 3 Missing ⚠️
types/parameterized_map_type.go 85.71% 2 Missing ⚠️
types/parameterized_single_integer_param_type.go 89.47% 2 Missing ⚠️
types/parameterized_struct_type.go 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   55.00%   56.50%   +1.50%     
==========================================
  Files          36       38       +2     
  Lines        8177     8227      +50     
==========================================
+ Hits         4498     4649     +151     
+ Misses       3476     3382      -94     
+ Partials      203      196       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jacques-n jacques-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update codecov as part of this patch to ignore the newly generated files.

grammar/Makefile Outdated Show resolved Hide resolved
grammar/Makefile Outdated Show resolved Hide resolved
@scgkiran
Copy link
Contributor Author

scgkiran commented Nov 2, 2024

Let's update codecov as part of this patch to ignore the newly generated files.

Done

@scgkiran scgkiran marked this pull request as ready for review November 2, 2024 23:28
types/parameterized_user_defined_type.go Outdated Show resolved Hide resolved
types/parser/baseparser/SubstraitLexer.tokens Outdated Show resolved Hide resolved
types/parser/baseparser/SubstraitLexer.interp Outdated Show resolved Hide resolved
types/parser/baseparser/substraittype_base_listener.go Outdated Show resolved Hide resolved
types/parser/parse.go Show resolved Hide resolved
return l.errors[0]
}

func (l *simpleErrorListener) GetErrors() []string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect tests to use GetErrors() instead of GetError() to detect when multiple errors appear (not just the one expected one).

types/parser/parse.go Outdated Show resolved Hide resolved
types/parser/visitor.go Outdated Show resolved Hide resolved
@anshuldata anshuldata merged commit bdb436b into substrait-io:main Nov 5, 2024
8 checks passed
@scgkiran scgkiran deleted the parser branch November 5, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants