Fix schema inference for unquoted dates in CSV

This commit is contained in:
avogar 2022-03-01 11:03:26 +00:00
parent 1149a49d79
commit a7c6d11532
3 changed files with 10 additions and 1 deletions

View File

@ -262,7 +262,7 @@ static bool evaluateConstantExpressionFromString(const StringRef & field, DataTy
/// FIXME: Our parser cannot parse maps in the form of '{key : value}' that is used in text formats.
bool parsed = parser.parse(token_iterator, ast, expected);
if (!parsed)
if (!parsed || !token_iterator->isEnd())
return false;
try

View File

@ -0,0 +1 @@
c1 Nullable(String)

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
echo "2020-02-01 16:00:00" | $CLICKHOUSE_LOCAL -q "desc table table" --input-format "CSV" --file=-