Updated on 2024-12-13 GMT+08:00

Enabling HetuEngine Implicit Data Type Conversion

HetuEngine automatically converts types when the queried data types do not match the data types of the table when users access the HetuEngine resources through the client. This avoids inconvenience caused by strong data type verification. Currently, the data type can be implicitly converted for INSERT statement, WHERE conditions, operations (+, -, *, and /), and function calls (connection operations ||).

The implicit type conversion function can be enabled or disabled. By default, the function is disabled. Before using the function, you need to enable it.

Enabling Implicit Conversion at the Session Level

  1. Log in to the HetuEngine client.
  2. Run the following command to enable implicit data type conversion:

    set session implicit_conversion=true;

Enabling Implicit Conversion of UDF Calculation Results at the Session Level

  1. Log in to the HetuEngine client.
  2. Run the following command to enable implicit conversion of UDF calculation results:

    set session udf_implicit_conversion=true;

Enabling Implicit Conversion or Implicit Conversion of UDF Calculation Results at the System Level

  1. Log in to FusionInsight Manager, choose Cluster > Services > HetuEngine > Dashboard, and click the HSConsole link on the HSConsole Web UI to go to the compute instance page.
  2. On the Compute Instance page that is displayed, select the target compute instance in the instance list, click Stop above the list to stop this instance, and click Configure in the Operation column to access its configuration page.
  3. Add the following custom parameters based on the application scenario and save the configuration:

    Parameter

    Value

    Configuration File

    Description

    implicit-conversion

    true

    coordinator.config.properties

    Implicit conversion

    udf-implicit-conversion

    true

    coordinator.config.properties

    Implicit conversion of UDF calculation results

  4. Select Start Now and click OK.