Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix-params-execute-…
Browse files Browse the repository at this point in the history
…immediate
  • Loading branch information
MaxGekk committed Jan 14, 2025
2 parents 43cc1af + fafe43c commit 83d80a9
Show file tree
Hide file tree
Showing 128 changed files with 10,238 additions and 4,033 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,6 @@ jobs:
INCLUDED_TAGS: ${{ matrix.included-tags }}
HADOOP_PROFILE: ${{ matrix.hadoop }}
HIVE_PROFILE: ${{ matrix.hive }}
# GitHub Actions' default miniconda to use in pip packaging test.
CONDA_PREFIX: /usr/share/miniconda
GITHUB_PREV_SHA: ${{ github.event.before }}
SPARK_LOCAL_IP: localhost
NOLINT_ON_COMPILE: true
Expand Down Expand Up @@ -539,8 +537,6 @@ jobs:
MODULES_TO_TEST: ${{ matrix.modules }}
HADOOP_PROFILE: ${{ inputs.hadoop }}
HIVE_PROFILE: hive2.3
# GitHub Actions' default miniconda to use in pip packaging test.
CONDA_PREFIX: /usr/share/miniconda
GITHUB_PREV_SHA: ${{ github.event.before }}
SPARK_LOCAL_IP: localhost
SKIP_UNIDOC: true
Expand Down Expand Up @@ -602,12 +598,18 @@ jobs:
echo $py
$py -m pip list
done
- name: Install Conda for pip packaging test
if: contains(matrix.modules, 'pyspark-errors')
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
# Run the tests.
- name: Run tests
env: ${{ fromJSON(inputs.envs) }}
shell: 'script -q -e -c "bash {0}"'
run: |
if [[ "$MODULES_TO_TEST" == *"pyspark-errors"* ]]; then
export PATH=$CONDA/bin:$PATH
export SKIP_PACKAGING=false
echo "Python Packaging Tests Enabled!"
fi
Expand All @@ -620,9 +622,10 @@ jobs:
- name: Upload coverage to Codecov
if: fromJSON(inputs.envs).PYSPARK_CODECOV == 'true'
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./python/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: PySpark
verbose: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,6 @@ private enum CaseSensitivity {
*/
private static final int CASE_SENSITIVITY_MASK = 0b1;

private static final String UTF8_BINARY_COLLATION_NAME = "UTF8_BINARY";
private static final String UTF8_LCASE_COLLATION_NAME = "UTF8_LCASE";

private static final int UTF8_BINARY_COLLATION_ID =
new CollationSpecUTF8(CaseSensitivity.UNSPECIFIED, SpaceTrimming.NONE).collationId;
private static final int UTF8_LCASE_COLLATION_ID =
Expand Down Expand Up @@ -655,9 +652,9 @@ protected CollationMeta buildCollationMeta() {
protected String normalizedCollationName() {
StringBuilder builder = new StringBuilder();
if(caseSensitivity == CaseSensitivity.UNSPECIFIED){
builder.append(UTF8_BINARY_COLLATION_NAME);
builder.append(CollationNames.UTF8_BINARY);
} else{
builder.append(UTF8_LCASE_COLLATION_NAME);
builder.append(CollationNames.UTF8_LCASE);
}
if (spaceTrimming != SpaceTrimming.NONE) {
builder.append('_');
Expand All @@ -669,12 +666,12 @@ protected String normalizedCollationName() {
static List<CollationIdentifier> listCollations() {
CollationIdentifier UTF8_BINARY_COLLATION_IDENT = new CollationIdentifier(
PROVIDER_SPARK,
UTF8_BINARY_COLLATION_NAME,
CollationNames.UTF8_BINARY,
CollationSpecICU.ICU_VERSION
);
CollationIdentifier UTF8_LCASE_COLLATION_IDENT = new CollationIdentifier(
PROVIDER_SPARK,
UTF8_LCASE_COLLATION_NAME,
CollationNames.UTF8_LCASE,
CollationSpecICU.ICU_VERSION
);
return Arrays.asList(UTF8_BINARY_COLLATION_IDENT, UTF8_LCASE_COLLATION_IDENT);
Expand Down Expand Up @@ -758,7 +755,7 @@ private enum AccentSensitivity {
VersionInfo.ICU_VERSION.getMinor());

static {
ICULocaleMap.put("UNICODE", ULocale.ROOT);
ICULocaleMap.put(CollationNames.UNICODE, ULocale.ROOT);
// ICU-implemented `ULocale`s which have corresponding `Collator` installed.
ULocale[] locales = Collator.getAvailableULocales();
// Build locale names in format: language["_" optional script]["_" optional country code].
Expand Down Expand Up @@ -806,13 +803,13 @@ private enum AccentSensitivity {
}

private static final int UNICODE_COLLATION_ID = new CollationSpecICU(
"UNICODE",
CollationNames.UNICODE,
CaseSensitivity.CS,
AccentSensitivity.AS,
SpaceTrimming.NONE).collationId;

private static final int UNICODE_CI_COLLATION_ID = new CollationSpecICU(
"UNICODE",
CollationNames.UNICODE,
CaseSensitivity.CI,
AccentSensitivity.AS,
SpaceTrimming.NONE).collationId;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.spark.sql.catalyst.util;

public class CollationNames {
public static final String UTF8_BINARY = "UTF8_BINARY";
public static final String UTF8_LCASE = "UTF8_LCASE";
public static final String UNICODE = "UNICODE";
public static final String UNICODE_CI = "UNICODE_CI";
}
Loading

0 comments on commit 83d80a9

Please sign in to comment.