Currently, the portion of code that determines if an inputted number is parsed as a Float or Decimal expression relies on string comparisons. Additionally, the decisions that the parser makes at this stage affects the output type, which maybe shouldn't be the case.
A less hacky implementation of that section of is here: https://github.com/dolthub/go-mysql-server/pull/1876
However, this fails a bunch of test, bringing up several (different) issues with matching the expected types MySQL returns.
Currently, the portion of code that determines if an inputted number is parsed as a Float or Decimal expression relies on string comparisons. Additionally, the decisions that the parser makes at this stage affects the output type, which maybe shouldn't be the case.
A less hacky implementation of that section of is here: https://github.com/dolthub/go-mysql-server/pull/1876 However, this fails a bunch of test, bringing up several (different) issues with matching the expected types MySQL returns.