Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#39 Updating spark-sql version and testing references #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

charlyraffellini
Copy link

Updating spark-sql version 2.0.1 => 2.4.3

Adding two test cases for references of multiple types. I found not obvious from the tests cases how the conversion of references like the one below will be. So I added two test cases.

          {
            "definitions": {
              "address": {
                "type": ["object", "array"],
                "properties": {
                  "street_address": { "type": "string" },
                  "city":           { "type": "string" },
                  "state":          { "type": "string" }
                }
              }
            },
            "type": "object",
            "properties": {
              "billing_address": { "$ref": "#/definitions/address" }
            }
          }

@hesserp
Copy link
Contributor

hesserp commented Nov 27, 2020

Hi @charlyraffellini, sorry for no reply for so long time. The travis CI issue for the automatic PR checks should be fixed in the current master.

I am not sure about the additional value of your test. I think multiple types and strict typing behavior is elaborated enough here:
https://github.com/zalando-incubator/spark-json-schema/blob/master/src/test/scala/org/zalando/spark/jsonschema/SchemaConverterTest.scala#L395
https://github.com/zalando-incubator/spark-json-schema/blob/master/src/test/scala/org/zalando/spark/jsonschema/SchemaConverterTest.scala#L414

and resolving references here:
https://github.com/zalando-incubator/spark-json-schema/blob/master/src/test/scala/org/zalando/spark/jsonschema/SchemaConverterTest.scala#L84

I think by mixing these two aspects your intent gets unclear. Could you elaborate which aspect you want to show exactly?

@@ -5,7 +5,7 @@ organization := "org.zalando"

scalaVersion := "2.11.8"

libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.0.1" % Provided
libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.4.3" % Provided
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is outdated in the new master. That's my fault for replying so late, sorry again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants