pypika
pypika copied to clipboard
quote_char = False doesn't work on Cast columns
table_name = 'test'
something = [Cast("a",'VARCHAR'),'b','c']
x = Query\
._builder(as_keyword=True)\
.from_(table_name)\
.select(*something)\
.distinct()
x.get_sql(quote_char=False)
The quote_char=False doesn't remove the quotes from Cast column name.
Actual Result:
"SELECT DISTINCT CAST('a' AS VARCHAR),b,c FROM test"
Expected Result:
"SELECT DISTINCT CAST(a AS VARCHAR),b,c FROM test"
Is there another way to get rid of the quotes within the cast function?