prql icon indicating copy to clipboard operation
prql copied to clipboard

Numerical notation

Open vanillajonathan opened this issue 2 years ago • 2 comments

What's up?

Supported could be added for numerical notation in binary, hex and octal. It would be useless!

from pets
filter id == 0b11111111 # 255
from pets
filter id == 0o377 # 255
from pets
filter id == 0xff # 255

vanillajonathan avatar Aug 31 '23 14:08 vanillajonathan

Yes, this would be a reasonable first issue. Not the top priority of the project, but would be fine to add. Start with lexer.rs...

It would be useless!

Not sure what this means! Maybe you meant "useful"? :)

max-sixty avatar Aug 31 '23 17:08 max-sixty

Not sure what this means! Maybe you meant "useful"? :)

I jokingly meant that it would be "less useful", and hence a low priority issue. I consider it more of a "cool" feature than something truly useful.

vanillajonathan avatar Sep 01 '23 08:09 vanillajonathan

This was added in PRQL 0.10.0. https://github.com/PRQL/prql/blob/main/CHANGELOG.md#0100--2023-10-26

With #3661, #3654 and #3672.

vanillajonathan avatar Feb 29 '24 20:02 vanillajonathan