malloy icon indicating copy to clipboard operation
malloy copied to clipboard

SQL Server tsql base abstract class introduction

Open vitorelourenco opened this issue 8 months ago • 0 comments

This is mainly so we can discuss the decisions I had to make and how do we want to go about it. Some major ones are the wrapping of the main select block (not fully done atm but we can talk about the approach) groupByClause instead of only orderByClause Support for not needing regexp The support for not having 'LIMIT' available in the dialect Having booleans as numbers or expressions eg 1=1

The changes to malloy_query.ts are pretty significant.

This PR is expected to fail all sorts of tests but I feel like this is the point to start ping-ponging ideas.

Edit (may 16th, 2025) : I'm tyring to ditch the wrapping approach. Too many problems wit aliases in the internal query being unavailable to the outer query, specially FROM aliases. I also had to create a tally/numbers table cause sqlserver can't generate sequences on the fly without a CTE in a simple manner

Edit (may 26th, 2025) : There are still things to sort out, its not ready for usage but I would like to make more incremental changes, possibly making tsql abstract as a base and having sqlserver, azure sql and synapse extending

vitorelourenco avatar May 06 '25 17:05 vitorelourenco