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

Update the Setter functions generated code in annotations #770

Merged

Conversation

gnanaprakash-ravi
Copy link
Contributor

Now Generated setter function codes are matching with the written code:

 def setName(self, name):
        self.pipe.setName(name)

Generated code:

import logging
from zingg.client import *
LOG = logging.getLogger("zingg.pipes")

JPipe = getJVM().zingg.spark.client.pipe.SparkPipe
FilePipe = getJVM().zingg.common.client.pipe.FilePipe
JStructType = getJVM().org.apache.spark.sql.types.StructType

class Pipe:
    def __init__(self, name, format, preprocessors, props, id, dataset, schema, mode):
        self.pipe = getJVM().zingg.spark.client.pipe.SparkPipe()
        self.pipe.name = name
        self.pipe.format = format
        self.pipe.preprocessors = preprocessors
        self.pipe.props = props
        self.pipe.id = id
        self.pipe.dataset = dataset
        self.pipe.schema = schema
        self.pipe.mode = mode

    def setSchema(self, schema):

        self.pipe.setSchema(schema)

    def getName(self):
        return getName

    def setName(self, name):

        self.pipe.setName(name)

    def getFormat(self):
        return getFormat

    def setFormat(self, sinkType):

        self.pipe.setFormat(sinkType)

    def setProp(self, k, v):

        self.pipe.setProp(k, v)

    def toString(self):
        return toString

@sonalgoyal sonalgoyal merged commit d5159cc into zinggAI:enterprise Jan 25, 2024
3 of 4 checks passed
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