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

Making Schema names optional for Table Valued Functions #981

Merged
merged 76 commits into from
Jan 30, 2025

Conversation

soham-bentley
Copy link
Contributor

@soham-bentley soham-bentley commented Jan 29, 2025

soham-bentley and others added 30 commits September 18, 2024 14:10
# Conflicts:
#	iModelCore/ECDb/ECDb/IssueReporter.cpp
#	iModelCore/ECDb/ECDb/IssueReporter.h
…eter inside InVirtualSet() or IdSet()....useful for BindIdSet()
SELECT x FROM  (with cte(x) as(select ECInstanceId from meta.ECClassDef) select x from cte), test.IdSet('[1,2,3,4,5]') where id = x group by x
…and renamed _OnBeforeStep() to _ONBeforeFirstStep()
…VirtualTable_part2

# Conflicts:
#	iModelCore/ECDb/Tests/NonPublished/ECDbIdSetVirtualTableTests.cpp
# Conflicts:
#	iModelCore/ECDb/ECDb/BuiltInVTabs.cpp
#	iModelCore/ECDb/ECDb/ECSql/PragmaECSqlPreparedStatement.cpp
#	iModelCore/ECDb/ECDb/ECSql/ValueExp.cpp
#	iModelCore/ECDb/Tests/NonPublished/ConcurrentQueryTest_V2.cpp
#	iModelCore/ECDb/Tests/NonPublished/ECDbIdSetVirtualTableTests.cpp
#	iModelCore/ECDb/Tests/Performance/PerformanceIdSetTests.cpp
@soham-bentley
Copy link
Contributor Author

@Mergifyio backport release/4.11.x

Copy link

mergify bot commented Feb 6, 2025

backport release/4.11.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Feb 6, 2025
* commit for new added test

* commit 2

* update

* Fixed all the issues related to filtering of data in Virtual Table

* Binder Type enhancement

* trying to fix BestIndex

* Fixed the single column issue in VT

* Performance Tests Added

* ValueExp_Issue_Id_Change due to conflicts while merging with main

* Added flag for binder info to check whether the binder is for a parameter inside InVirtualSet() or IdSet()....useful for BindIdSet()

* Tests Added

* Crash for following expression stopped by providing null checks

SELECT x FROM  (with cte(x) as(select ECInstanceId from meta.ECClassDef) select x from cte), test.IdSet('[1,2,3,4,5]') where id = x group by x

* Kepping concurrentQueryImpl as close to as it was with minimal changes

* schema name changed to ECVLib and also file name changed

* cleanup

* more cleanup

* Performanvce Tests Updated

* some comments resolved

* Comments regarding constant name of IdSet table resolved

* binderInfo refactoring

* added flag to call _onbeforefirststep() once in PragmaECSQLStatement and renamed _OnBeforeStep() to _ONBeforeFirstStep()

* changes as per suggestions by Affan

* Performance test updated

* Tests updated to prevent failure in pipeline

* tests updated

* update in logic in IModelJsNative.cpp and concurrentquery

* performance tests indentation updated

* final update

* OnBeforeFirstStep() logic updated by using m_isFirstStep flag

* Commit for schema names optional in table valued functions

* More Tests added

* issue reporter update

* Added flag checking to m_isFirstStep flag so that when actually flag is false we reset it to true and vice versa

* logic update

* update

* update

* commiting update

* comment added

* comment added

* Tests added and updated

* removing m_isFirstStep and identifying first step using statement state

* Comment updated

* Fixed the issue with the query SELECT e.i FROM aps.TestElement e INNER JOIN ECVLib.IdSet(?) v ON e.ECInstanceId = v.id

* More tests added

* More Performance Tests added

* indentation issue solved

* Update in logic to get statement state

* Changelog updated

* comments updated

* Updates in code

* Tests added

* ECSql version updated

* Colin's comment resolved and appropriate tests added

---------

Co-authored-by: affank <[email protected]>
(cherry picked from commit ffc5996)
soham-bentley added a commit that referenced this pull request Feb 6, 2025
* commit for new added test

* commit 2

* update

* Fixed all the issues related to filtering of data in Virtual Table

* Binder Type enhancement

* trying to fix BestIndex

* Fixed the single column issue in VT

* Performance Tests Added

* ValueExp_Issue_Id_Change due to conflicts while merging with main

* Added flag for binder info to check whether the binder is for a parameter inside InVirtualSet() or IdSet()....useful for BindIdSet()

* Tests Added

* Crash for following expression stopped by providing null checks

SELECT x FROM  (with cte(x) as(select ECInstanceId from meta.ECClassDef) select x from cte), test.IdSet('[1,2,3,4,5]') where id = x group by x

* Kepping concurrentQueryImpl as close to as it was with minimal changes

* schema name changed to ECVLib and also file name changed

* cleanup

* more cleanup

* Performanvce Tests Updated

* some comments resolved

* Comments regarding constant name of IdSet table resolved

* binderInfo refactoring

* added flag to call _onbeforefirststep() once in PragmaECSQLStatement and renamed _OnBeforeStep() to _ONBeforeFirstStep()

* changes as per suggestions by Affan

* Performance test updated

* Tests updated to prevent failure in pipeline

* tests updated

* update in logic in IModelJsNative.cpp and concurrentquery

* performance tests indentation updated

* final update

* OnBeforeFirstStep() logic updated by using m_isFirstStep flag

* Commit for schema names optional in table valued functions

* More Tests added

* issue reporter update

* Added flag checking to m_isFirstStep flag so that when actually flag is false we reset it to true and vice versa

* logic update

* update

* update

* commiting update

* comment added

* comment added

* Tests added and updated

* removing m_isFirstStep and identifying first step using statement state

* Comment updated

* Fixed the issue with the query SELECT e.i FROM aps.TestElement e INNER JOIN ECVLib.IdSet(?) v ON e.ECInstanceId = v.id

* More tests added

* More Performance Tests added

* indentation issue solved

* Update in logic to get statement state

* Changelog updated

* comments updated

* Updates in code

* Tests added

* ECSql version updated

* Colin's comment resolved and appropriate tests added

---------

Co-authored-by: affank <[email protected]>
(cherry picked from commit ffc5996)

Co-authored-by: Soham Bhattacharjee <[email protected]>
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.

3 participants