apache / incubator-xtable

Apache XTable (incubating) is a cross-table converter for lakehouse table formats that facilitates interoperability across data processing systems and query engines.
https://xtable.apache.org/
Apache License 2.0
919 stars 147 forks source link

[529] Build xtable with scala version(s) #544

Closed rangareddy closed 1 month ago

rangareddy commented 2 months ago

Important Read

This pull request aims to address issues #529

What is the purpose of the pull request

To support building the xtable with multiple scala versions i.e 2.12 and 2.13.

Brief change log

<scala12.version>2.12.15</scala12.version>
<scala13.version>2.13.8</scala13.version>
<!--Scala 2.12 Profile -->
<profile>
    <id>scala-2.12</id>
    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
    <properties>
        <scala.version>${scala12.version}</scala.version>
        <scala.version.prefix>2.12</scala.version.prefix>
    </properties>
    <build>
        <pluginManagement/>
    </build>
</profile>

<!--Scala 2.13 Profile -->
<!-- Once hudi supports scala 2.13 then enable following profile -->
<!--<profile>
    <id>scala-2.13</id>
    <activation>
        <activeByDefault>false</activeByDefault>
    </activation>
    <properties>
        <scala.version>${scala13.version}</scala.version>
        <scala.version.prefix>2.13</scala.version.prefix>
    </properties>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <configuration>
                        <args>
                            <arg>-unchecked</arg>
                            <arg>-deprecation</arg>
                            <arg>-feature</arg>
                            <arg>-explaintypes</arg>
                            <arg>-target:jvm-1.8</arg>
                        </args>
                        <compilerPlugins/>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</profile>-->

Verify this pull request

Run $ mvn clean install -DskipTests -U locally.

Note: Hudi does not yet support Scala 2.13 jars, so the scala-2.13 profile is commented out. Once Hudi supports Scala 2.13, we can use the following command to build xtable with Scala 2.13.

mvn clean install -DskipTests -Pscala-2.13 

References

vinishjail97 commented 2 months ago

Let's suffix the Scala version (2.12) to the jar name as suggested by @pjfanning https://github.com/apache/incubator-xtable/issues/529#issuecomment-2358231091

vinishjail97 commented 1 month ago

@pjfanning Can you review if things look okay ? This is the last release blocker for 0.2.0.

vinishjail97 commented 1 month ago

@rangareddy Let's squash before merging.