Skip to content

Conversation

@psharma-1909
Copy link

No description provided.

Comment on lines 23 to 24
authors = Author.objects.annotate(joined=Concat("alias", "goes_by"))
#In Singlestore , If any of the arguments is NULL, the result is NULL in CONCAT.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add as_singlestore to the class ConcatPair(Func):, see as_mysql there, it should work.

models.PositiveBigIntegerField,
models.PositiveIntegerField,
models.PositiveSmallIntegerField,
):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these are removed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Casting to unsigned int was failing. I'll double-check the issue and share more details on this.

Copy link
Author

@psharma-1909 psharma-1909 May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sql query generating for these look like
'SELECT db_functions_author.id, db_functions_author.name, db_functions_author.alias, db_functions_author.goes_by, db_functions_author.age, (db_functions_author.alias) :> UNSIGNED BIGINT AS cast_int FROM db_functions_author'
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' UNSIGNED BIGINT AS cast_int FROM db_functions_author'

@psharma-1909 psharma-1909 force-pushed the psharma_db_functions branch from 3c1960e to b53475d Compare May 30, 2025 01:25
@psharma-1909 psharma-1909 force-pushed the psharma_db_functions branch from b53475d to fe14521 Compare May 30, 2025 01:27
@psharma-1909 psharma-1909 merged commit f5cdcb2 into singlestore-test-4.2.x Jun 2, 2025
2 of 3 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.

3 participants