databrickslabs / remorph

Cross-compiler and Data Reconciler into Databricks Lakehouse
Other
21 stars 13 forks source link

[FEATURE]: Unify Identifier and Id in IR #554

Open vil1 opened 1 month ago

vil1 commented 1 month ago

Is there an existing issue for this?

Category of feature request

Transpile

Problem statement

The intermediate representation AST features two different nodes that seemingly serve the same purpose:

case class Identifier(name: String, isQuoted: Boolean) extends Expression 

and

case class Id(id: String, caseSensitive: Boolean = false) extends Expression

Both are meant to represent identifiers (like table or column names) which may be quoted (in which case they have to be treated in a case-sensitive manner).

Proposed Solution

We need to remove either one and change the rest of the implementation accordingly.

Additional Context

No response