Skip to content

Commit 72741a9

Browse files
check integer from args
1 parent 06553db commit 72741a9

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

sqlglot/dialects/duckdb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,10 @@ def _bitshift_sql(
785785
this = expression.this
786786

787787
# Ensure type annotation is available for nested expressions
788-
if not this.type:
789-
from sqlglot.optimizer.annotate_types import annotate_types
790-
791-
this = annotate_types(this, dialect=self.dialect)
788+
# if not this.type:
789+
# from sqlglot.optimizer.annotate_types import annotate_types
790+
#
791+
# this = annotate_types(this, dialect=self.dialect)
792792

793793
# Deal with binary separately, remember the original type, cast back later
794794
if _is_binary(this):

sqlglot/typing/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,7 @@
297297
exp.HexString: {
298298
"annotator": lambda self, e: self._set_type(
299299
e,
300-
exp.DataType.Type.BIGINT
301-
if self.dialect.HEX_STRING_IS_INTEGER_TYPE
302-
else exp.DataType.Type.BINARY,
300+
exp.DataType.Type.BIGINT if e.args.get("is_integer") else exp.DataType.Type.BINARY,
303301
)
304302
},
305303
exp.GenerateSeries: {

0 commit comments

Comments
 (0)