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

Add support to show ANTLR Batch parsing time along with other explain information #2673

Conversation

Deepesh125
Copy link
Contributor

@Deepesh125 Deepesh125 commented Jun 20, 2024

This commit adds support to show ANTLR parsing time with EXPLAIN info. With this change, query plan would look like following:

1> select 1 + 1
2> select 'abc' + 'def'
3> go

-----------
          2

(1 rows affected)
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Query Text: select 1 + 1
Result  (cost=0.00..0.01 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)
Planning Time: 0.389 ms
Execution Time: 0.057 ms

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
abcdef

(1 rows affected)
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Query Text: select 'abc' + 'def'
Result  (cost=0.00..0.01 rows=1 width=32) (actual time=0.025..0.026 rows=1 loops=1)
Planning Time: 0.219 ms
Execution Time: 0.083 ms

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Babelfish T-SQL Batch Parsing Time: 103.177 ms

Cherry-pick of #2647

Task: BABEL-3650
Signed-off-by: Dipesh Dhameliya dddhamel@amazon.com

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Deepesh125 and others added 2 commits June 20, 2024 10:51
… information (babelfish-for-postgresql#2647)

This commit adds support to show ANTLR parsing time with EXPLAIN info. With this change, query plan would look like following:
```
1> select 1 + 1
2> select 'abc' + 'def'
3> go

-----------
          2

(1 rows affected)
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Query Text: select 1 + 1
Result  (cost=0.00..0.01 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)
Planning Time: 0.389 ms
Execution Time: 0.057 ms

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
abcdef

(1 rows affected)
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Query Text: select 'abc' + 'def'
Result  (cost=0.00..0.01 rows=1 width=32) (actual time=0.025..0.026 rows=1 loops=1)
Planning Time: 0.219 ms
Execution Time: 0.083 ms

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Babelfish T-SQL Batch Parsing Time: 103.177 ms
```

Task: BABEL-3650
Signed-off-by: Dipesh Dhameliya <dddhamel@amazon.com>
@coveralls
Copy link
Collaborator

coveralls commented Jun 21, 2024

Pull Request Test Coverage Report for Build 9608171114

Details

  • 41 of 43 (95.35%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 73.362%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contrib/babelfishpg_tsql/src/iterative_exec.c 39 41 95.12%
Totals Coverage Status
Change from base Build 9568439596: 0.02%
Covered Lines: 42117
Relevant Lines: 57410

💛 - Coveralls

@shardgupta shardgupta merged commit 794c31c into babelfish-for-postgresql:BABEL_3_X_DEV Jun 21, 2024
42 checks passed
@shardgupta shardgupta deleted the jira-babel-3650 branch June 21, 2024 05:41
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.

None yet

4 participants