Skip to content

fix: correct _default_value_for_type for temporal and unsupported types#36

Merged
xmnlab merged 2 commits intoarxlang:mainfrom
yogendra-17:feature-ParserException
Mar 9, 2026
Merged

fix: correct _default_value_for_type for temporal and unsupported types#36
xmnlab merged 2 commits intoarxlang:mainfrom
yogendra-17:feature-ParserException

Conversation

@yogendra-17
Copy link
Contributor

@yogendra-17 yogendra-17 commented Mar 7, 2026

Pull Request description

_default_value_for_type silently returned LiteralInt32(0) for any unrecognised type, including fully-supported temporal types like DateTime, Timestamp, Date, and Time. This produced incorrect AST nodes with no indication of the problem.

How to test these changes

Updated test_parse_type_list_and_default_values to assert correct literal types are returned for all temporal types, and added a pytest.raises(ParserException) assertion for ListType.

  • ...

Pull Request checklists

This PR is a:

  • bug-fix
  • new feature
  • maintenance

About this PR:

  • it includes tests.
  • the tests are executed on CI.
  • the tests generate log file(s) (path).
  • pre-commit hooks were executed locally.
  • this PR requires a project documentation update.

Author's checklist:

  • I have reviewed the changes and it contains no misspelling.
  • The code is well commented, especially in the parts that contain more
    complexity.
  • New and old tests passed locally.

Additional information

Reviewer's checklist

Copy and paste this template for your review's note:

## Reviewer's Checklist

- [ ] I managed to reproduce the problem locally from the `main` branch
- [ ] I managed to test the new changes locally
- [ ] I confirm that the issues mentioned were fixed/resolved .

@xmnlab
Copy link
Contributor

xmnlab commented Mar 7, 2026

@yogendra-17 thanks for working on that
could you fix the issue pointed by the linter please?

cheers

@xmnlab
Copy link
Contributor

xmnlab commented Mar 7, 2026

arx uses pre-commit hooks .. you can install it locally running pre-commit install .. and you can run it for all files with pre-commit run --all-files

@yogendra-17
Copy link
Contributor Author

@xmnlab , i am sorry for missing that ...i have pushed the changes

@xmnlab
Copy link
Contributor

xmnlab commented Mar 9, 2026

thanks @yogendra-17 ! appreciate it

@xmnlab xmnlab merged commit 93d7b13 into arxlang:main Mar 9, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants