mirror of
https://github.com/apache/impala.git
synced 2026-02-01 12:00:22 -05:00
This patch removes restriction on creating a function with the same name as the built-in function. The reason for lifting the restriction is to avoid a name clash when introducing new built-in functions. The patch also fixes some inconsistent behavior when creating or dropping a function when the name specified is fully-qualified or not. Refer to the below tables for more information. Create function: +---------+-------------+-------------------------+-------------------------------+-------------------------------+ | FQ Name | Built-in DB | Function Name | Existing Behavior | New Behavior | +---------+-------------+-------------------------+-------------------------------+-------------------------------+ | Yes | Yes | Same as built-in | Same name exception | Cannot modify system database | | Yes | Yes | Different than built-in | Cannot modify system database | Cannot modify system database | | Yes | No | Same as built-in | Function created | Function created | | Yes | No | Different than built-in | Function created | Function created | | No | Yes | Same as built-in | Same name exception | Cannot modify system database | | No | Yes | Different than built-in | Cannot modify system database | Cannot modify system database | | No | No | Same as built-in | Same name exception | Function created | | No | No | Different than built-in | Function created | Function created | +---------+-------------+-------------------------+-------------------------------+-------------------------------+ Drop function: +---------+-------------+-------------------------+-------------------------------+-------------------------------+ | FQ Name | Built-in DB | Function Name | Existing Behavior | New Behavior | +---------+-------------+-------------------------+-------------------------------+-------------------------------+ | Yes | Yes | Same as built-in | Cannot modify system database | Cannot modify system database | | Yes | Yes | Different than built-in | Cannot modify system database | Cannot modify system database | | Yes | No | Same as built-in | Function dropped | Function dropped | | Yes | No | Different than built-in | Function dropped | Function dropped | | No | Yes | Same as built-in | Cannot modify system database | Cannot modify system database | | No | Yes | Different than built-in | Cannot modify system database | Cannot modify system database | | No | No | Same as built-in | Cannot modify system database | Function dropped | | No | No | Different than built-in | Function dropped | Function dropped | +---------+-------------+-------------------------+-------------------------------+-------------------------------+ Select function (no new behavior): +---------+-------------+-------------------------+--------------------------------------------------------+ | FQ Name | Built-in DB | Function Name | Behavior | +---------+-------------+-------------------------+--------------------------------------------------------+ | Yes | Yes | Same as built-in | Function in the specified database (built-in) executed | | Yes | Yes | Different than built-in | Unknown function exception | | Yes | No | Same as built-in | Function in the specified database executed | | Yes | No | Different than built-in | Function in the specified database executed | | No | Yes | Same as built-in | Built-in function executed | | No | Yes | Different than built-in | Unknown function exception | | No | No | Same as built-in | Built-in function executed | | No | No | Different than built-in | Function in the current database executed | +---------+-------------+-------------------------+--------------------------------------------------------+ Testing: - Ran front-end tests - Added end-to-end DDL function tests Cherry-picks: not for 2.x Change-Id: Ic30df56ac276970116715c14454a5a2477b185fa Reviewed-on: http://gerrit.cloudera.org:8080/9800 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Impala Public Jenkins
This directory contains Impala test workloads. The directory layout for the workloads should follow: workloads/ <data set name>/<data set name>_dimensions.csv <- The test dimension file <data set name>/<data set name>_core.csv <- A test vector file <data set name>/<data set name>_pairwise.csv <data set name>/<data set name>_exhaustive.csv <data set name>/queries/<query test>.test <- The queries for this workload