All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hazelcast.jet.sql.impl.validate.HazelcastResources Maven / Gradle / Ivy

There is a newer version: 5.5.0
Show newest version
/*
 * Copyright 2021 Hazelcast Inc.
 *
 * Licensed under the Hazelcast Community License (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://hazelcast.com/hazelcast-community-license
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hazelcast.jet.sql.impl.validate;

import com.hazelcast.org.apache.calcite.runtime.CalciteException;
import com.hazelcast.org.apache.calcite.runtime.Resources;
import com.hazelcast.org.apache.calcite.sql.validate.SqlValidatorException;

/**
 * Error messages for parsing and validation stages.
 */
public interface HazelcastResources {

    HazelcastResources RESOURCES = Resources.create(HazelcastResources.class);

    @Resources.BaseMessage("Function ''{0}'' does not exist")
    Resources.ExInst functionDoesNotExist(String functionName);

    @Resources.BaseMessage("Cannot apply {0} operator to {1} (consider adding an explicit CAST)")
    Resources.ExInst invalidOperatorOperands(String operatorName, String operandTypes);

    @Resources.BaseMessage("Cannot apply {0} function to {1} (consider adding an explicit CAST)")
    Resources.ExInst invalidFunctionOperands(String functionName, String operandTypes);

    @Resources.BaseMessage("CAST function cannot convert value of type {0} to type {1}")
    Resources.ExInst cannotCastValue(String sourceType, String targetType);

    @Resources.BaseMessage("CAST function cannot convert literal {0} to type {1}: {2}")
    Resources.ExInst cannotCastLiteralValue(String sourceValue, String targetType, String message);

    @Resources.BaseMessage("Cannot infer return type for {1} among {0}")
    Resources.ExInst cannotInferCaseResult(String types, String operator);

    @Resources.BaseMessage("The descriptor column type ({0}) and the interval type ({1}) do not match")
    Resources.ExInst windowFunctionTypeMismatch(String descriptorType, String intervalType);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy