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

[TODO] optimize constants: ir.Add(ir.Literal(2), ir.Literal(2)) => ir.Literal(4) #1155

Open
labs-infra-reader-backup bot opened this issue Nov 4, 2024 · 0 comments
Labels
feat/ir everything related to abstract syntax trees tech debt design flaws and other cascading effects

Comments

@labs-infra-reader-backup
Copy link

See more context:

// @see https://docs.databricks.com/en/sql/language-manual/functions/slice.html
// TODO: optimize constants: ir.Add(ir.Literal(2), ir.Literal(2)) => ir.Literal(4)
ir.Slice(args.head, zeroIndexedToOneIndexed(args(1)), args.lift(2).getOrElse(oneLiteral))
case ir.CallFunction("ARRAY_SORT", args) => arraySort(args)
case ir.CallFunction("ARRAY_TO_STRING", args) => ir.ArrayJoin(args.head, args(1), None)
case ir.CallFunction("BASE64_DECODE_STRING", args) => ir.UnBase64(args.head)

@nfx nfx added tech debt design flaws and other cascading effects feat/ir everything related to abstract syntax trees labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/ir everything related to abstract syntax trees tech debt design flaws and other cascading effects
Projects
None yet
Development

No branches or pull requests

1 participant