Its hard to find this information in the internet, free version of chatGPT is not sure so i think that we can take a look at source code and try to find something here
Lets start from sql-scanner (Lexer in jflex): sql-scanner.flex
public static void init(TReservedWordsVersion reservedWordsVersion) {
// initilize keywords
keywordMap = new LinkedHashMap<>();
keywordMap.put("&&", SqlParserSymbols.KW_AND);
keywordMap.put("add", SqlParserSymbols.KW_ADD);
keywordMap.put("aggregate", SqlParserSymbols.KW_AGGREGATE);
keywordMap.put("all", SqlParserSymbols.KW_ALL);
keywordMap.put("alter", SqlParserSymbols.KW_ALTER);
keywordMap.put("analytic", SqlParserSymbols.KW_ANALYTIC);
keywordMap.put("and", SqlParserSymbols.KW_AND);
Here you can see that in Impala you can't use "&", the second thing is that "and" and "&&" are resolved to the same key word - KW_AND
It suggests that only short-circuit "and" is used in Impala but lets dig deeper
In sql parser i found this: sql-parser
compound_predicate ::=
expr:e1 KW_AND expr:e2
{: RESULT = new CompoundPredicate(CompoundPredicate.Operator.AND, e1, e2); :}
| expr:e1 KW_OR expr:e2
{: RESULT = new CompoundPredicate(CompoundPredicate.Operator.OR, e1, e2); :}
| KW_NOT expr:e
{: RESULT = new CompoundPredicate(CompoundPredicate.Operator.NOT, e, null); :}
| NOT expr:e
{: RESULT = new CompoundPredicate(CompoundPredicate.Operator.NOT, e, null); :}
;
Which shows that KW_AND with its operands is translated to CompoundPredicate(CompoundPredicate.Operator.AND, e1, e2)
In this file i found this: AndPredicate
// (<> && false) is false, (true && NULL) is NULL
BooleanVal AndPredicate::GetBooleanValInterpreted(
ScalarExprEvaluator* eval, const TupleRow* row) const {
DCHECK_EQ(children_.size(), 2);
BooleanVal val1 = children_[0]->GetBooleanVal(eval, row);
if (!val1.is_null && !val1.val) return BooleanVal(false); // short-circuit
BooleanVal val2 = children_[1]->GetBooleanVal(eval, row);
if (!val2.is_null && !val2.val) return BooleanVal(false);
if (val1.is_null || val2.is_null) return BooleanVal::null();
return BooleanVal(true);
}
Which probably confirms that it is short-circuit but i think that you should treat my finding with causion.
You can try to dig dipper if you want to see more, i think that my answer is good starting point :)