summaryrefslogtreecommitdiffstats
path: root/sqlglot/time.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-25 16:01:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-25 16:01:43 +0000
commit29f9a15cce138301cd5a84a1fd4060494a3a65b6 (patch)
treec593be2f0b0fdc60a43983aa547b34a441170e59 /sqlglot/time.py
parentAdding upstream version 9.0.1. (diff)
downloadsqlglot-29f9a15cce138301cd5a84a1fd4060494a3a65b6.tar.xz
sqlglot-29f9a15cce138301cd5a84a1fd4060494a3a65b6.zip
Adding upstream version 9.0.3.upstream/9.0.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/time.py')
-rw-r--r--sqlglot/time.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sqlglot/time.py b/sqlglot/time.py
index 16314c5..de28ac0 100644
--- a/sqlglot/time.py
+++ b/sqlglot/time.py
@@ -14,6 +14,8 @@ def format_time(string, mapping, trie=None):
mapping: Dictionary of time format to target time format
trie: Optional trie, can be passed in for performance
"""
+ if not string:
+ return None
start = 0
end = 1
size = len(string)