What would be most efficient way to search through database tables and pick columns?

I am tasked with designing a modal screen where data scientists and business analysts should select different tables from database and then if necessary narrow down the selection by (optional) choosing specific table columns.

There can be up to hundred of columns per table. This is why Im considering splitting the views into 2 boxes where the first one is for tables and then the other one dynamically loads columns and has a search capability instead of Version B, where everything is together.

My question is whether you know of any other possible solution (modal window with limited space friendly) than this or whether you would have any design feedback for this.

I also intend doing some usability session, but since i am very limited with time. I wanted to seek comments from this community as well.

enter image description here