matrixorigin / matrixorigin/matrixone

[Tech Request]: Fix the processing of hexadecimal literals

Open
#13,493 1 comment 0 reactions 1 assignee Assigned to @aunjgr View on GitHub
kind/tech-request priority/p1
Dominant language
Go
Stars
1.9k
Forks
311
Avg merge
1d 3h
Merged PRs (30d)
768

Description

### Is there an existing issue for the same tech request?

- [X] I have checked the existing issues.

### Does this tech request not affect user experience?

- [X] This tech request doesn't affect user experience.

### What would you like to be added ?

The current implementation parses hexadecimal literals as a string with `isBin` flag. That flag is even passed to `Vector`.

It's a bug-prone and intrusive design. ~It causes the "double-binarization" bug in matrixorigin/MO-Cloud#2030.~

We should rewrite it in a better way. All hexadecimal literals should be recognized and stored as a hexnum `Literal` in the first place, then converted to unsigned integer or binary string according to the target type later. The `isBin` flag should to eliminated.

### Why is this needed ?

_No response_

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.